Use @types/react-native-calendars instead of default react-native-calendars types
See original GitHub issueDescription
Default typescript types from react-native-calendars
are not correct. I want to use @types/react-native-calendars
, because this lib define types right
Expected Behavior
Correctly define types for lib
Observed Behavior
react-native-calendars
not correctly define types, some types are incorrect or marked with any
. @types/react-native-calendars
does not replace them after installation
Environment
"react-native": "0.64.1"
"react-native-calendars": "^1.1255.0"
"@types/react-native": "^0.64.0"
"@types/react-native-calendars": "^1.505.2"
Reproducible Demo
error TS2305: Module '"react-native-calendars"' has no exported member 'DayComponentProps'.
3 import {DayComponentProps} from 'react-native-calendars';
~~~~~~~~~~~~~~~~~
error TS2305: Module '"react-native-calendars"' has no exported member 'DateObject'.
3 import {DateObject} from 'react-native-calendars';
~~~~~~~~~~
[01:21:39] Found 2 errors. Watching for file changes.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:6
Top Results From Across the Web
react-native-calendars - npm
React Native Calendars 🗓️ 📆 This module includes various customizable React-Native calendar components. The package is both Android and iOS compatible.
Read more >@types/react-native-calendars | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >Performant rendering and Typescript typings with Wix's React ...
Boost rendering performance when using custom components with Wix's React Native Calendar library, and some other challenges.
Read more >https://cdn.jsdelivr.net/npm/@types/react-native-c...
Type definitions for react-native-calendars 1.20 // Project: https://github.com/wix/react-native-calendars#readme // Definitions by: Tyler Zhang ...
Read more >wix calendar react native
Нужна помощь в доработке календаря на React Native (wix/react-native-calendars) + консультации. If you'd like to use React Native Navigation by Wix, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A better workaround, esp. if you want to use recent version, is to just add this to your tsconfig.json:
This tells TS to use @types/react-native-calendars instead of the inbuilt types which break everything.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.