Skip to content

Issue: Types not found. #25

Closed
Closed
@terkelg

Description

@terkelg

When importing the library in TypeScript, the type declaration isn't found.
I think this issue is caused by package.json not linking to the correct file. It's pointing to a types file in the root of the build folder, but the NPM modules doesn't come bundled with that file.

It's also worth noting that the types for ESM and CJS are identical. You can remove the types from the export fields and point to a shared types file in types. VSCode cannot read the types inside export anyway.

CleanShot 2023-09-30 at 21 58 05@2x

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions