Angular-ui-router typescript definitions

Viewed 4967

When we updated our app to use angular-ui-router v1.0.3 we got some problems with the typescript definitions. Since we were using the $stateChangeSuccess event the migration guide told us that we now should use the TransitionService.onSuccess

When everything is compiled to js it works fine, but the problem is that TransitionService do not exist in the Typescript definition file (downloaded using npm/@types) giving us trouble when building.

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular-ui-router

By looking in the ui-router source folder within the node_modules folder I can see that there already exist typescript definition files for the source.

  1. So are the typescript definitions for @types/angular-ui-router missing the TransitionService?
  2. Or should I use the definition files provided with the source? (If so, how?)
  3. Some other way?

angular-ui-router api TransitionService: https://ui-router.github.io/ng1/docs/latest/classes/transition.transitionservice.html.

1 Answers
Related