router: 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 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

About this issue

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

Most upvoted comments

Thanks for the initial investigation @davismj