Skip to content

Commit 86f9dc4

Browse files
authored
chore(NODE-6938): update typescript to 5.8.3 (#793)
1 parent 3e5f1f8 commit 86f9dc4

File tree

7 files changed

+35
-29
lines changed

7 files changed

+35
-29
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"tar": "^7.4.3",
5959
"ts-node": "^10.9.2",
6060
"tsd": "^0.31.1",
61-
"typescript": "^5.5.4",
61+
"typescript": "^5.8.3",
6262
"typescript-cached-transpile": "0.0.6",
6363
"uuid": "^11.1.0"
6464
},

src/parser/on_demand/parse_to_elements.ts

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,31 @@ import { NumberUtils } from '../../utils/number_utils';
99
* - `minKey` is set to 255 so unsigned comparisons succeed
1010
* - Modify with caution, double check the bundle contains literals
1111
*/
12-
const enum BSONElementType {
13-
double = 1,
14-
string = 2,
15-
object = 3,
16-
array = 4,
17-
binData = 5,
18-
undefined = 6,
19-
objectId = 7,
20-
bool = 8,
21-
date = 9,
22-
null = 10,
23-
regex = 11,
24-
dbPointer = 12,
25-
javascript = 13,
26-
symbol = 14,
27-
javascriptWithScope = 15,
28-
int = 16,
29-
timestamp = 17,
30-
long = 18,
31-
decimal = 19,
32-
minKey = 255,
33-
maxKey = 127
34-
}
12+
const BSONElementType = {
13+
double: 1,
14+
string: 2,
15+
object: 3,
16+
array: 4,
17+
binData: 5,
18+
undefined: 6,
19+
objectId: 7,
20+
bool: 8,
21+
date: 9,
22+
null: 10,
23+
regex: 11,
24+
dbPointer: 12,
25+
javascript: 13,
26+
symbol: 14,
27+
javascriptWithScope: 15,
28+
int: 16,
29+
timestamp: 17,
30+
long: 18,
31+
decimal: 19,
32+
minKey: 255,
33+
maxKey: 127
34+
} as const;
35+
36+
type BSONElementType = (typeof BSONElementType)[keyof typeof BSONElementType];
3537

3638
/**
3739
* @public

test/bench/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"module": "commonjs",
99
"moduleResolution": "node",
1010
"skipLibCheck": true,
11+
"erasableSyntaxOnly": true,
1112
"lib": [
1213
"es2021"
1314
],

test/bundling/webpack/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"watch": "webpack --watch"
1414
},
1515
"devDependencies": {
16+
"@webpack-cli/generators": "^3.0.1",
1617
"ts-loader": "^9.5.2",
1718
"typescript": "^5.8.3",
1819
"webpack": "^5.99.7",

test/bundling/webpack/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"noImplicitAny": true,
55
"module": "es6",
66
"target": "es5",
7-
"allowJs": true
7+
"allowJs": true,
8+
"erasableSyntaxOnly": true
89
},
910
"files": ["src/index.ts"]
1011
}

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"module": "commonjs",
99
"moduleResolution": "node",
1010
"skipLibCheck": true,
11+
"erasableSyntaxOnly": true,
1112
"lib": [
1213
"es2021",
1314
"ES2022.Error"

0 commit comments

Comments
 (0)