我正在使用带有打字稿的 angulat 1.5。当 9 运行 tslint 时,我在 tsconfig.json 中有所有必要的配置,项目中有很多错误:它说
Cannot find namespace angular
ts config.json 看起来像
{
"compilerOptions": {
"target": "es5"
"module": "amd",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true
},
"exclude": [
"node_modules",
]
}
Typings 文件夹中的 tsd.d.ts 文件包含:
/// <reference path="angular-ui-router/angular-ui-router.d.ts" />
/// <reference path="angularjs/angular-animate.d.ts" />
/// <reference path="angularjs/angular-cookies.d.ts" />
/// <reference path="angularjs/angular-mocks.d.ts" />
/// <reference path="angularjs/angular-resource.d.ts" />
/// <reference path="angularjs/angular-sanitize.d.ts" />
/// <reference path="angularjs/angular.d.ts" />
/// <reference path="jquery/jquery.d.ts" />
/// <reference path="moment/moment-node.d.ts" />
/// <reference path="moment/moment.d.ts" />
有没有人有解决方案来解决这个问题。