[]previous and next page

PlatformInit

What a platform adds to a request.

What a platform adds to a request.

Import#

ts
import type { PlatformInit } from "@shadow-js/dusk/server";

Signature#

ts
interface PlatformInit {
  /** The client address the platform reports (already trusted by the platform, never by the client). */
  readonly clientAddress?: string | undefined;
  /** Keeps background work alive after the response (Workers `ctx.waitUntil`, Vercel, Netlify). */
  readonly waitUntil?: ((promise: Promise<unknown>) => void) | undefined;
  /** Where the visitor is, as the platform reported it (see `event.geo`). */
  readonly geo?: GeoInfo | undefined;
}

Members#

Name Type Description
clientAddress? readonly clientAddress?: string | undefined The client address the platform reports (already trusted by the platform, never by the client).
waitUntil? readonly waitUntil?: ((promise: Promise<unknown>) => void) | undefined Keeps background work alive after the response (Workers ctx.waitUntil, Vercel, Netlify).
geo? readonly geo?: GeoInfo | undefined Where the visitor is, as the platform reported it (see event.geo).