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

时间:2018-02-22 13:33:00

标签: angularjs typescript angular-ui-router typescript-typings

我正在将一个AngularJS(1.5)应用程序从ui-router 0.2.18升级到@ uirouter / angularjs 1.0.7而且我得到了,我认为是,打字错误。

之前一切都很好,但现在它不起作用。

错误:

id1     id2             column1                         column2                         column3                         column4                         column5                         column6                                      
147741  -905306891655   2017-01-04 15:09:20.057         2017-01-06 16:39:49.057         2017-01-06 16:39:49.057         2017-01-06 15:26:14.057         2017-01-06 15:14:10.057         2017-01-04 17:09:20.057

的package.json:

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'.

tsconfig:

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

    ...

    "typescript": "1.8.10"

    ...
    }

}

模块初始化:

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

1 个答案:

答案 0 :(得分:0)

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

傻,真的。