I want to use the toggle-switch-react-native component in my Typescript app. I tried installing it like this:
yarn add toggle-switch-react-native --save
@types/toggle-switch-react-native
However, I still get an error that:
Could not find a declaration file for module 'toggle-switch-react-native'. '/Users/grannyandsmith/insta/app/node_modules/toggle-switch-react-native/ToggleSwitch.js' implicitly has an 'any' type. Try `npm install @types/toggle-switch-react-native` if it exists or add a new declaration (.d.ts) file containing `declare module 'toggle-switch-react-native';`
How can I define its types? Is there an alternate? Am I installing it correctly?