Skip to content

Documentation and typings do not match #3538

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

Closed
1 of 3 tasks
eseliger opened this issue Sep 28, 2017 · 0 comments
Closed
1 of 3 tasks

Documentation and typings do not match #3538

eseliger opened this issue Sep 28, 2017 · 0 comments
Labels
Milestone

Comments

@eseliger
Copy link

This is a:

  • Bug Report
  • Feature Request
  • General Query

My version of UI-Router is: 1.0.6

Bug Report

The documentation says here in the text that every value in the views object must be a Ng1ViewDeclaration. Although, in the example a string is used as well, which works. But the type for views is

views?: {
    [key: string]: Ng1ViewDeclaration;
}

I think the type of values should be Ng1ViewDeclaration | string

Also in StateDeclaration, the return type of redirectTo currently is

RedirectToResult | ((transition: Transition) => Promise<RedirectToResult>);

although the documentation says here it can either be a RedirectToResult, or a function returning either a Promise or a RedirectToResult. So I think it should be

RedirectToResult | ((transition: Transition) => RedirectToResult | Promise<RedirectToResult>);

See also here in core

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

No branches or pull requests

2 participants