Browse documentation

SwRuntimeState

Type. Service worker registration and update state.

Table of contents

Category

Type

Type import

ts
import type { SwRuntimeState } from "valyrian.js/sw";

Public signature

ts
type SwRuntimeState = { updateAvailable: boolean; installing: boolean; registration: ServiceWorkerRegistration | null; waiting: ServiceWorker | null; };

Type usage

SwRuntimeState exposes registration, installation and waiting-worker state.