mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Merge pull request #3137 from remcohaszing/fix-monaco-environment-types
Fix MonacoEnvironment types
This commit is contained in:
commit
58100e52b8
1 changed files with 10 additions and 1 deletions
|
|
@ -364,7 +364,16 @@ function toExternalDTS(contents: string): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line.indexOf('declare let MonacoEnvironment') === 0) {
|
if (line.indexOf('declare let MonacoEnvironment') === 0) {
|
||||||
lines[i] = `declare global {\n let MonacoEnvironment: Environment | undefined;\n}`;
|
lines[i] = [
|
||||||
|
'declare global {',
|
||||||
|
' let MonacoEnvironment: Environment | undefined;',
|
||||||
|
'',
|
||||||
|
' interface Window {',
|
||||||
|
' MonacoEnvironment?: Environment | undefined;',
|
||||||
|
' }',
|
||||||
|
'}',
|
||||||
|
''
|
||||||
|
].join('\n');
|
||||||
}
|
}
|
||||||
if (line.indexOf(' MonacoEnvironment?') === 0) {
|
if (line.indexOf(' MonacoEnvironment?') === 0) {
|
||||||
lines[i] = ` MonacoEnvironment?: Environment | undefined;`;
|
lines[i] = ` MonacoEnvironment?: Environment | undefined;`;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue