Creates a new ReadableSSRExecutorManager instance.
Optional
options: SSRExecutorManagerOptionsAdditional options.
Protected
_executorFilters executors that must be hydrated on the client with the state that was accumulated during SSR.
Protected
Readonly
_executorsThe map from a key to an executor.
Protected
_hydratedMap from an executor to a version of the state that was sent to the client for hydration.
Protected
Readonly
_initialThe map from a key to an initial state that must be set to an executor before plugins are applied. Entries from this map are deleted after the executor is initialized.
Protected
Readonly
_pluginsPlugins that are applied to all executors.
Protected
Readonly
_pubThe pubsub that handles the manager subscriptions.
Protected
_stateStringifies the state of the executor before sending it to the client.
Optional
replacer: ((this, key, value) => any)Optional
space: string | numberOptional
replacer: null | (string | number)[]Optional
space: string | numberReadonly
keySerializes keys of executors.
A nonce string to allow scripts for
script-src
Content-Security-Policy.
Readonly
readableReadonly
writableDeletes the non-active executor from the manager.
If the detached executor is pending then it is not aborted. Subscribe to the detach event on either manager or an executor and abort it manually.
The key of the executor to delete.
true
if the executor was detached, or false
if there's no such executor, or the executor is active.
Resolves with the existing executor or waits for an executor to be created.
The executor key to wait for.
Returns an existing executor or creates a new one.
The unique executor key.
The initial executor value.
Optional
plugins: (undefined | null | ExecutorPlugin<Value>)[]The array of plugins that are applied to the newly created executor.
Returns an existing executor or creates a new one.
The unique executor key.
Optional
initialValue: Value | ExecutorTask<Value> | PromiseLike<Value>The initial executor value.
Optional
plugins: (undefined | null | ExecutorPlugin<NoInfer<Value>>)[]The array of plugins that are applied to the newly created executor.
Injects the initial state for the executor that is created in the future.
The initial state of the hydrated executor that can be created via ExecutorManager.getOrCreate.
true
if the executor was hydrated, or false
if the executor already exists and cannot be hydrated.
Returns an inline <script>
tag with source that hydrates the client with the state accumulated during SSR,
or an empty string if there are no state changes since the last time nextHydrationScript was called.
Returns a script source that hydrates the client with the state accumulated during SSR, or an empty string if there are no state changes since the last time nextHydrationScript was called.
Subscribes a listener to the events published by all executors that are created by this manager.
The listener to subscribe.
The callback that unsubscribes the listener.
Returns serializable executor manager state.
The streaming executor manager that can be used as a transformer for Web Streams. It enqueues executor hydration chunks into the after each chunk from the read side.