Skip to content

navigateToRoute return signature change - no longer a Promise? #648

@matthewcorven

Description

@matthewcorven
  • 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.

navigateToRoute(route: string, params?: any, options?: NavigationOptions): boolean;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions