CreateSwRuntimeOptions
Type. Service worker runtime configuration.
Table of contents
Category
Type
Type import
tsimport type { CreateSwRuntimeOptions } from "valyrian.js/sw";Public signature
tstype CreateSwRuntimeOptions = { swUrl?: string; scope?: string; strategy?: "prompt-user" | "auto" | "manual"; runtime?: { isNodeJs?: boolean; navigator?: Navigator | null; window?: Window | null; }; };Type usage
CreateSwRuntimeOptions configures worker location, scope, update strategy and runtime adapters.
Defaults
Defaults are swUrl "./sw.js", scope "/" and strategy "prompt-user".