From 7d1f9c8a7c95a6fdf5524c422b335a8c20d70678 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Wed, 20 Jun 2018 13:29:37 +0300 Subject: [PATCH] build: upgrade AngularJS typings (#24583) Previously, we were using [@types/angularjs][1], which is deprecated and outdated (hasn't been updated for over two years). This PR switches to [@types/angular][2], which is regularly updated (based on the definitions on [DefinitelyTyped][3]). [1]: https://www.npmjs.com/package/@types/angularjs [2]: https://www.npmjs.com/package/@types/angular [3]: https://github.com/DefinitelyTyped/DefinitelyTyped PR Close #24583 --- modules/tsconfig.json | 2 +- package.json | 2 +- packages/examples/tsconfig-build.json | 2 +- packages/tsconfig.json | 2 +- packages/upgrade/src/common/angular1.ts | 2 +- yarn.lock | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/tsconfig.json b/modules/tsconfig.json index d5992a365a..5dedb93d0e 100644 --- a/modules/tsconfig.json +++ b/modules/tsconfig.json @@ -20,7 +20,7 @@ "skipDefaultLibCheck": true, "skipLibCheck": true, "target": "es5", - "types": ["angularjs"] + "types": ["angular"] }, "exclude": [ "angular1_router", diff --git a/package.json b/package.json index 205b61772b..ad6fc0b735 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@bazel/ibazel": "^0.1.1", - "@types/angularjs": "1.5.14-alpha", + "@types/angular": "^1.6.47", "@types/base64-js": "1.2.5", "@types/chai": "^4.1.2", "@types/chokidar": "1.7.3", diff --git a/packages/examples/tsconfig-build.json b/packages/examples/tsconfig-build.json index 9fb861daf5..5b95650c02 100644 --- a/packages/examples/tsconfig-build.json +++ b/packages/examples/tsconfig-build.json @@ -11,7 +11,7 @@ "rxjs/*": ["../../node_modules/rxjs/*"] }, "outDir": "../../dist/examples", - "types": ["jasmine", "node", "angularjs", "systemjs"] + "types": ["jasmine", "node", "angular", "systemjs"] }, "include": [ diff --git a/packages/tsconfig.json b/packages/tsconfig.json index fd47b5b67d..c7892b33e0 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -23,7 +23,7 @@ "skipDefaultLibCheck": true, "skipLibCheck": true, "target": "es5", - "types": ["angularjs"] + "types": ["angular"] }, "bazelOptions": { "suppressTsconfigOverrideWarnings": true diff --git a/packages/upgrade/src/common/angular1.ts b/packages/upgrade/src/common/angular1.ts index 88183f2ba7..e64b8f28ec 100644 --- a/packages/upgrade/src/common/angular1.ts +++ b/packages/upgrade/src/common/angular1.ts @@ -10,7 +10,7 @@ export type Ng1Token = string; export type Ng1Expression = string | Function; -export interface IAnnotatedFunction extends Function { $inject?: Ng1Token[]; } +export interface IAnnotatedFunction extends Function { $inject?: ReadonlyArray; } export type IInjectable = (Ng1Token | Function)[] | IAnnotatedFunction; diff --git a/yarn.lock b/yarn.lock index b9ee164192..66cfc72758 100644 --- a/yarn.lock +++ b/yarn.lock @@ -52,9 +52,9 @@ "@angular-devkit/schematics" "0.5.4" typescript "~2.6.2" -"@types/angularjs@1.5.14-alpha": - version "1.5.14-alpha" - resolved "https://registry.yarnpkg.com/@types/angularjs/-/angularjs-1.5.14-alpha.tgz#2add80c88e1d84ade07e042918843093b6ac9808" +"@types/angular@^1.6.47": + version "1.6.47" + resolved "https://registry.yarnpkg.com/@types/angular/-/angular-1.6.47.tgz#f7a31279a02c0892ed9aa76aae2da1b17791bacd" "@types/base64-js@1.2.5": version "1.2.5"