mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Settle on customTSWorkerFactory
This commit is contained in:
parent
c402ee962f
commit
471de29a20
2 changed files with 4 additions and 4 deletions
|
|
@ -252,11 +252,11 @@ export function create(ctx: IWorkerContext, createData: ICreateData): TypeScript
|
|||
// @ts-ignore - This is available in a webworker
|
||||
importScripts(createData.customWorkerPath)
|
||||
// @ts-ignore - This should come from the above eval
|
||||
if (!self.extendTSWorkerFactory) {
|
||||
throw new Error(`The script at ${createData.customWorkerPath} does not add extendTSWorkerFactory to self`)
|
||||
if (!self.customTSWorkerFactory) {
|
||||
throw new Error(`The script at ${createData.customWorkerPath} does not add customTSWorkerFactory to self`)
|
||||
}
|
||||
// @ts-ignore - The throw validates this
|
||||
TSWorkerClass = self.extendTSWorkerFactory(TypeScriptWorker)
|
||||
TSWorkerClass = self.customTSWorkerFactory(TypeScriptWorker)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue