Reference TS declaration file in package.json #7

Closed
ifiokjr wants to merge 1 commit from patch-1 into master
ifiokjr commented 2019-09-04 01:01:51 +02:00 (Migrated from github.com)

This is needed so that npm install automatically finds the types.

This is needed so that npm install automatically finds the types.
marijnh commented 2019-09-04 13:21:39 +02:00 (Migrated from github.com)

Could you elaborate on that? npm itself doesn't do anything with types, and TypeScript will already look for a .d.ts file alongside the package's main file, and load that if it's available (at least, for us in CodeMirror's codebase it does). What problem does this field solve?

Could you elaborate on that? `npm` itself doesn't do anything with types, and TypeScript will already look for a `.d.ts` file alongside the package's main file, and load that if it's available (at least, for us in CodeMirror's codebase it does). What problem does this field solve?
ifiokjr commented 2019-09-04 17:15:45 +02:00 (Migrated from github.com)

Oh, you're right. I had installed the library and for some reason my editor hadn't registered the types.

Oh, you're right. I had installed the library and for some reason my editor hadn't registered the types.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marijn/w3c-keyname!7
No description provided.