papi-dts
    Preparing search index...
    • Get a value from the shared store, waiting for the shared store service to be initialized first.

      Unlike get, this waits (via waitForInitialization) until the shared store service is initialized, then reads synchronously. A key with a live value returns that value — which may legitimately be undefined. A key that is absent or has been removed has no value: with no defaultValue argument this throws; with a defaultValue (which may itself be undefined) it returns that default.

      If the shared store service is already initialized, the awaited promise is already settled, so execution continues here on the next microtask without yielding to timers or other queued macrotasks — effectively synchronous from the caller's perspective. Note the returned value may not reflect the most up-to-date value, since changes from other processes arrive asynchronously.

      Type Parameters

      • K extends `platform.customNetworkTimeoutMs.${string}`

      Parameters

      • key: K

        The key of the value to retrieve

      Returns Promise<SharedStoreValues[K]>

      A cloned copy of the stored value, or defaultValue if the key has no value

      If the key has no value and no defaultValue was provided

    • Get a value from the shared store, waiting for the shared store service to be initialized first.

      Unlike get, this waits (via waitForInitialization) until the shared store service is initialized, then reads synchronously. A key with a live value returns that value — which may legitimately be undefined. A key that is absent or has been removed has no value: with no defaultValue argument this throws; with a defaultValue (which may itself be undefined) it returns that default.

      If the shared store service is already initialized, the awaited promise is already settled, so execution continues here on the next microtask without yielding to timers or other queued macrotasks — effectively synchronous from the caller's perspective. Note the returned value may not reflect the most up-to-date value, since changes from other processes arrive asynchronously.

      Type Parameters

      • K extends `platform.customNetworkTimeoutMs.${string}`

      Parameters

      • key: K

        The key of the value to retrieve

      • defaultValue: SharedStoreValues[K]

        Returned when the key has no value. Omit to throw instead.

      Returns Promise<SharedStoreValues[K]>

      A cloned copy of the stored value, or defaultValue if the key has no value

      If the key has no value and no defaultValue was provided