Closed kolkov closed 8 years ago
I have built my own version ui-router-ng2 for NG 2.0.0. It's working, but have some errors in tests, because I removed some code for overcome this errors:
src/common/common.ts(521,40): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(value: any, index: number, array: any[]) => void'.
Type 'Function' provides no match for the signature '(value: any, index: number, array: any[]): void'
I removed type Function
from:
function _forEach(obj: (any[]|any), cb, _this: Obj) {
src/common/predicates.ts(7,14): error TS4023: Exported variable 'isDefined' has or is using name 'Predicate' from external module "D:/!Projects/TypeScript/ui-router/ui-router/src/common/common" but cannot be named.
https://github.com/Microsoft/TypeScript/issues/5711
I add unused import:
import {Predicate} from "./common";
src/state/stateService.ts(299,74): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.
https://github.com/Microsoft/TypeScript/issues/2775
I temporarily removed detail
from error.detail
in https://github.com/angular-ui/ui-router/blob/master/src/state/stateService.ts#L299
and stack
from detail.stack
https://github.com/angular-ui/ui-router/blob/master/src/state/stateService.ts#L495
https://github.com/angular-ui/ui-router/blob/master/src/state/stateService.ts#L496
Everything works as it should (tested on quickstart-ng2). I look forward to the new version soon! )))
Thanks! Fixed!