Skip to content

Commit d07a277

Browse files
committed
const enum fixing in postprocess step
1 parent 6e78b9c commit d07a277

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Jakefile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
444444
// Stanalone/web definition file using global 'ts' namespace
445445
jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, {silent: true});
446446
var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString();
447+
definitionFileContents = definitionFileContents.replace(/^(\s*)(export )?const enum (\S+) {(\s*)$/gm, '$1$2enum $3 {$4');
448+
fs.writeFileSync(standaloneDefinitionsFile, definitionFileContents);
447449

448450
// Official node package definition file, pointed to by 'typings' in package.json
449451
// Created by appending 'export = ts;' at the end of the standalone file to turn it into an external module

0 commit comments

Comments
 (0)