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
The type of NativeStackNavigatorProps is not narrowed down to only known props and does not generate a ts error when unknown props are specified to the Navigator component:
The above code does not throw any ts error, even though whatever and unknownProp are not props of Navigator.
I believe this is caused by NativeStackNavigationConfig which is defined as Record<string, unknown> and then used to build the NativeStackNavigatorProps type.
NativeStackNavigationConfig does not seem to be used anywhere in the codebase, I was going to send a PR just deleting it but I'm not sure about the implications of doing so.
Expected behavior
Navigator throws a ts error when unknown props are specified
Actual behavior
Navigator does not throw a ts error when unknown props are specified
Package versions
React: 16.13.1
React Native: 0.63.2
React Native Screens: 2.16.1
The text was updated successfully, but these errors were encountered:
Description
The type of
NativeStackNavigatorProps
is not narrowed down to only known props and does not generate a ts error when unknown props are specified to the Navigator component:The above code does not throw any ts error, even though
whatever
andunknownProp
are not props of Navigator.I believe this is caused by NativeStackNavigationConfig which is defined as
Record<string, unknown>
and then used to build theNativeStackNavigatorProps
type.NativeStackNavigationConfig
does not seem to be used anywhere in the codebase, I was going to send a PR just deleting it but I'm not sure about the implications of doing so.Expected behavior
Navigator throws a ts error when unknown props are specified
Actual behavior
Navigator does not throw a ts error when unknown props are specified
Package versions
The text was updated successfully, but these errors were encountered: