react-polymorphic-types icon indicating copy to clipboard operation
react-polymorphic-types copied to clipboard

fix: missing types with "moduleResolution": "Node16"

Open TxHawks opened this issue 3 years ago • 1 comments

Since the filename pointed at by default and import (empty) is not identical to the filename of the d.ts file (index), the top level types field is not enough when using "moduleResolution": "Node16" and TypeScript 4.7.

To fix this, types must be explicitly specified inside the exports object in addition to the top level types field.

See firebase/firebase-js-sdk#6300 and microsoft/playwright#14428

TxHawks avatar Jun 26 '22 05:06 TxHawks

Hi @kripod, any chance of this getting merged and released? We also ran into this need.

mihkeleidast avatar Oct 06 '22 13:10 mihkeleidast