Skip to content

Commit

Permalink
fix: add missing polyfills
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Apr 14, 2023
1 parent 57c39b2 commit e002e7a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { DefaultConfiguration as MonacoDefaultConfiguration } from 'monaco-edito
import { DefaultConfiguration as VScodeDefaultConfiguration } from 'vscode/vs/platform/configuration/common/configurations.js'
import { Keybinding as MonacoKeybinding, KeyCodeChord as MonacoKeyCodeChord } from 'monaco-editor/esm/vs/base/common/keybindings.js'
import { Keybinding as VScodeKeybinding, KeyCodeChord as VScodeKeyCodeChord } from 'vscode/vs/base/common/keybindings.js'
import { Disposable } from 'vs/base/common/lifecycle.js'
import { DisposableMap as MonacoDisposableMap } from 'monaco-editor/esm/vs/base/common/lifecycle.js'
import { DisposableMap as VScodeDisposableMap } from 'vscode/vs/base/common/lifecycle.js'
import { FileAccess as MonacoFileAccess } from 'monaco-editor/esm/vs/base/common/network.js'
Expand Down Expand Up @@ -80,6 +81,8 @@ import { KeybindingsRegistryImpl as VScodeKeybindingsRegistryImpl } from 'vscode
import { ITextBuffer } from 'vs/editor/common/model'
import { AudioCue } from 'vs/platform/audioCues/browser/audioCueService'
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration'
import { ITextModelService } from 'vs/editor/common/services/resolverService'
import { registerServiceInitializeParticipant } from './services'

type PartialMutable<T> = Partial<{
Expand Down Expand Up @@ -322,4 +325,10 @@ registerServiceInitializeParticipant(async (accessor) => {
telemetryService.publicLog2 ??= () => {}
telemetryService.publicLogError ??= () => {}
telemetryService.publicLogError2 ??= () => {}

const textResourceConfigurationService: PartialMutable<ITextResourceConfigurationService> = accessor.get(ITextResourceConfigurationService)
textResourceConfigurationService.onDidChangeConfiguration ??= Event.None

const textModelService: PartialMutable<ITextModelService> = accessor.get(ITextModelService)
textModelService.registerTextModelContentProvider ??= () => Disposable.None
})

0 comments on commit e002e7a

Please sign in to comment.