Skip to content

Commit 83238e0

Browse files
authored
Merge pull request #50 from CodinGame/fix-missing-log-service-polyfill
Fix missing log service polyfill
2 parents d11e44e + 7b804f0 commit 83238e0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/polyfill.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ import { List as VScodeList } from 'vscode/vs/base/browser/ui/list/listWidget.js
5050
import { Color as MonacoColor } from 'monaco-editor/esm/vs/base/common/color.js'
5151
import { Color as VScodeColor } from 'vscode/vs/base/common/color.js'
5252
// @ts-ignore Creating a d.ts is not worth it
53+
import { LogService as MonacoLogService } from 'monaco-editor/esm/vs/platform/log/common/log.js'
54+
import { LogService as VScodeLogService } from 'vscode/vs/platform/log/common/log.js'
55+
// @ts-ignore Creating a d.ts is not worth it
5356
import { SnippetParser } from 'monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetParser.js'
5457

5558
// Monaco build process treeshaking is very aggressive and everything that is not used in monaco is removed
@@ -88,6 +91,7 @@ function polyfillPrototype<T> (a: Partial<T>, b: T, toA: (i: unknown) => unknown
8891
}
8992
}
9093

94+
polyfillPrototypeSimple(MonacoLogService.prototype, VScodeLogService.prototype)
9195
polyfillPrototypeSimple(MonacoList.prototype, VScodeList.prototype)
9296
polyfillPrototypeSimple(MonacoWorkspaceFolder.prototype, VScodeWorkspaceFolder.prototype)
9397
polyfillPrototypeSimple(MonacoLanguagesRegistry.prototype, VScodeLanguagesRegistry.prototype)

0 commit comments

Comments
 (0)