react-url-query
react-url-query copied to clipboard
Typescript?
Excited to use this library! Would it be possible to get a Typescript definition for it? Running into Could not find a declaration file for module 'react-url-query'
Happy to merge a PR with it, I don't have much TypeScript experience.
I've created the typings for my own project, so will try to finalise them over the coming week and submit a PR.
@pbeshai would you rather maintain the typings file as part of react-url-query
or do you prefer to have it defined in https://github.com/DefinitelyTyped/DefinitelyTyped?
For what it's worth, I'm a fan of projects that include typings in their repos. Much easier to keep types in step with the code, and package.json would become massive and unweildy if every packaged force you to have a mirror type package.
@kujon Were you ever able to finalize your typings for a PR by chance?
I'll probably get to this soon... for now I'm just doing the following in a TypeScript project:
declarations.d.ts
declare module "react-url-query";
Just getting my feet wet, but hope to have something soon!
@u10int we did finalise it to the point where they are useful inside of our company but very lacking in other areas.
I'm not happy enough with it to make it part of this repo or DefinitelyTyped, but feel free to use it as a starting point.
Here's the Gist: https://gist.github.com/kujon/c84b47573af7900fd9467f2d022f2427
Update here, sorry I haven't gotten around to updating this library yet to have types. I've put together a new lib using hooks that is written in TypeScript:
https://github.com/pbeshai/use-query-params
Should be able to port some of the typing I did there to this library