ziggy icon indicating copy to clipboard operation
ziggy copied to clipboard

Export the types file

Open simon-tma opened this issue 1 year ago • 0 comments

If there is an exports key set, Typescript requires the types file to be included in the list of the files exported.

Without this change, Typescript errors when trying to import types with:

error TS7016: Could not find a declaration file for module 'ziggy-js'. '/.../node_modules/ziggy-js/dist/index.js' implicitly has an 'any' type.
  There are types at '/.../node_modules/ziggy-js/src/js/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'ziggy-js' library may need to update its package.json or typings.

simon-tma avatar Feb 29 '24 23:02 simon-tma