Skip to main content

ManagerFactory TypeAlias

Package internal function declaration for state and notification instantiation.

This API is reserved for internal system use and should not be imported directly. It may change at any time without notice.

For more information about our API support guarantees, see here.

Signature

type ManagerFactory<TKey extends string, TValue extends ValueDirectoryOrState<unknown>, TManager> = {
instanceBase: new (...args: any[]) => unknown;
} & ((key: TKey, datastoreHandle: StateDatastoreHandle<TKey, TValue>) => {
initialData?: {
value: TValue;
allowableUpdateLatencyMs: number | undefined;
};
manager: StateValue<TManager>;
});

Type Parameters

ParameterConstraintDescription
TKeystring
TValueValueDirectoryOrState<unknown>
TManager

Remarks

Direct use of this type is discouraged. If in need, try to use the type returned by the factory functions instead, as those are more specific and stable.