let runtimeConstructor: SwiftRuntimeConstructor | undefined = undefined; try { const { SwiftRuntime } = await import( // @ts-ignore "./JavaScriptKit_JavaScriptKit.resources/Runtime/index.mjs" ); runtimeConstructor = SwiftRuntime; } catch { console.log( "JavaScriptKit module not available, running without JavaScriptKit runtime." ); }
意図的な制御があるし、そうっぽいな