talalmajali / react-native-countdown-component

React Native CountDown
MIT License
272 stars 235 forks source link

@Types for TypeScript projects #91

Open gabrielgaava opened 3 years ago

gabrielgaava commented 3 years ago

I'm having some issue with types in an TypeScript project. I think that would be great for some people that are in the same scenario.

Error message: Could not find a declaration file for module 'react-native-countdown-component'. appFolder/node_modules/react-native-countdown-component/index.js' implicitly has an 'any' type. Try npm install @types/react-native-countdown-component if it exists or add a new declaration file.

weisensee commented 3 years ago

👍 I've got the same issue

coy123 commented 3 years ago

I got the same issue here. Workaround until types is declared: const CountDown = require('react-native-countdown-component').default;

ktamir commented 3 years ago

FYI - I opened a PR on DefinitelyTyped: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/54642