Open ahstro opened 7 years ago
Thanks @twobit but I can't get it to work.
To get the declarations to be recognized at all I had to wrap them in a
declare module 'react-input-autosize' { ... }
But then I get the the type error:
[ts]
Type '{ type: "text"; className: string; spellCheck: false; value: ReactText; onChange: (ev: FormEvent<...' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes
I just created a new NPM module which calculates width of text it works perfect with input and Typescript please check it out:
react-input-autosize
(2.3KB)You can use @types/react-input-autosize
, but hey, it's always better for it to be included in the actual package :)
Would be nice to have a TypeScript declaration file, so us TS folks don't get compile errors 😇