Re:Using TypeScript with React
by AgentME on Thursday August 22, 2019 @04:49PM
(#20772228)
Make a <library-name>.d.ts file somewhere in your repo, and make its contents be `declare module 'library-name';`. This will make Typescript treat the library and all of its exports as any-typed. If you find it useful to, over time you can fill in the .d.ts file with actual type information, and then maybe submit it to DefinitelyTyped when you think it's complete.
[ Parent
| on HN ]
There are no comments on this comment yet.