You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#4173 introduced ts-ignore comments in AllProps type. These are stripped in d.ts files, so now when library is used in a project, we get these errors:
node_modules/native-base/lib/typescript/theme/types.d.ts:11:205 - error TS2536: Type '"scale"' cannot be used to index type 'T[key]'.
11 [key in Extract<keyof T, string>]?: T[key] extends boolean ? GetRNStyles<key> : key extends 'shadow' ? GetRNStyles<null, 'shadows'> : 'property' extends keyof T[key] ? GetRNStyles<T[key]['property'], T[key]['scale']> : 'properties' extends keyof T[key] ? T[key]['properties'] extends {
~~~~~~~~~~~~~~~
node_modules/native-base/lib/typescript/theme/types.d.ts:13:21 - error TS2536: Type '"0"' cannot be used to index type 'T[key]["properties"]'.
13 } ? GetRNStyles<T[key]['properties']['0'], T[key]['scale']> : unknown : unknown;
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/native-base/lib/typescript/theme/types.d.ts:13:48 - error TS2536: Type '"scale"' cannot be used to index type 'T[key]'.
13 } ? GetRNStyles<T[key]['properties']['0'], T[key]['scale']> : unknown : unknown;
~~~~~~~~~~~~~~~
Describe the bug
#4173 introduced ts-ignore comments in AllProps type. These are stripped in d.ts files, so now when library is used in a project, we get these errors:
To Reproduce
Steps to reproduce the behaviour:
npx react-native init MyApp --template react-native-template-native-base-typescript
yarn tsc
The text was updated successfully, but these errors were encountered: