redux-subscriber icon indicating copy to clipboard operation
redux-subscriber copied to clipboard

[Question]: TypeScript types?

Open vhesener opened this issue 5 years ago • 5 comments
trafficstars

Feel free to remove this issue, but I wasn't sure where to ask questions. I noticed there are no types in DefinitelyTyped. Have you heard of anyone that has created TS types for this API already? As a truly lazy dev, I'd like to reuse and recycle :)

vhesener avatar May 06 '20 15:05 vhesener

It's your lucky day! I just submitted a PR to DefinitelyTyped with type definitions for this library. https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44534

thisissami avatar May 07 '20 06:05 thisissami

Awesome! Yea I couldn't help myself and was playing around with this myself. I came up with basically the same thing, minus the tests. Thanks for the quick turnaround!

vhesener avatar May 07 '20 17:05 vhesener

@ivantsov - the team at DefinitelyTyped (the typescript definitions library) have a question about your intent with the current definition file in your repo (since it hasn't been published in NPM). Could you answer them? https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44534#issuecomment-626300879

thisissami avatar May 11 '20 05:05 thisissami

Hey @thisissami, TS file was added by this PR https://github.com/ivantsov/redux-subscriber/pull/6. It was a contribution from one of the users. I don't have any plans for adding TS support for this package, but would check a PR.

ivantsov avatar May 11 '20 14:05 ivantsov

@ivantsov the typing file is not present once installed - you can go to node_modules of redux-subscriber and the index.d.ts is not present neither in root or lib dirs.

edited: link to publishing npm module with type: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

EdmundasR avatar Dec 07 '21 13:12 EdmundasR