Skip to content

Commit 0e10552

Browse files
authored
Disable "preserveConstEnums" in tsconfig (#2440)
1 parent a81896e commit 0e10552

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

scripts/build.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,17 @@ const diagnosticsPlugin = {
145145
}
146146
out.push(" " + key + " = " + messages[text]);
147147
});
148-
148+
149149
out.push("\n}\n\n");
150150
out.push("/** Translates a diagnostic code to its respective string. */\n");
151151
out.push("export function diagnosticCodeToString(code: DiagnosticCode): string {\n switch (code) {\n");
152-
152+
153153
Object.keys(messages).forEach(text => {
154154
out.push(" case " + messages[text] + ": return " + JSON.stringify(text) + ";\n");
155155
});
156-
156+
157157
out.push(" default: return \"\";\n }\n}\n");
158-
158+
159159
const generated = out.join("");
160160
fs.writeFileSync(path.join(dirname, "..", "src", "diagnosticMessages.generated.ts"), generated);
161161
return {

std/portable.json

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"target": "esnext",
55
"module": "commonjs",
66
"allowJs": true,
7-
"downlevelIteration": true,
8-
"preserveConstEnums": true,
97
"typeRoots": [ "types" ],
108
"types": [ "portable" ],
119
"lib": ["esnext", "esnext.string"]

tsconfig-base.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"compilerOptions": {
3+
"strict": true,
34
"alwaysStrict": true,
45
"noImplicitAny": true,
56
"noImplicitReturns": true,
67
"noImplicitThis": true,
78
"noEmitOnError": true,
89
"strictNullChecks": true,
9-
"experimentalDecorators": true
10+
"experimentalDecorators": true,
11+
"preserveConstEnums": false,
12+
"downlevelIteration": true
1013
}
1114
}

0 commit comments

Comments
 (0)