SwRuntime
Type. Public service worker runtime interface.
Table of contents
Category
Type
Type import
tsimport type { SwRuntime } from "valyrian.js/sw";Public signature
tsinterface SwRuntime { state: Readonly<SwRuntimeState>; on: (event: SwRuntimeEvent, callback: (payload?: unknown) => void) => () => void; off: (event: SwRuntimeEvent, callback: (payload?: unknown) => void) => void; applyUpdate: () => void; checkForUpdate: () => Promise<void>; unregister: () => Promise<boolean>; }Type usage
SwRuntime is the public state, subscription and update surface implemented by SwRuntimeManager.