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

Include TypeScript type definitions #64

Open
ghost opened this issue May 25, 2023 · 4 comments
Open

Include TypeScript type definitions #64

ghost opened this issue May 25, 2023 · 4 comments

Comments

@ghost
Copy link

ghost commented May 25, 2023

Is your feature request related to a problem? Please describe.
Without TypeScript support / type safety, it's more difficult and error-prone to use, and one needs to refer to documentation more often.

Describe the solution you'd like
Ideally, having the type definitions available on installation.

Describe alternatives you've considered
The option that users seem to go for currently is manually adding the type definitions after installing the library and maintaining them, which is doable, but not very convenient.

Additional context
This was requested previously in natergj#188 and some definitions are available there, but it would be nicer if the support was available out-of-the-box. Thank you!

@rathoddeepak
Copy link

rathoddeepak commented Jul 10, 2023

https://gist.github.com/rathoddeepak/347b0dd91617076433f3242efbbcddbd

Create a folder typings in root dir
add this file and add

{
   "compilterOptions": {},
   "include": ["typings/**/*.ts"]
}

this to your tsconfig.json

@idchlife
Copy link

Why not upload types to DefinetelyTyped?

@clopezpro
Copy link

https://gist.github.com/rathoddeepak/347b0dd91617076433f3242efbbcddbd

Cree una carpeta escribiendo en el directorio raíz, agregue este archivo y agregue

{
   "compilterOptions": {},
   "include": ["typings/**/*.ts"]
}

esto a tu tsconfig.json

I did it with nuxt but it doesn't work

@Roman991
Copy link

https://gist.github.com/rathoddeepak/347b0dd91617076433f3242efbbcddbd

Create a folder typings in root dir add this file and add

{
   "compilterOptions": {},
   "include": ["typings/**/*.ts"]
}

this to your tsconfig.json

maybe make a PR, it will be also easier to find it

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

4 participants