array-query icon indicating copy to clipboard operation
array-query copied to clipboard

TypeScript cannot find type declarations

Open ozum opened this issue 2 years ago • 0 comments

Hi,

TypeScript: 5.3.2 Node: 21.1.0 pnpm: 8.6.12

When I tried to use this library with TypeScript, I got the following error:

Could not find a declaration file for module 'array-query'.

There are types at '.../node_modules/array-query/dist/query.d.ts',
but this result could not be resolved when respecting package.json "exports".
The 'array-query' library may need to update its package.json or typings.ts(7016)

Workaround: I renamed dist/query.d.ts as dist/array-query.d.ts and changed types in package.json

"types": "./dist/array-query.d.ts",

...and it worked as expected.

Could you please verify?

Many thanks.

ozum avatar Dec 09 '23 19:12 ozum