Angular 更新到10后找不到命名空间
一切都在Angular 8上运行,我开始先升级到Angular v9,然后升级到Angular v10,当我尝试运行我的项目时,所有的名称空间都受到了影响,我希望可能有一个解决方案来解决这个问题,而不是将所有内容都移动到一个孤立的界面上,我将所有细节都留在下面Angular 更新到10后找不到命名空间,angular,typescript,ng-upgrade,Angular,Typescript,Ng Upgrade,一切都在Angular 8上运行,我开始先升级到Angular v9,然后升级到Angular v10,当我尝试运行我的项目时,所有的名称空间都受到了影响,我希望可能有一个解决方案来解决这个问题,而不是将所有内容都移动到一个孤立的界面上,我将所有细节都留在下面 namespace Auth { export interface Token { access_token: string; token_type: string; expires_in: number;
namespace Auth {
export interface Token {
access_token: string;
token_type: string;
expires_in: number;
refresh_token: string;
scope: string;
}
export interface Login {
email: string;
password: string;
app_code?: number;
}
}
错误:
error TS2503: Cannot find namespace 'Auth'. login(credentials: Auth.Login) {}
我尝试添加export
和export declare
和declare
,但没有结果
tsconfig.base.json
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"downlevelIteration": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2018",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
}
}