Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS][v4] Cannot find name 'NavigationStackScreenOptions' #6276

Closed
retyui opened this issue Sep 9, 2019 · 1 comment
Closed

[TS][v4] Cannot find name 'NavigationStackScreenOptions' #6276

retyui opened this issue Sep 9, 2019 · 1 comment

Comments

@retyui
Copy link
Contributor

retyui commented Sep 9, 2019

This commit chore: prepare for 4.x removed too a lot types

Current Behavior

When I run a command tsc --noEmit I get next errors:

node_modules/react-navigation/typescript/react-navigation.d.ts:197:41 - error TS2304: Cannot find name 'NavigationStackScreenOptions'.

197   export type NavigationScreenOptions = NavigationStackScreenOptions &
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-navigation/typescript/react-navigation.d.ts:198:5 - error TS2304: Cannot find name 'NavigationTabScreenOptions'.

198     NavigationTabScreenOptions &
        ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-navigation/typescript/react-navigation.d.ts:199:5 - error TS2304: Cannot find name 'NavigationDrawerScreenOptions'.

199     NavigationDrawerScreenOptions;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/react-navigation/typescript/react-navigation.d.ts:477:7 - error TS2304: Cannot find name 'NavigationBottomTabScreenOptions'.

477       NavigationBottomTabScreenOptions
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 4 errors.

Expected Behavior

Typings in node_modules don't have errors

Your Environment

software version
react-navigation 4.0.0
react-native 0.60.0
node 12
yarn 1.17.3
@alradadi
Copy link

alradadi commented Sep 9, 2019

they've shifted things around with v4. The type you're looking for should be in react-navigation-stack now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants