API reference › @evolu/web › createRun
Call Signature
function createRun(): DisposableRun;
Defined in: Task.ts:42
Creates a root Run for the browser.
Defects are reported with the browser's global reportError. A custom
reportDefect dependency overrides the browser default.
Example
import { createConsole, createConsoleFormatter, ok } from "@evolu/common";
import { createRun } from "@evolu/web";
const console = createConsole({
formatter: createConsoleFormatter()({
timestampFormat: "relative",
}),
});
await using run = createRun({ console });
const appPromise = run.ok(() => ok("started"));
expect(await appPromise).toBe("started");
Call Signature
function createRun<D>(deps: RunCustomDeps<D>): DisposableRun<D>;
Defined in: Task.ts:45
Creates a root Run for the browser with custom dependencies.