react-image-filter icon indicating copy to clipboard operation
react-image-filter copied to clipboard

Add typescript support

Open wsdt opened this issue 6 years ago • 1 comments
trafficstars

wsdt avatar Oct 12 '19 17:10 wsdt

A handy quick hack tips to use this in Typescript:

  1. import ImageFilter from 'react-image-filter' in your ReactJS class/function
  2. make a new directory and file in /src/@types/alltypes.d.ts
  3. Fill with declare module 'react-image-filter'
  4. Open your tsconfig.json
  5. Add "typeRoots" : ["src/@types", "./node_modules/@types"], in your compilerOptions
  6. SetnoImplicitAny to "noImplicitAny": false,
  7. It works!

dkhd avatar Aug 31 '21 10:08 dkhd