From b44096451d4fed81be7f08b0edf638e4a1c42ccd Mon Sep 17 00:00:00 2001 From: stropho <3704482+stropho@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:33:18 +0200 Subject: [PATCH] chore: fixed types (#1123)(by @stropho) * fix: react 18 types --- package.json | 10 ++++++++++ src/components/bottomSheet/types.d.ts | 2 +- src/components/bottomSheetFooter/types.d.ts | 2 +- src/components/bottomSheetModal/types.d.ts | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0b61a5bf1..c1587034c 100644 --- a/package.json +++ b/package.json @@ -67,11 +67,21 @@ "typescript": "4.9.4" }, "peerDependencies": { + "@types/react": "*", + "@types/react-native": "*", "react": "*", "react-native": "*", "react-native-gesture-handler": ">=2.9.0", "react-native-reanimated": ">=3.0.0" }, + "peerDependenciesMeta": { + "@types/react-native": { + "optional": true + }, + "@types/react": { + "optional": true + } + }, "react-native-builder-bob": { "source": "src", "output": "lib", diff --git a/src/components/bottomSheet/types.d.ts b/src/components/bottomSheet/types.d.ts index c5f38d3c7..b9cca0930 100644 --- a/src/components/bottomSheet/types.d.ts +++ b/src/components/bottomSheet/types.d.ts @@ -273,7 +273,7 @@ export interface BottomSheetProps footerComponent?: React.FC; /** * A scrollable node or normal view. - * @type React.ReactNode[] | React.ReactNode + * @type React.ReactNode */ children: React.ReactNode; //#endregion diff --git a/src/components/bottomSheetFooter/types.d.ts b/src/components/bottomSheetFooter/types.d.ts index f523065f7..456322058 100644 --- a/src/components/bottomSheetFooter/types.d.ts +++ b/src/components/bottomSheetFooter/types.d.ts @@ -31,7 +31,7 @@ export interface BottomSheetDefaultFooterProps extends BottomSheetFooterProps { /** * Component to be placed in the footer. * - * @type {ReactNode | ReactNode[]} + * @type {ReactNode|ReactNode[]} */ children?: ReactNode | ReactNode[]; } diff --git a/src/components/bottomSheetModal/types.d.ts b/src/components/bottomSheetModal/types.d.ts index 9d104e74b..fc1d90817 100644 --- a/src/components/bottomSheetModal/types.d.ts +++ b/src/components/bottomSheetModal/types.d.ts @@ -44,10 +44,10 @@ export interface BottomSheetModalProps /** * A scrollable node or normal view. - * @type React.ReactNode[] | React.ReactNode + * @type React.ReactNode[] | React.ReactNode | (({ data: any }?) => React.ReactElement) */ children: - | (({ data: any }?) => React.ReactNode) + | (({ data: any }?) => React.ReactElement) | React.ReactNode[] | React.ReactNode; }