Skip to content

Commit 732b37c

Browse files
committed
build: update to TypeScript 4.2
Updates to TS 4.2, tslib 2.1 and resolves some compilation errors.
1 parent 397710d commit 732b37c

File tree

8 files changed

+117
-123
lines changed

8 files changed

+117
-123
lines changed

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
},
5353
"version": "12.0.0-next.2",
5454
"dependencies": {
55-
"@angular/animations": "^12.0.0-next.0",
56-
"@angular/common": "^12.0.0-next.0",
57-
"@angular/compiler": "^12.0.0-next.0",
58-
"@angular/core": "^12.0.0-next.0",
59-
"@angular/elements": "^12.0.0-next.0",
60-
"@angular/forms": "^12.0.0-next.0",
61-
"@angular/platform-browser": "^12.0.0-next.0",
55+
"@angular/animations": "^12.0.0-next.5",
56+
"@angular/common": "^12.0.0-next.5",
57+
"@angular/compiler": "^12.0.0-next.5",
58+
"@angular/core": "^12.0.0-next.5",
59+
"@angular/elements": "^12.0.0-next.5",
60+
"@angular/forms": "^12.0.0-next.5",
61+
"@angular/platform-browser": "^12.0.0-next.5",
6262
"@types/googlemaps": "^3.43.1",
6363
"@types/youtube": "^0.0.40",
6464
"@webcomponents/custom-elements": "^1.1.0",
@@ -67,20 +67,20 @@
6767
"rxjs": "^6.5.3",
6868
"rxjs-tslint-rules": "^4.33.1",
6969
"systemjs": "0.19.43",
70-
"tslib": "^2.0.0",
70+
"tslib": "^2.1.0",
7171
"zone.js": "~0.11.3"
7272
},
7373
"devDependencies": {
74-
"@angular-devkit/build-optimizer": "^0.1200.0-next.0",
75-
"@angular-devkit/core": "^12.0.0-next.0",
76-
"@angular-devkit/schematics": "^12.0.0-next.0",
77-
"@angular/bazel": "^12.0.0-next.0",
74+
"@angular-devkit/build-optimizer": "^0.1200.0-next.4",
75+
"@angular-devkit/core": "^12.0.0-next.4",
76+
"@angular-devkit/schematics": "^12.0.0-next.4",
77+
"@angular/bazel": "^12.0.0-next.5",
7878
"@angular/benchpress": "^0.2.1",
79-
"@angular/compiler-cli": "^12.0.0-next.0",
79+
"@angular/compiler-cli": "^12.0.0-next.5",
8080
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#a8dbb0d8cd8de1e86a4ec4ea66b5bd89a47d4876",
81-
"@angular/platform-browser-dynamic": "^12.0.0-next.0",
82-
"@angular/platform-server": "^12.0.0-next.0",
83-
"@angular/router": "^12.0.0-next.0",
81+
"@angular/platform-browser-dynamic": "^12.0.0-next.5",
82+
"@angular/platform-server": "^12.0.0-next.5",
83+
"@angular/router": "^12.0.0-next.5",
8484
"@axe-core/webdriverjs": "^4.1.0",
8585
"@bazel/bazelisk": "^1.4.0",
8686
"@bazel/buildifier": "^4.0.0",
@@ -140,7 +140,7 @@
140140
"@material/touch-target": "11.0.0-canary.67d780c79.0",
141141
"@material/typography": "11.0.0-canary.67d780c79.0",
142142
"@octokit/rest": "18.3.5",
143-
"@schematics/angular": "^12.0.0-next.0",
143+
"@schematics/angular": "^12.0.0-next.4",
144144
"@types/autoprefixer": "^9.7.2",
145145
"@types/browser-sync": "^2.26.1",
146146
"@types/fs-extra": "^9.0.5",
@@ -217,11 +217,11 @@
217217
"tsickle": "0.39.1",
218218
"tslint": "^6.1.3",
219219
"tsutils": "^3.17.1",
220-
"typescript": "~4.1.2",
220+
"typescript": "~4.2.3",
221221
"vrsource-tslint-rules": "6.0.0",
222222
"yaml": "^1.10.0"
223223
},
224224
"resolutions": {
225-
"dgeni-packages/typescript": "4.1.2"
225+
"dgeni-packages/typescript": "4.2.3"
226226
}
227227
}

packages.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# version for the placeholders.
44
ANGULAR_PACKAGE_VERSION = "^12.0.0-0 || ^13.0.0-0"
55
MDC_PACKAGE_VERSION = "^9.0.0-canary.419e03572.0"
6-
TSLIB_PACKAGE_VERSION = "^2.0.0"
6+
TSLIB_PACKAGE_VERSION = "^2.1.0"
77

88
# Each placer holder is used to stamp versions during the build process, replacing the key with it's
99
# value pair. These replacements occur during building of `npm_package` and `ng_package` stamping in

src/cdk-experimental/selection/selection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class CdkSelection<T> implements OnInit, AfterContentChecked, CollectionV
138138

139139
/** Toggles selection for a given value. `index` is required if `trackBy` is used. */
140140
toggleSelection(value: T, index?: number) {
141-
if (this.trackByFn && index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
141+
if (!!this.trackByFn && index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
142142
throw Error('CdkSelection: index required when trackBy is used');
143143
}
144144

@@ -167,7 +167,7 @@ export class CdkSelection<T> implements OnInit, AfterContentChecked, CollectionV
167167

168168
/** Checks whether a value is selected. `index` is required if `trackBy` is used. */
169169
isSelected(value: T, index?: number) {
170-
if (this.trackByFn && index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
170+
if (!!this.trackByFn && index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
171171
throw Error('CdkSelection: index required when trackBy is used');
172172
}
173173

src/google-maps/map-marker-clusterer/map-marker-clusterer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class MapMarkerClusterer implements OnInit, AfterContentInit, OnChanges,
233233
if (changes['batchSizeIE'] && _batchSizeIE !== undefined) {
234234
clusterer.setBatchSizeIE(_batchSizeIE);
235235
}
236-
if (changes['calculator'] && _calculator) {
236+
if (changes['calculator'] && !!_calculator) {
237237
clusterer.setCalculator(_calculator);
238238
}
239239
if (changes['clusterClass'] && _clusterClass !== undefined) {

src/material-experimental/mdc-chips/chip.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
import {
3333
CanColor,
3434
CanColorCtor,
35+
CanDisable,
3536
CanDisableRipple,
3637
CanDisableRippleCtor,
3738
HasTabIndex,
@@ -87,8 +88,7 @@ export class MatChipCssInternalOnly { }
8788
* Boilerplate for applying mixins to MatChip.
8889
* @docs-private
8990
*/
90-
abstract class MatChipBase {
91-
abstract disabled: boolean;
91+
class MatChipBase {
9292
constructor(public _elementRef: ElementRef) {}
9393
}
9494

@@ -126,7 +126,7 @@ const _MatChipMixinBase:
126126
changeDetection: ChangeDetectionStrategy.OnPush,
127127
})
128128
export class MatChip extends _MatChipMixinBase implements AfterContentInit, AfterViewInit,
129-
CanColor, CanDisableRipple, HasTabIndex, OnDestroy {
129+
CanColor, CanDisableRipple, CanDisable, HasTabIndex, OnDestroy {
130130
/** The ripple animation configuration to use for the chip. */
131131
readonly _rippleAnimation: RippleAnimationConfig = RIPPLE_ANIMATION_CONFIG;
132132

src/material/chips/chip.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
import {
3030
CanColor,
3131
CanColorCtor,
32+
CanDisable,
3233
CanDisableRipple,
3334
CanDisableRippleCtor,
3435
HasTabIndex,
@@ -88,8 +89,7 @@ export const MAT_CHIP_TRAILING_ICON =
8889

8990
// Boilerplate for applying mixins to MatChip.
9091
/** @docs-private */
91-
abstract class MatChipBase {
92-
abstract disabled: boolean;
92+
class MatChipBase {
9393
constructor(public _elementRef: ElementRef) {}
9494
}
9595

@@ -146,7 +146,7 @@ export class MatChipTrailingIcon {}
146146
},
147147
})
148148
export class MatChip extends _MatChipMixinBase implements FocusableOption, OnDestroy, CanColor,
149-
CanDisableRipple, RippleTarget, HasTabIndex {
149+
CanDisableRipple, RippleTarget, HasTabIndex, CanDisable {
150150

151151
/** Reference to the RippleRenderer for the chip. */
152152
private _chipRipple: RippleRenderer;

tools/public_api_guard/material/chips.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export declare const MAT_CHIP_TRAILING_ICON: InjectionToken<MatChipTrailingIcon>
66

77
export declare const MAT_CHIPS_DEFAULT_OPTIONS: InjectionToken<MatChipsDefaultOptions>;
88

9-
export declare class MatChip extends _MatChipMixinBase implements FocusableOption, OnDestroy, CanColor, CanDisableRipple, RippleTarget, HasTabIndex {
9+
export declare class MatChip extends _MatChipMixinBase implements FocusableOption, OnDestroy, CanColor, CanDisableRipple, RippleTarget, HasTabIndex, CanDisable {
1010
_animationsDisabled: boolean;
1111
_chipListDisabled: boolean;
1212
_chipListMultiple: boolean;
@@ -219,6 +219,7 @@ export declare class MatChipSelectionChange {
219219
}
220220

221221
export declare class MatChipsModule {
222+
static ɵfac: i0.ɵɵFactoryDef<MatChipsModule, never>;
222223
static ɵinj: i0.ɵɵInjectorDef<MatChipsModule>;
223224
static ɵmod: i0.ɵɵNgModuleDefWithMeta<MatChipsModule, [typeof i1.MatChipList, typeof i2.MatChip, typeof i3.MatChipInput, typeof i2.MatChipRemove, typeof i2.MatChipAvatar, typeof i2.MatChipTrailingIcon], [typeof i4.MatCommonModule], [typeof i1.MatChipList, typeof i2.MatChip, typeof i3.MatChipInput, typeof i2.MatChipRemove, typeof i2.MatChipAvatar, typeof i2.MatChipTrailingIcon]>;
224225
}

0 commit comments

Comments
 (0)