@@ -13,8 +13,25 @@ import { getSingletonServiceDescriptors } from 'vs/platform/instantiation/common
1313import { ILabelService } from 'vs/platform/label/common/label'
1414import { Event } from 'vs/base/common/event'
1515import { IQuickInput , IQuickPick } from 'vs/base/parts/quickinput/common/quickInput'
16+ // @ts -ignore Creating a d.ts is not worth it
17+ import { LanguageService as MonacoLanguageService } from 'monaco-editor/esm/vs/editor/common/services/languageService.js'
18+ import { LanguageService as VScodeLanguageService } from 'vscode/vs/editor/common/services/languageService.js'
19+ // @ts -ignore Creating a d.ts is not worth it
20+ import { NoOpNotification as MonacoNoOpNotification } from 'monaco-editor/esm/vs/platform/notification/common/notification.js'
21+ import { NoOpNotification as VScodeNoOpNotification } from 'vscode/vs/platform/notification/common/notification.js'
22+
23+ // @ts -ignore Override of a readonly property
24+ MonacoNoOpNotification . prototype . onDidClose ??= Event . None
25+ for ( const key of Object . getOwnPropertyNames ( VScodeNoOpNotification . prototype ) ) {
26+ if ( ! Object . hasOwnProperty . call ( MonacoNoOpNotification . prototype , key ) ) {
27+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28+ MonacoNoOpNotification . prototype [ key ] = ( VScodeNoOpNotification . prototype as any ) [ key ]
29+ }
30+ }
31+
32+ MonacoLanguageService . prototype . getRegisteredLanguageIds ??= VScodeLanguageService . prototype . getRegisteredLanguageIds ;
1633
17- ( MonacoProgressBar as typeof VScodeProgressBar ) . prototype . hide = VScodeProgressBar . prototype . hide
34+ ( MonacoProgressBar as typeof VScodeProgressBar ) . prototype . hide ?? = VScodeProgressBar . prototype . hide
1835
1936// eslint-disable-next-line dot-notation
2037; ( MonacoThemable as typeof VScodeThemable ) . prototype [ 'getColor' ] ??= VScodeThemable . prototype [ 'getColor' ]
0 commit comments