Skip to content

Commit

Permalink
adds a static check on calling navigate to a screen without child-screen
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasloisp committed May 10, 2024
1 parent 5ef8f32 commit 9b53010
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions example/__typechecks__/static.check.tsx
Expand Up @@ -120,6 +120,7 @@ navigation.navigate('Register', { method: 'token' });
/**
* Infer params from nested navigator
*/
navigation.navigate('Home'); // Navigate to screen without specifying a child screen
navigation.navigate('Home', { screen: 'Groups' });
navigation.navigate('Home', { screen: 'Chat', params: { id: 123 } });

Expand Down

0 comments on commit 9b53010

Please sign in to comment.