API reference@evolu/web › createRun

const createRun: CreateRun<RunDeps>;

Defined in: Task.ts:71

Creates Run for the browser with global error handling.

Registers error and unhandledrejection handlers that log errors to the console. Handlers are removed when the Run is disposed.

Example

const console = createConsole({
  formatter: createConsoleFormatter()({
    timestampFormat: "relative",
  }),
});

await using run = createRun({ console });
await using stack = new AsyncDisposableStack();

stack.use(await run.orThrow(startApp()));