Skip to content

Commit 318255a

Browse files
clydinthePunderWoman
authored andcommitted
build: support building with TypeScript 4.1 (angular#39571)
TypeScript 4.1 is now used to build and test within the repository. PR Close angular#39571
1 parent a7e7c21 commit 318255a

32 files changed

Lines changed: 93 additions & 69 deletions

File tree

aio/aio-builds-setup/dockerbuild/scripts-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@
4949
"supertest": "^4.0.2",
5050
"tslint": "^6.1.3",
5151
"tslint-jasmine-noSkipOrFocus": "^1.0.9",
52-
"typescript": "^4.0.2"
52+
"typescript": "^4.1.2"
5353
}
5454
}

aio/aio-builds-setup/dockerbuild/scripts-js/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2563,10 +2563,10 @@ typedarray-to-buffer@^3.1.5:
25632563
dependencies:
25642564
is-typedarray "^1.0.0"
25652565

2566-
typescript@^4.0.2:
2567-
version "4.0.2"
2568-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
2569-
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
2566+
typescript@^4.1.2:
2567+
version "4.1.2"
2568+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
2569+
integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
25702570

25712571
undefsafe@^2.0.2:
25722572
version "2.0.2"

aio/src/app/custom-elements/elements-loader.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,6 @@ class FakeModuleFactory extends NgModuleFactory<any> {
304304

305305
function returnPromisesFromSpy(spy: jasmine.Spy): Deferred[] {
306306
const deferreds: Deferred[] = [];
307-
spy.and.callFake(() => new Promise((resolve, reject) => deferreds.push({resolve, reject})));
307+
spy.and.callFake(() => new Promise<void>((resolve, reject) => deferreds.push({resolve, reject})));
308308
return deferreds;
309309
}

aio/yarn.lock

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13658,7 +13658,7 @@ typedarray@^0.0.6:
1365813658
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
1365913659
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
1366013660

13661-
typescript@4.0.5:
13661+
typescript@4.0.5, typescript@~4.0.2:
1366213662
version "4.0.5"
1366313663
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389"
1366413664
integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==
@@ -13668,11 +13668,6 @@ typescript@^3.2.2:
1366813668
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
1366913669
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
1367013670

13671-
typescript@~4.0.2:
13672-
version "4.0.3"
13673-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
13674-
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==
13675-
1367613671
ua-parser-js@0.7.21:
1367713672
version "0.7.21"
1367813673
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.21.tgz#853cf9ce93f642f67174273cc34565ae6f308777"

dev-infra/caretaker/check/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export abstract class BaseModule<Data> {
1818
protected git: GitClient, protected config: NgDevConfig<{caretaker: CaretakerConfig}>) {}
1919

2020
/** Asyncronously retrieve data for the module. */
21-
protected abstract async retrieveData(): Promise<Data>;
21+
protected abstract retrieveData(): Promise<Data>;
2222

2323
/** Print the information discovered for the module to the terminal. */
24-
abstract async printToTerminal(): Promise<void>;
24+
abstract printToTerminal(): Promise<void>;
2525
}

modules/benchmarks/src/expanding_rows/benchmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export async function execTimed(description: string, func: () => Promise<void>)
8383
}
8484

8585
export async function nextTick(delay = 1) {
86-
return new Promise((res, rej) => {
86+
return new Promise<void>((res, rej) => {
8787
setTimeout(() => {
8888
res();
8989
}, delay);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
"tsickle": "0.38.1",
151151
"tslib": "^2.0.0",
152152
"tslint": "6.1.3",
153-
"typescript": "~4.0.2",
153+
"typescript": "~4.1.2",
154154
"xhr2": "0.2.0",
155155
"yaml": "^1.10.0",
156156
"yargs": "^16.1.1"

packages/animations/browser/src/render/transition_animation_engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ export class TransitionAnimationEngine {
810810
}
811811

812812
whenRenderingDone(): Promise<any> {
813-
return new Promise(resolve => {
813+
return new Promise<void>(resolve => {
814814
if (this.players.length) {
815815
return optimizeGroupPlayer(this.players).onDone(() => resolve());
816816
} else {

packages/bazel/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
2929
"@bazel/typescript": ">=1.0.0",
3030
"terser": "^4.3.1",
31-
"typescript": ">=4.0 <4.1",
31+
"typescript": ">=4.0 <4.2",
3232
"rollup": ">=1.20.0",
3333
"rollup-plugin-commonjs": ">=9.0.0",
3434
"rollup-plugin-node-resolve": ">=4.2.0",

packages/benchpress/src/common_options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class Options {
4343
}
4444

4545
function writeFile(filename: string, content: string): Promise<any> {
46-
return new Promise(function(resolve, reject) {
46+
return new Promise<void>(function(resolve, reject) {
4747
fs.writeFile(filename, content, (error) => {
4848
if (error) {
4949
reject(error);

0 commit comments

Comments
 (0)