Skip to content

Commit 36debf6

Browse files
committed
chore(build): Bump Typescript to 3.9.2
Generate type files for older typescript compilers Fixed issues relating to: microsoft/TypeScript#36696 Signed-off-by: Gordon Smith <[email protected]>
1 parent 00ae441 commit 36debf6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+361
-249
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
dist
55
lib
66
types
7+
types-3.4
78
node_modules
89
build
910
review/api/temp

examples/example-datagrid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"file-loader": "^5.0.2",
1919
"rimraf": "^2.5.2",
2020
"style-loader": "^1.0.2",
21-
"typescript": "~3.6.4",
21+
"typescript": "~3.9.2",
2222
"webpack": "^4.41.3",
2323
"webpack-cli": "^3.3.10"
2424
}

examples/example-datastore/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"file-loader": "^5.0.2",
2828
"rimraf": "^2.5.2",
2929
"style-loader": "^1.0.2",
30-
"typescript": "~3.6.4",
30+
"typescript": "~3.9.2",
3131
"webpack": "^4.41.3"
3232
}
3333
}

examples/example-datastore/src/messages.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace WSAdapterMessages {
3838
* A base message for the patch server.
3939
*/
4040
export
41-
type IBaseMessage = JSONObject & {
41+
interface IBaseMessage extends Partial<JSONObject> {
4242
msgId: string;
4343
msgType: (
4444
'storeid-request' | 'storeid-reply'|
@@ -48,13 +48,13 @@ namespace WSAdapterMessages {
4848
'history-request' | 'history-reply' |
4949
'fetch-transaction-request' | 'fetch-transaction-reply'
5050
);
51-
parentId: undefined;
51+
parentId?: string;
5252

5353
readonly content: ReadonlyJSONObject;
5454
}
5555

5656
export
57-
type IBaseReplyMessage = IBaseMessage & {
57+
interface IBaseReplyMessage extends IBaseMessage {
5858
parentId: string;
5959
}
6060

@@ -71,7 +71,7 @@ namespace WSAdapterMessages {
7171
* A reply from the server containing a unique store ID.
7272
*/
7373
export
74-
type IStoreIdMessageReply = IBaseReplyMessage & {
74+
interface IStoreIdMessageReply extends IBaseReplyMessage {
7575
msgType: 'storeid-reply';
7676
content: {
7777
readonly storeId: number

examples/example-datastore/src/wsbase.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
* Abstract base for a class that sends/receives messages over websocket.
2222
*/
2323
export
24-
abstract class WSConnection<T extends JSONValue, U extends JSONValue> implements IDisposable {
24+
abstract class WSConnection<T extends Partial<JSONValue>, U extends Partial<JSONValue>> implements IDisposable {
2525
/**
2626
* Create a new websocket based connection.
2727
*/

examples/example-dockpanel/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"rimraf": "^2.5.2",
2121
"source-map-loader": "0.2.4",
2222
"style-loader": "^1.0.2",
23-
"typescript": "~3.6.4",
23+
"typescript": "~3.9.2",
2424
"webpack": "^4.41.3",
2525
"webpack-cli": "^3.3.10"
2626
}

packages/algorithm/package.json

+15-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,27 @@
2121
"files": [
2222
"dist/*",
2323
"src/*",
24-
"types/*"
24+
"types/*",
25+
"types-3.4/*"
2526
],
2627
"main": "dist/index.js",
2728
"module": "dist/index.es6",
2829
"unpkg": "dist/index.min.js",
2930
"jsdelivr": "dist/index.min.js",
3031
"types": "types/index.d.ts",
32+
"typesVersions": {
33+
"<3.8": {
34+
"*": [
35+
"types-3.4/index.d.ts"
36+
]
37+
}
38+
},
3139
"scripts": {
3240
"api": "api-extractor run --local --verbose",
3341
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
34-
"build": "tsc --build && rollup -c",
42+
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
3543
"build:test": "tsc --build tests && cd tests && webpack",
44+
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
3645
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
3746
"clean:test": "rimraf tests/build",
3847
"docs": "typedoc --options tdoptions.json src",
@@ -46,6 +55,7 @@
4655
"@microsoft/api-extractor": "^7.6.0",
4756
"@types/mocha": "^2.2.39",
4857
"chai": "^3.5.0",
58+
"downlevel-dts": "^0.4.0",
4959
"karma": "^4.4.1",
5060
"karma-chrome-launcher": "^2.0.0",
5161
"karma-firefox-launcher": "^1.0.0",
@@ -60,12 +70,12 @@
6070
"rollup-plugin-sourcemaps": "^0.5.0",
6171
"terser": "^4.6.2",
6272
"tslib": "1.10.0",
63-
"typedoc": "~0.15.0",
64-
"typescript": "~3.6.4",
73+
"typedoc": "~0.17.7",
74+
"typescript": "~3.9.2",
6575
"webpack": "^4.41.3",
6676
"webpack-cli": "^3.3.10"
6777
},
6878
"publishConfig": {
6979
"access": "public"
7080
}
71-
}
81+
}

packages/algorithm/tdoptions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"excludeNotExported": true,
33
"mode": "file",
44
"target": "es5",
5-
"module": "es5",
5+
"module": "es6",
66
"lib": ["lib.es2015.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.promise.d.ts", "lib.dom.d.ts"],
77
"out": "../../docs/api/algorithm",
88
"baseUrl": ".",

packages/application/package.json

+15-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,27 @@
2121
"files": [
2222
"dist/*",
2323
"src/*",
24-
"types/*"
24+
"types/*",
25+
"types-3.4/*"
2526
],
2627
"main": "dist/index.js",
2728
"module": "dist/index.es6",
2829
"unpkg": "dist/index.min.js",
2930
"jsdelivr": "dist/index.min.js",
3031
"types": "types/index.d.ts",
32+
"typesVersions": {
33+
"<3.8": {
34+
"*": [
35+
"types-3.4/index.d.ts"
36+
]
37+
}
38+
},
3139
"scripts": {
3240
"api": "api-extractor run --local --verbose",
3341
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
34-
"build": "tsc --build && rollup -c",
42+
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
3543
"build:test": "tsc --build tests && cd tests && webpack",
44+
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
3645
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
3746
"clean:test": "rimraf tests/build",
3847
"docs": "typedoc --options tdoptions.json src",
@@ -52,6 +61,7 @@
5261
"@types/chai": "^3.4.35",
5362
"@types/mocha": "^2.2.39",
5463
"chai": "^3.5.0",
64+
"downlevel-dts": "^0.4.0",
5565
"karma": "^4.4.1",
5666
"karma-chrome-launcher": "^2.0.0",
5767
"karma-firefox-launcher": "^1.0.0",
@@ -66,12 +76,12 @@
6676
"rollup-plugin-sourcemaps": "^0.5.0",
6777
"terser": "^4.6.2",
6878
"tslib": "1.10.0",
69-
"typedoc": "~0.15.0",
70-
"typescript": "~3.6.4",
79+
"typedoc": "~0.17.7",
80+
"typescript": "~3.9.2",
7181
"webpack": "^4.41.3",
7282
"webpack-cli": "^3.3.10"
7383
},
7484
"publishConfig": {
7585
"access": "public"
7686
}
77-
}
87+
}

packages/application/tdoptions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"excludeNotExported": true,
33
"mode": "file",
44
"target": "es5",
5-
"module": "es5",
5+
"module": "es6",
66
"lib": ["lib.es2015.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.promise.d.ts", "lib.dom.d.ts"],
77
"out": "../../docs/api/application",
88
"baseUrl": ".",

packages/collections/package.json

+15-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,27 @@
2121
"files": [
2222
"dist/*",
2323
"src/*",
24-
"types/*"
24+
"types/*",
25+
"types-3.4/*"
2526
],
2627
"main": "dist/index.js",
2728
"module": "dist/index.es6",
2829
"unpkg": "dist/index.min.js",
2930
"jsdelivr": "dist/index.min.js",
3031
"types": "types/index.d.ts",
32+
"typesVersions": {
33+
"<3.8": {
34+
"*": [
35+
"types-3.4/index.d.ts"
36+
]
37+
}
38+
},
3139
"scripts": {
3240
"api": "api-extractor run --local --verbose",
3341
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
34-
"build": "tsc --build && rollup -c",
42+
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
3543
"build:test": "tsc --build tests && cd tests && webpack",
44+
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
3645
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
3746
"clean:test": "rimraf tests/build",
3847
"docs": "typedoc --options tdoptions.json src",
@@ -50,6 +59,7 @@
5059
"@types/chai": "^3.4.35",
5160
"@types/mocha": "^2.2.39",
5261
"chai": "^3.5.0",
62+
"downlevel-dts": "^0.4.0",
5363
"karma": "^4.4.1",
5464
"karma-chrome-launcher": "^2.0.0",
5565
"karma-firefox-launcher": "^1.0.0",
@@ -64,12 +74,12 @@
6474
"rollup-plugin-sourcemaps": "^0.5.0",
6575
"terser": "^4.6.2",
6676
"tslib": "1.10.0",
67-
"typedoc": "~0.15.0",
68-
"typescript": "~3.6.4",
77+
"typedoc": "~0.17.7",
78+
"typescript": "~3.9.2",
6979
"webpack": "^4.41.3",
7080
"webpack-cli": "^3.3.10"
7181
},
7282
"publishConfig": {
7383
"access": "public"
7484
}
75-
}
85+
}

packages/collections/tdoptions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"excludeNotExported": true,
33
"mode": "file",
44
"target": "es5",
5-
"module": "es5",
5+
"module": "es6",
66
"out": "../../docs/api/collections",
77
"baseUrl": ".",
88
"paths": {

packages/commands/package.json

+15-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,27 @@
2121
"files": [
2222
"dist/*",
2323
"src/*",
24-
"types/*"
24+
"types/*",
25+
"types-3.4/*"
2526
],
2627
"main": "dist/index.js",
2728
"module": "dist/index.es6",
2829
"unpkg": "dist/index.min.js",
2930
"jsdelivr": "dist/index.min.js",
3031
"types": "types/index.d.ts",
32+
"typesVersions": {
33+
"<3.8": {
34+
"*": [
35+
"types-3.4/index.d.ts"
36+
]
37+
}
38+
},
3139
"scripts": {
3240
"api": "api-extractor run --local --verbose",
3341
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
34-
"build": "tsc --build && rollup -c",
42+
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
3543
"build:test": "tsc --build tests && cd tests && webpack",
44+
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
3645
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
3746
"clean:test": "rimraf tests/build",
3847
"docs": "typedoc --options tdoptions.json src",
@@ -63,6 +72,7 @@
6372
"@types/chai": "^3.4.35",
6473
"@types/mocha": "^2.2.39",
6574
"chai": "^3.5.0",
75+
"downlevel-dts": "^0.4.0",
6676
"es6-promise": "^4.0.5",
6777
"karma": "^4.4.1",
6878
"karma-chrome-launcher": "^2.0.0",
@@ -79,12 +89,12 @@
7989
"simulate-event": "^1.4.0",
8090
"terser": "^4.6.2",
8191
"tslib": "1.10.0",
82-
"typedoc": "~0.15.0",
83-
"typescript": "~3.6.4",
92+
"typedoc": "~0.17.7",
93+
"typescript": "~3.9.2",
8494
"webpack": "^4.41.3",
8595
"webpack-cli": "^3.3.10"
8696
},
8797
"publishConfig": {
8898
"access": "public"
8999
}
90-
}
100+
}

packages/commands/tdoptions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"excludeNotExported": true,
33
"mode": "file",
44
"target": "es5",
5-
"module": "es5",
5+
"module": "es6",
66
"lib": ["lib.es2015.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.promise.d.ts", "lib.dom.d.ts"],
77
"out": "../../docs/api/commands",
88
"baseUrl": ".",

packages/coreutils/package.json

+15-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,27 @@
2121
"files": [
2222
"dist/*",
2323
"src/*",
24-
"types/*"
24+
"types/*",
25+
"types-3.4/*"
2526
],
2627
"main": "dist/index.js",
2728
"module": "dist/index.es6",
2829
"unpkg": "dist/index.min.js",
2930
"jsdelivr": "dist/index.min.js",
3031
"types": "types/index.d.ts",
32+
"typesVersions": {
33+
"<3.8": {
34+
"*": [
35+
"types-3.4/index.d.ts"
36+
]
37+
}
38+
},
3139
"scripts": {
3240
"api": "api-extractor run --local --verbose",
3341
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
34-
"build": "tsc --build && rollup -c",
42+
"build": "tsc --build && npm run gen-legacy-types && rollup -c",
3543
"build:test": "tsc --build tests && cd tests && webpack",
44+
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
3645
"clean": "rimraf ./lib && rimraf *.tsbuildinfo && rimraf ./types && rimraf ./dist",
3746
"clean:test": "rimraf tests/build",
3847
"docs": "typedoc --options tdoptions.json src",
@@ -50,6 +59,7 @@
5059
"@types/chai": "^3.4.35",
5160
"@types/mocha": "^2.2.39",
5261
"chai": "^3.5.0",
62+
"downlevel-dts": "^0.4.0",
5363
"es6-promise": "^4.0.5",
5464
"karma": "^4.4.1",
5565
"karma-chrome-launcher": "^2.0.0",
@@ -65,8 +75,8 @@
6575
"rollup-plugin-sourcemaps": "^0.5.0",
6676
"terser": "^4.6.2",
6777
"tslib": "1.10.0",
68-
"typedoc": "~0.15.0",
69-
"typescript": "~3.6.4",
78+
"typedoc": "~0.17.7",
79+
"typescript": "~3.9.2",
7080
"webpack": "^4.41.3",
7181
"webpack-cli": "^3.3.10"
7282
},
@@ -76,4 +86,4 @@
7686
"browser": {
7787
"crypto": false
7888
}
79-
}
89+
}

packages/coreutils/src/json.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type JSONValue = JSONPrimitive | JSONObject | JSONArray;
2727
* A type definition for a JSON object.
2828
*/
2929
export
30-
interface JSONObject { [key: string]: JSONValue; }
30+
interface JSONObject { [key: string]: JSONValue | ReadonlyJSONValue; }
3131

3232

3333
/**

0 commit comments

Comments
 (0)