Skip to content

tsc can't find type declarations #108

@lg250137

Description

@lg250137

Upon upgrading to mock-argv v3.0.0, I get this error from tsc:

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

It looks like types must be explicitly exported: https://stackoverflow.com/a/76212193/2124637.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions