question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

navigateToRoute return signature change - no longer a Promise?

See original GitHub issue
  • Overview of the Issue: router navigateToRoute() previously has a return signature type of Promise<PipelineResult | boolean>, then NavigationResult and most recently boolean (version 1.7.1).
  • Motivation or Use Case:
    • Upgrading from earlier versions to latest results in build failure in projects enforcing tslint rule “await-promise”.
    • Code relying upon navigateToRoute as an awaitable function require refactoring
  • Library Name and Version(s): aurelia-router, router.ts version 1.7.1 (current)
  • Browsers and Operating System: N/A (build issue)
  • Reproduce the Error: Build an application with lines below using aurelia-router version 1.7.1 and tslint “await-promise” rule turned on
  • Related Issues: None found
  • Suggest a Fix: Revert return signature change, or explain reason for change to return type boolean.

https://github.com/aurelia/router/blob/893b768f01aea842ee57db4222e66aa572f24404/dist/aurelia-router.d.ts#L300

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
matthewcorvencommented, Aug 15, 2019

Thanks for the initial investigation @davismj

1reaction
EisenbergEffectcommented, Aug 15, 2019

Ping @davismj

Read more comments on GitHub >

github_iconTop Results From Across the Web

navigateToRoute return signature change - no longer a Promise?
Overview of the Issue: router navigateToRoute() previously has a return signature type of Promise<PipelineResult | boolean> , then NavigationResult and most ...
Read more >
Aurelia - waiting for a promise to return in the router prerender ...
Longer version: I have a prerender step in my router that checks whether the user is enabled for a particular module before rendering...
Read more >
Router - Angular
A handler for errors thrown by Router.parseUrl(url) when url contains an invalid character. The most common case is a % sign that's not...
Read more >
Details on using e-signatures for certain forms - IRS
Understanding the importance of electronic signatures to the tax community ... for Change in Accounting Method;; Form 3520, Annual Return To ...
Read more >
Angular Router: Navigation Using RouterLink, Navigate, or ...
navigate and Router.navigateByUrl . Both methods return a promise that resolves to true if the navigation is successful, null if there's no ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found