Skip to content

Package main typings resolution is not consistent with normal resolution #9854

@unional

Description

@unional

Don't know if this is intentional or is an unintended bug.

Currently if package.json/typings property is not specified, it defaults to read /index.d.ts, even if package.json/main is specified as things like dist/index.js.

In contrast, normal (relative) resolution would look for .d.ts next to the .js file.

Should tsc also tries to look up dist/index.d.ts in the above case?

This applies to 1.8 and 2.0.

Original conversation:
blakeembrey/make-error-cause#12

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedA PR has been merged for this issueHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions