-
Notifications
You must be signed in to change notification settings - Fork 165
If there are typescript typings for this module, it would be nice if it were in the readme #139
Comments
sure, please make a PR. |
There currently cannot be types for this module because DefinitelyTyped (who controls the @types/ on npm) will not let any non-lowercase modules made, this means even if it was added (as jsonstream lowercase) it wouldn't work :(. See: #128 |
@EricByers ah you are under the mistaken impression that you need to publish to All you need to do is include the *.d.ts files in this project itself, when publishing to NPM. You almost certainly need just one .d.ts file, let's say index.d.ts. And then in your package.json, point "types" or "typings" properties to the main exported types file, let's say "index.d.ts". Make sense? So how it works, is I |
To further elucidate, I get this error when transpiling with TS:
so all you need to do is generate index.d.ts, and you will be good to go :) |
I understand that process, I just wasn't expecting the app owner to accept it in and maintain it, most repos if they are not already written in TS. |
If you're willing to have it as any, you can import it as that way, and not worry about types at all. TS added support a few versions back. |
I think he made it clear that we could submit a PR to create index.d.ts, without turning index.js into index.ts. |
If there are TS typings for this, it would help to document that something like so:
install
install types
if there are not types, then this is a feature request for TS typings!
The text was updated successfully, but these errors were encountered: