Skip to content

Doesn't appear to look for index.d.ts if main field of package.json is listed as a different name #217

@jamesbrobb

Description

@jamesbrobb

In the README point 2 under "Order of Operations" states:

  1. Finds a .d.ts file, checking to see if one was specified manually or in the types field of the package.json. If neither is found, attempts to find one in the project directory named the same as the main field of the package.json or index.d.ts. Fails if no .d.ts file is found.

I'm not finding this to be the case. My main field is public-api.js but i have an index.d.ts file in the project directory i'm targeting, but am still getting the following error:

The type definition public-api.d.ts does not exist at...

Obviously if i rename index.d.ts to public-api.d.ts it works, so it this a mistake in the README explanation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions