From 8d3ce8d7f5202bb4045484ecfd028fe027bf5d4a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 21 Sep 2021 17:19:45 +0200 Subject: [PATCH] Fix the transformation to an external module .d.ts --- build/gulpfile.editor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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');