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

fix(nav): Explicitly type the promise returned #12235

Closed
wants to merge 2 commits into from
Closed

fix(nav): Explicitly type the promise returned #12235

wants to merge 2 commits into from

Conversation

RoopeHakulinen
Copy link

Short description of what this resolves:

Explicitly types the promise returned by goToRoot method. Since the type of Promise.reject() is deduced to be of type Promise<never> by TypeScript it fails to compile as the classes extending the class (Nav and Tabs) are typed as Promise<any>.

This problem only happens in TS 2.4 as there were improvements on inference for generics.

Changes proposed in this pull request:

  • Explicitly type the promise returned by goToRoot method as Promise<any> instead of automatically deduced Promise<never>.

Ionic Version: 3.x

Fixes: #12233

@RoopeHakulinen RoopeHakulinen deleted the patch-1 branch July 11, 2017 09:02
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

Successfully merging this pull request may close these issues.

1 participant