react-textfit icon indicating copy to clipboard operation
react-textfit copied to clipboard

Problem with TypeScript

Open kayoroxa opened this issue 4 years ago • 3 comments

image "npm i --save-dev @types/react-textfit" Doesn't work..

kayoroxa avatar Dec 12 '20 21:12 kayoroxa

Commenting as I've had the same issue and have been unable to resolve.

jess-maldonado avatar Dec 15 '20 21:12 jess-maldonado

basically if its lacks of types just make your own types or just declare them as 'any' for now:

  1. create file react-textfit.d.ts in your typings folder with should be configured with your tsconfig
  2. declare module 'react-textfit'; save and thats all

ceboola avatar Dec 26 '20 14:12 ceboola

const Textfit=  require('react-textfit');

and install npm i --save @types/node and wait until ts is supported is what i do always when i intergrate jsx component without definition type.

c0ncentus avatar Mar 17 '21 11:03 c0ncentus