Open lucksp opened 11 months ago
We are getting tsc errors in the library, even though we're not supposed to check for node_modules:
tsc
node_modules
node_modules/react-native-paper/src/components/Icon.tsx:96:8 - error TS2769: No overload matches this call. Overload 1 of 2, '(props: ImageProps | Readonly<ImageProps>): Image', gave the following error. Type '{ accessibilityIgnoresInvertColors: true; role: string; focusable: boolean; accessibilityElementsHidden?: undefined; importantForAccessibility?: undefined; source: any; style: ({ transform: { ...; }[]; } | { ...; })[]; allowFontScaling?: boolean | undefined; } | { ...; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Image> & Readonly<ImageProps>'. Type '{ accessibilityIgnoresInvertColors: true; role: string; focusable: boolean; accessibilityElementsHidden?: undefined; importantForAccessibility?: undefined; source: any; style: ({ transform: { ...; }[]; } | { ...; })[]; allowFontScaling?: boolean | undefined; }' is not assignable to type 'Readonly<ImageProps>'. Types of property 'role' are incompatible. Type 'string' is not assignable to type 'Role | undefined'. Overload 2 of 2, '(props: ImageProps, context: any): Image', gave the following error. Type '{ accessibilityIgnoresInvertColors: true; role: string; focusable: boolean; accessibilityElementsHidden?: undefined; importantForAccessibility?: undefined; source: any; style: ({ transform: { ...; }[]; } | { ...; })[]; allowFontScaling?: boolean | undefined; } | { ...; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Image> & Readonly<ImageProps>'. Type '{ accessibilityIgnoresInvertColors: true; role: string; focusable: boolean; accessibilityElementsHidden?: undefined; importantForAccessibility?: undefined; source: any; style: ({ transform: { ...; }[]; } | { ...; })[]; allowFontScaling?: boolean | undefined; }' is not assignable to type 'Readonly<ImageProps>'. Types of property 'role' are incompatible. Type 'string' is not assignable to type 'Role | undefined'. 96 <Image ~~~~~ node_modules/react-native-paper/src/components/TextInput/Adornment/TextInputAdornment.tsx:9:32 - error TS2307: Cannot find module 'src/types' or its corresponding type declarations. 9 import type { ThemeProp } from 'src/types'; ~~~~~~~~~~~ node_modules/react-native-paper/src/components/TextInput/TextInputFlat.tsx:14:32 - error TS2307: Cannot find module 'src/types' or its corresponding type declarations. 14 import type { ThemeProp } from 'src/types'; ~~~~~~~~~~~
If I reference the errors within react-native-paper-dropdown, the following Dropdown.d.ts file shows errors related to:
react-native-paper-dropdown
Dropdown.d.ts
import { Theme } from "react-native-paper/lib/typescript/types"; import { TextInputProps } from "react-native-paper/lib/typescript/components/TextInput/TextInput";
As you can see in react-native-paper npm package, the lib directory does not match with actual:
react-native-paper
lib
The TextInputProps should be:
TextInputProps
import { TextInputProps } from "react-native-paper";
There is no Theme in the react-native-paper anymore
Theme
We are getting
tsc
errors in the library, even though we're not supposed to check fornode_modules
:If I reference the errors within
react-native-paper-dropdown
, the followingDropdown.d.ts
file shows errors related to:As you can see in
react-native-paper
npm package, thelib
directory does not match with actual:The
TextInputProps
should be:There is no
Theme
in thereact-native-paper
anymore