GeoLeaf Core API - v3.0.0
    Preparing search index...

    Variable SWRegisterConst

    SWRegister: {
        _registration: ServiceWorkerRegistration | null;
        _swPath: string;
        register(
            options?: { path?: string; scope?: string },
        ): Promise<ServiceWorkerRegistration | null>;
    } = ...

    Service Worker registration helper.

    🛑 IL N'EST PAS SUR LE NAMESPACE, et son @example prétendait le contraire. @namespace GeoLeaf._SWRegister et await GeoLeaf._SWRegister.register() décrivaient un membre que rien ne montait : la seule affectation de GeoLeaf._SWRegister dans tout le dépôt est dans un harnais de test. L'exemple était copiable-collable et faux — la gate typecheck-docs-examples l'a fait rougir dès que la déclaration fantôme est tombée de global.d.ts.

    Le seul appelant réel est capabilities/pwa/lifecycle.ts, par import.

    Type Declaration

    • _registration: ServiceWorkerRegistration | null
    • _swPath: string

      Chemin du script de worker. Un seul existe dans ce dépôt : sw-core.js.

    • register: function
      • Register the Service Worker. No-op in environments that don't support Service Workers.

        Parameters

        • Optionaloptions: { path?: string; scope?: string } = {}
          • Optionalpath?: string

            Chemin du script. ⚠️ Ce paramètre n'a aucun appelant qui le renseigne : il documentait un second worker (sw.js) qui n'a jamais existé dans ce dépôt.

          • Optionalscope?: string

            SW scope

        Returns Promise<ServiceWorkerRegistration | null>

        const reg = await SWRegister.register({ scope: "./" });
        
    import { SWRegister } from "./kernel/storage/index.js";
    await SWRegister.register({ scope: "./" });