I'm trying to create a type definition file for react-native-checkbox. Here's what I have in the .d.ts
file:
declare module '@react-native-community/checkbox' { import * as React from 'react'; interface CheckBoxProps { disabled?: boolean; value?: boolean; tintColors?: { true?: string; false?: string; }; onChange?: () => void; onValueChange?: (value: boolean) => void; } export class CheckBox extends React.Component<CheckBoxProps> {}}
But, when I use the <CheckBox />
in my screens, I get the following error:
JSX element type 'CheckBox' does not have any construct or call signatures.ts(2604)
What am I missing?