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 field to package.json #661

Merged
merged 1 commit into from
Mar 27, 2023
Merged

Add types field to package.json #661

merged 1 commit into from
Mar 27, 2023

Conversation

andersk
Copy link
Contributor

@andersk andersk commented Mar 25, 2023

https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package

Fixes this error:

$ npm i simplebar
$ tsc --init
$ echo 'import SimpleBar from "simplebar"' > test.ts
$ tsc
test.ts:1:23 - error TS7016: Could not find a declaration file for module 'simplebar'. '/tmp/test/node_modules/simplebar/dist/index.cjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/simplebar` if it exists or add a new declaration (.d.ts) file containing `declare module 'simplebar';`

1 import SimpleBar from "simplebar"
                        ~~~~~~~~~~~


Found 1 error in test.ts:1

@Grsmto
Copy link
Owner

Grsmto commented Mar 27, 2023

Thanks @andersk 🙏

@Grsmto Grsmto merged commit 55665f7 into Grsmto:master Mar 27, 2023
@Grsmto
Copy link
Owner

Grsmto commented Mar 27, 2023

Published 6.2.3.

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

Successfully merging this pull request may close these issues.

2 participants