Closed rugglcon closed 5 years ago
Hi, I'm not familiar with Typescript. This project is full Javascript. I don't know if adding an index.d.ts would be beneficial and I don't even know what to put in it. Can you link me to some resources?
So after looking at the code, it would be relatively difficult. You’d have to do it manually, but here’s a link to the documentation on typings files. https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html
Hi @rugglcon, I just read the initial part and they specifically require a medium level of Typescript knowledge to understand the parts later on. I don't have it.
I don't think it's really necessary to add this index.d.ts, but you can do it and then explain to me how can it be helpful.
Thanks!
Yeah sure, I can open up a PR with it explaining what it's use is but I can give a brief explanation now.
Essentially all it would do is give type validation for using this library with TypeScript. What I could also do is open a PR with DefinitelyTyped for this library so it could be installed with npm install --save-dev @types/pokeapi-js-wrapper
and then it doesn't have to be merged into this repo.
Let me know what you would prefer, since this really would have no impact on the functionality of the project, just eases use with TypeScript. Thanks!
@rugglcon, feel free to help this project wherever you feel is better. I will definitely allow new contribution!
Could a typings file be made for this project so it's easier used with TypeScript? I'd also be willing to work on this if everyone is too busy to do it.