import { initialize } from "../util/worker-init" ; import { create } from '../../../node_modules/monaco-editor/esm/vs/language/typescript/tsWorker.js' ; export const connect = ( port ) => { let initialized = false ; port . onmessage = ( e ) => { initialize ( function ( ctx , createData ) { return create ( ctx , createData ) ; } , port , initialized ) ; } ; } ; self . onconnect = ( e ) => { let [ port ] = e . ports ; connect ( port ) ; } ; if ( ! ( "SharedWorkerGlobalScope" in self ) ) { connect ( self ) ; } export { } ;