Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "types" to package.json #16

Closed
omichelsen opened this issue Aug 28, 2019 · 3 comments
Closed

Add "types" to package.json #16

omichelsen opened this issue Aug 28, 2019 · 3 comments

Comments

@omichelsen
Copy link

Right now the TypeScript definition is not getting picked up.

Adding "types": "index.d.ts" to package.json should fix this.

@sindresorhus
Copy link
Owner

TS supports automatically picking up a index.d.ts in root.

@sindresorhus
Copy link
Owner

Either there’s a bug in TS or a problem in your tsconfig.

@omichelsen
Copy link
Author

omichelsen commented Aug 29, 2019

Apparently. With a default tsconfig it does not work. You have to specify "moduleResolution": "node".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants