Skip to content

Commit 38a2104

Browse files
committed
Be sure that TS files can be run without TS
1 parent 7fa5c22 commit 38a2104

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

lib/math.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
enum Priority {
2-
High = 2,
3-
Low = 1
4-
}
1+
const HIGH_PRIORITY = 2
2+
const LOW_PRIORITY = 1
53

64
const OPERATORS = {
7-
'-': Priority.Low,
8-
'*': Priority.High,
9-
'/': Priority.High,
10-
'+': Priority.Low
5+
'-': LOW_PRIORITY,
6+
'*': HIGH_PRIORITY,
7+
'/': HIGH_PRIORITY,
8+
'+': LOW_PRIORITY
119
}
1210

1311
type Operator = keyof typeof OPERATORS

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"compilerOptions": {
33
"allowImportingTsExtensions": true,
44
"verbatimModuleSyntax": true,
5+
"erasableSyntaxOnly": true,
56
"moduleResolution": "node",
67
"esModuleInterop": true,
78
"skipLibCheck": true,

0 commit comments

Comments
 (0)