sturmenta / react-web-vector-icons

(out of maintenance) a minimized version of react-native-vector-icons for use in web
MIT License
38 stars 11 forks source link

React-web-Vector-icons types issue for typescript #34

Open azeem-sarwar opened 2 years ago

azeem-sarwar commented 2 years ago

34 I have install this library in typescrip genrate an error of types

TS7016: Could not find a declaration file for module 'react-web-vector-icons'. '/Users/apple/Documents/GitHub/ProjectAliance/node_modules/react-web-vector-icons/dist/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/react-web-vector-icons if it exists or add a new declaration (.d.ts) file containing declare module 'react-web-vector-icons';

azeem-sarwar commented 2 years ago

i hav add file of #.d.ts anf have following code it help me to solve types problem ` declare module 'react-web-vector-icons' {

export default function Icon({name,size,color,font}:icon):any; } // import Icon from './src/index'

interface icon { name: string, size: number, color: string, font:string, }

`