Closed zecergin closed 2 years ago
update to 2.1.2 and see if my recent commit fix ur issue please
Thank you for the update.
Unfortunately, It returns more compile error now.
node_modules/expo-images-picker/src/AssetsSelector.tsx:140:23 - error TS7030: Not all code paths return a value.
140 const getAssets = (first: number) => {
**node_modules/expo-images-picker/src/AssetsSelector.tsx:269:42 - error TS2769: No overload matches this call.**
Overload 1 of 2, '(props: Omit<Omit<ViewProps & RefAttributes<View> & IScreen, never> & Partial<Pick<ViewProps & RefAttributes<View> & IScreen, never>>, "theme"> & { ...; } & { ...; } & { ...; }): ReactElement<...>', gave the following error.
Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
Overload 2 of 2, '(props: StyledComponentPropsWithAs<typeof View, DefaultTheme, IScreen, never, typeof View, typeof View>): ReactElement<StyledComponentPropsWithAs<typeof View, ... 4 more ..., typeof View>, string | JSXElementConstructor<...>>', gave the following error.
Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
269 <Screen bgColor={Styles.bgColor} borderRadius={Styles.borderRadius}>
node_modules/expo-images-picker/src/Types.ts:88:5 88 borderRadius: number
The expected type comes from property 'borderRadius' which is declared here on type 'IntrinsicAttributes & Omit<Omit<ViewProps & RefAttributes<View> & IScreen, never> & Partial<Pick<ViewProps & RefAttributes<...> & IScreen, never>>, "theme"> & { ...; } & { ...; } & { ...; }'
node_modules/expo-images-picker/src/Types.ts:88:5
88 borderRadius: number
The expected type comes from property 'borderRadius' which is declared here on type 'IntrinsicAttributes & Omit<Omit<ViewProps & RefAttributes<View> & IScreen, never> & Partial<Pick<ViewProps & RefAttributes<...> & IScreen, never>>, "theme"> & { ...; } & { ...; } & { ...; }'
node_modules/expo-images-picker/src/AssetsSelector.tsx:293:18 - error TS2769: No overload matches this call.
Overload 1 of 2, '(props: Omit<Omit<ViewProps & RefAttributes
293
node_modules/expo-images-picker/src/Types.ts:88:5
88 borderRadius: number
'borderRadius' is declared here.
node_modules/expo-images-picker/src/Types.ts:88:5 88 borderRadius: number
'borderRadius' is declared here.
**node_modules/expo-images-picker/src/AssetsSelector.tsx:304:21 - error TS2769: No overload matches this call.**
Overload 1 of 2, '(props: Omit<Omit<ViewProps & RefAttributes<View> & IWidget, never> & Partial<Pick<ViewProps & RefAttributes<View> & IWidget, never>>, "theme"> & { ...; } & { ...; } & { ...; }): ReactElement<...>', gave the following error.
Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
Overload 2 of 2, '(props: StyledComponentPropsWithAs<typeof View, DefaultTheme, IWidget, never, typeof View, typeof View>): ReactElement<StyledComponentPropsWithAs<typeof View, ... 4 more ..., typeof View>, string | JSXElementConstructor<...>>', gave the following error.
Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
304 borderRadius={Styles.borderRadius}
node_modules/expo-images-picker/src/Types.ts:93:5 93 borderRadius: number
The expected type comes from property 'borderRadius' which is declared here on type 'IntrinsicAttributes & Omit<Omit<ViewProps & RefAttributes<View> & IWidget, never> & Partial<Pick<ViewProps & RefAttributes<...> & IWidget, never>>, "theme"> & { ...; } & { ...; } & { ...; }'
node_modules/expo-images-picker/src/Types.ts:93:5
93 borderRadius: number
The expected type comes from property 'borderRadius' which is declared here on type 'IntrinsicAttributes & Omit<Omit<ViewProps & RefAttributes<View> & IWidget, never> & Partial<Pick<ViewProps & RefAttributes<...> & IWidget, never>>, "theme"> & { ...; } & { ...; } & { ...; }'
node_modules/expo-images-picker/src/AssetsSelector.tsx:310:25 - error TS2322: Type '(first: number) => Promise
310 getMoreAssets={getAssets}
node_modules/expo-images-picker/src/Types.ts:154:5
154 getMoreAssets(): void
The expected type comes from property 'getMoreAssets' which is declared here on type 'IntrinsicAttributes & AssetListPropTypes'
Found 5 errors.
fix that on the last pr , give it a test and update me
This should be the last one.
i think its related to the noImplicitReturns ugly rule i add an extra empty return for the first if statement ,
lets see if the 2.2.1 fix that build issue , please update me after u try
generally what happen is that your linting stage do not allow u to build , because the code is not passing "noImplicitReturns": true, you could
update to my last version where i extra add else with empty return just to skip this
or try turn off this rule on your tsconfig .
please update me when u got some results , thx
Please see the pull request "Return always a value in function to satisfy 'noImplicitReturns' rule". It resolves the issue.
ok thx @zecergin
please update if v 2.2.3 fix this issue
The issue is fixed, thank you.
For version 2.1.0, expo upgrades typescript to 4.3.5 which leads to have a problem on skipLibCheck and exclude. Therefore, I am having a compile error in node_modules/expo-images-picker/src/AssetsSelector.tsx:140:23 because getAssets = (first: number = 100) does not return a value for all paths.
That would be greate if you can help us on this.
Thanks.