INNER CODE UNIT · TypeScript

loadRuntimeConfig

prisma/orm · apps/lsp-playground/src/client/main.ts:103

async function loadRuntimeConfig(): Promise<RuntimeConfig> {
  const response = await fetch(RUNTIME_CONFIG_PATH, { cache: 'no-store' });
  if (!response.ok) {
    throw new Error(
      `Failed to load playground runtime config: ${response.status} ${response.statusText}`,
    );
  }
  const value: unknown = await response.json();
  if (!isRuntimeConfig(value)) {
    throw new Error('Invalid playground runtime config');
  }
  return value;
}

function configureWorkerFactory(logger?: ILogger): void {
  const workerLoaders = {
    editorWorkerService: () => new Worker(editorWorkerUrl, { type: 'module' }),
  };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…