diff --git a/build/gulpfile.editor.js b/build/gulpfile.editor.js index 230082e4ad9..0a7c24b4539 100644 --- a/build/gulpfile.editor.js +++ b/build/gulpfile.editor.js @@ -231,7 +231,10 @@ function toExternalDTS(contents) { if (line.indexOf('declare let MonacoEnvironment') === 0) { lines[i] = `declare global {\n let MonacoEnvironment: Environment | undefined;\n}`; - // lines[i] = line.replace('declare namespace monaco.', 'export namespace '); + } + + if (line.indexOf('\tMonacoEnvironment?') === 0) { + lines[i] = ` MonacoEnvironment?: Environment | undefined;`; } } return lines.join('\n').replace(/\n\n\n+/g, '\n\n');