Skip to content

Commit c40a73d

Browse files
committed
upgrade typescript
1 parent 8867b1f commit c40a73d

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

src/engine/benchmarks/BenchmarkOrchestration.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ type Benchmark = {
1818
systemUUIDs: SystemUUID[]
1919
}
2020

21-
export enum BenchmarkStage {
22-
Particles = 'Particles',
23-
Physics = 'Physics',
24-
Avatar = 'Avatar',
25-
Animation = 'Animation',
26-
Rendering = 'Rendering',
27-
IK = 'IK'
28-
}
21+
export const BenchmarkStage = {
22+
Particles: 'Particles',
23+
Physics: 'Physics',
24+
Avatar: 'Avatar',
25+
Animation: 'Animation',
26+
Rendering: 'Rendering',
27+
IK: 'IK'
28+
} as const
29+
30+
export type BenchmarkStageType = (typeof BenchmarkStage)[keyof typeof BenchmarkStage]
2931

3032
const benchmarkOrder = [
3133
BenchmarkStage.Physics,
@@ -36,7 +38,7 @@ const benchmarkOrder = [
3638
BenchmarkStage.IK
3739
]
3840

39-
export const benchmarks: { [key in BenchmarkStage]: Benchmark | null } = {
41+
export const benchmarks: { [key in BenchmarkStageType]: Benchmark | null } = {
4042
[BenchmarkStage.Avatar]: {
4143
benchmark: AvatarBenchmark,
4244
systemUUIDs: [SkinnedMeshTransformSystem, AvatarAnimationSystem]
@@ -58,7 +60,7 @@ export const benchmarks: { [key in BenchmarkStage]: Benchmark | null } = {
5860
}
5961

6062
type BenchmarkData = Record<
61-
BenchmarkStage,
63+
BenchmarkStageType,
6264
Record<
6365
SystemUUID,
6466
{

tsconfig.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"target": "ESNext",
44
"useDefineForClassFields": true,
55
"module": "CommonJS",
6-
"lib": ["ESNext", "DOM", "DOM.Iterable"],
6+
"lib": [
7+
"ESNext",
8+
"DOM",
9+
"DOM.Iterable"
10+
],
711
"skipLibCheck": true,
812
"moduleResolution": "node",
913
"allowImportingTsExtensions": true,
@@ -24,12 +28,15 @@
2428
"allowSyntheticDefaultImports": true,
2529
"emitDecoratorMetadata": true,
2630
"declaration": false,
27-
"types": ["@types/node"]
31+
"types": [
32+
"@types/node"
33+
],
34+
"erasableSyntaxOnly": true
2835
},
2936
"include": [
3037
"../../../../../__global.d.ts",
3138
"../../../../client-core/src/",
3239
"../../../../server-core/src/",
3340
"./src"
3441
]
35-
}
42+
}

0 commit comments

Comments
 (0)