expo / router

[ARCHIVE]: Expo Router has moved to expo/expo -- The File-based router for universal React Native apps
https://docs.expo.dev/routing/introduction/
1.36k stars 113 forks source link

fix(router): accept options function #934

Closed vilnytskyi closed 2 months ago

vilnytskyi commented 2 months ago

Screen options prop is missing function type

Motivation

TypeScript is currently prohibiting usage of options prop as a function, to configure options depending on route instance. Note that it's solely typing issue, the library itself supports it (see useScreens.tsx)

Execution

Adjusted type according to original @react-navigation/core types

Test Plan

No tests required for this typing fix