升级到 ui-router 1+ - 输入错误

Upgrading to ui-router 1+ - Typings errors

我正在将 AngularJS (1.5) 应用程序从 ui-router 0.2.18 升级到 @uirouter/angularjs 1.0.7,我假设是, 打字错误。

之前一切正常,现在就是不行了

错误:

ERROR in /node_modules/@uirouter/core/lib/transition/transition.d.ts
(421,59): error TS2304: Cannot find name 'undefined'.

ERROR in
/node_modules/@uirouter/core/lib/transition/interface.d.ts
(744,41): error TS2304: Cannot find name 'undefined'.

ERROR in
/node_modules/@uirouter/core/lib/common/coreservices.d.ts
(10,62): error TS2304: Cannot find name 'never'.

ERROR in
/node_modules/@uirouter/core/lib/path/pathNode.d.ts
(59,61): error TS1110: Type expected.

ERROR in
/node_modules/@uirouter/core/lib/common/common.d.ts
(10,14): error TS2304: Cannot find name 'object'.

package.json:

"devDependencies": {
    "@uirouter/angularjs": "^1.0.7",
    "angular": "1.5.0",

    ...

    "typescript": "1.8.10"

    ...
    }

tsconfig:

{
"compilerOptions": {
    "target": "ES6",
    "module": "commonjs",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "moduleResolution": "node"
},
"compileOnSave": false,
"buildOnSave": false,
"atom": { "rewriteTsconfig": false },
"filesGlob": [
    "**/*.ts"
]

}

模块初始化:

...
import uiRouter from '@uirouter/angularjs';
...

angular
    .module('app', [
        ...
        uiRouter
        ....
    ]);

好的,解决了。我将 TypeScript 更新到版本 2+。

真的很傻