diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7b9e9ea --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Deploy Docs Typecheck + +on: + push: + branches: + - feature-v1.0b_mono + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + name: Build Expo docs + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + + - name: Install dependencies + run: npm i + + - name: Typecheck docs + run: npm run typecheck -w docs diff --git a/.nvmrc b/.nvmrc index 67e145b..c004e35 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.18.0 +v22.20.0 diff --git a/workspaces/docs/types/react-native-web.d.ts b/workspaces/docs/types/react-native-web.d.ts new file mode 100644 index 0000000..b5d9f13 --- /dev/null +++ b/workspaces/docs/types/react-native-web.d.ts @@ -0,0 +1,30 @@ +import 'react-native'; +import 'react-native/Libraries/Components/Pressable/Pressable'; +import 'react-native/Libraries/StyleSheet/StyleSheetTypes'; + +declare module 'react-native/Libraries/Components/Pressable/Pressable' { + interface PressableStateCallbackType { + readonly hovered?: boolean; + readonly focused?: boolean; + } +} + +declare module 'react-native/Libraries/StyleSheet/StyleSheetTypes' { + interface ViewStyle { + transitionDuration?: string | number; + transitionProperty?: string; + transitionTimingFunction?: string; + } + + interface TextStyle { + transitionDuration?: string | number; + transitionProperty?: string; + transitionTimingFunction?: string; + } + + interface ImageStyle { + transitionDuration?: string | number; + transitionProperty?: string; + transitionTimingFunction?: string; + } +}