ahrjarrett / any-ts

Sensible, performant primitives for writing semantic TypeScript code
https://npmjs.com/package/any-ts
8 stars 0 forks source link

bug: account for contravariace in index signature in `any.dict` #142

Closed ahrjarrett closed 5 months ago

ahrjarrett commented 5 months ago

Right now, any.dict's index signature is initialized as keyof never, which is the same as string | number | symbol.

That was a mistake on my part -- somewhat counter-intuitively, adding symbol to any.dict's signature causes its least upper bound to be too restrictive when it's used in covariant position.