Skip to content

Commit 91e5fc0

Browse files
alan-agius4alexeagle
authored andcommitted
build: update to TypeScript 3.1
1 parent 0aea618 commit 91e5fc0

File tree

6 files changed

+165
-63
lines changed

6 files changed

+165
-63
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
"quicktype-core": "^5.0.41",
6969
"temp": "^0.8.3",
7070
"tslint": "^5.11.0",
71-
"typescript": "~3.0.1"
71+
"typescript": "~3.1.1"
7272
},
7373
"devDependencies": {
74-
"@angular/compiler": "^7.0.0-beta.4",
75-
"@angular/compiler-cli": "^7.0.0-beta.4",
74+
"@angular/compiler": "^7.0.0-rc.0",
75+
"@angular/compiler-cli": "^7.0.0-rc.0",
7676
"@bazel/typescript": "0.16.1",
7777
"@ngtools/json-schema": "^1.1.0",
7878
"@types/copy-webpack-plugin": "^4.4.1",

packages/angular/cli/utilities/json-schema.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,20 @@ import {
1919
Value,
2020
} from '../models/interface';
2121

22-
function _getEnumFromValue<E, T extends string>(v: json.JsonValue, e: E, d: T): T {
23-
if (typeof v !== 'string') {
24-
return d;
22+
function _getEnumFromValue<E, T extends E[keyof E]>(
23+
value: json.JsonValue,
24+
enumeration: E,
25+
defaultValue: T,
26+
): T {
27+
if (typeof value !== 'string') {
28+
return defaultValue;
2529
}
2630

27-
if (Object.values(e).indexOf(v) !== -1) {
28-
return v as T;
31+
if (Object.values(enumeration).indexOf(value) !== -1) {
32+
return value as unknown as T;
2933
}
3034

31-
return d;
35+
return defaultValue;
3236
}
3337

3438
export async function parseJsonSchemaToSubCommandDescription(
@@ -232,9 +236,9 @@ export async function parseJsonSchemaToOptions(
232236
? $defaultIndex : undefined;
233237

234238
const required = json.isJsonArray(current.required)
235-
? current.required.indexOf(name) != -1 : false;
239+
? current.required.indexOf(name) != -1 : false;
236240
const aliases = json.isJsonArray(current.aliases) ? [...current.aliases].map(x => '' + x)
237-
: current.alias ? ['' + current.alias] : [];
241+
: current.alias ? ['' + current.alias] : [];
238242
const format = typeof current.format == 'string' ? current.format : undefined;
239243
const visible = current.visible === undefined || current.visible === true;
240244
const hidden = !!current.hidden || !visible;

packages/angular_devkit/build_angular/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@
5858
"node-sass": "4.9.3"
5959
},
6060
"devDependencies": {
61-
"@angular/animations": "^7.0.0-beta.4",
61+
"@angular/animations": "^7.0.0-rc.0",
6262
"@angular/cdk": "^6.1.0",
63-
"@angular/common": "^7.0.0-beta.4",
64-
"@angular/compiler": "^7.0.0-beta.4",
65-
"@angular/compiler-cli": "^7.0.0-beta.4",
66-
"@angular/core": "^7.0.0-beta.4",
67-
"@angular/http": "^7.0.0-beta.4",
63+
"@angular/common": "^7.0.0-rc.0",
64+
"@angular/compiler": "^7.0.0-rc.0",
65+
"@angular/compiler-cli": "^7.0.0-rc.0",
66+
"@angular/core": "^7.0.0-rc.0",
67+
"@angular/http": "^7.0.0-rc.0",
6868
"@angular/material": "^6.1.0",
69-
"@angular/platform-browser": "^7.0.0-beta.4",
70-
"@angular/platform-browser-dynamic": "^7.0.0-beta.4",
71-
"@angular/platform-server": "^7.0.0-beta.4",
72-
"@angular/router": "^7.0.0-beta.4",
73-
"@angular/service-worker": "^7.0.0-beta.4",
69+
"@angular/platform-browser": "^7.0.0-rc.0",
70+
"@angular/platform-browser-dynamic": "^7.0.0-rc.0",
71+
"@angular/platform-server": "^7.0.0-rc.0",
72+
"@angular/router": "^7.0.0-rc.0",
73+
"@angular/service-worker": "^7.0.0-rc.0",
7474
"codelyzer": "^4.2.1",
7575
"core-js": "^2.4.1",
7676
"bootstrap": "^4.0.0",

packages/angular_devkit/build_ng_packagr/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"ng-packagr": "^2.2.0 || ^3.0.0 || ^4.0.0"
1616
},
1717
"devDependencies": {
18-
"@angular/compiler": "^7.0.0-beta.4",
19-
"@angular/compiler-cli": "^7.0.0-beta.4",
18+
"@angular/compiler": "^7.0.0-rc.0",
19+
"@angular/compiler-cli": "^7.0.0-rc.0",
2020
"ng-packagr": "^4.2.0",
2121
"tsickle": ">=0.27.3",
2222
"tslib": "^1.9.0"

packages/angular_devkit/build_optimizer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dependencies": {
1111
"loader-utils": "1.1.0",
1212
"source-map": "0.5.6",
13-
"typescript": "3.0.1",
13+
"typescript": "3.1.1",
1414
"webpack-sources": "1.2.0"
1515
}
1616
}

0 commit comments

Comments
 (0)