Closed douira closed 2 years ago
I just noticed this might be slightly unnecessary as there are already typed on DefinitelyTyped. idk, you decide if you want to have this.
Is it better to have it in the library itself instead of in DefinitelyTyped? I don't use TypeScript so I'm not sure what the best practice is here.
You need to install an @type package additionally if it's published by DefinitelyTyped. (you can also publish it to @type/... yourself I think) If it's in the package itself the maintainer may have a better idea of what the types should be (and more control). Right now types can be downloaded on DefinitelyTyped so there's no problem really.
I'd say in general it's better to have it in the library itself when possible, as you don't need to keep two separate repos (one of them a ridiculous monorepo in DefinitelyTyped/types)
This PR simply adds a small declaration file that declares the types of the methods exposed by the exported object.