DurableStateOptionsValidator
Esta página aún no está disponible en tu idioma.
Defined in: src/persistence/DurableStateOptions.ts:64
Rejects a persistenceId that cannot be a storage key (#133).
The rules themselves live in PersistenceIdValidator — shared with
PersistentActor, ReplicatedEventSourcedActor and the journals, so
the three actor flavours cannot drift on what an id may look like. Only
the error type differs: here the id arrives as an option, so a
violation is an OptionsError reported against the persistenceId
field, consistent with every other XOptionsValidator.
An unset persistenceId passes, as every check helper does on
undefined — required-ness is not this validator’s job. There is no
separate nonEmptyString call: the shared rule already rejects ''
with the same wording, and stating it twice invites the two to drift.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”S
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DurableStateOptionsValidator<
S>():DurableStateOptionsValidator<S>
Defined in: src/persistence/DurableStateOptions.ts:65
Returns
Section titled “Returns”DurableStateOptionsValidator<S>
Overrides
Section titled “Overrides”OptionsValidator<DurableStateOptionsType<S>>.constructor
Methods
Section titled “Methods”validate()
Section titled “validate()”validate(
settings):void
Defined in: src/util/OptionsValidator.ts:75
Check the (merged) settings; throws OptionsError on the first
violation. Unset (undefined) fields always pass.
Parameters
Section titled “Parameters”settings
Section titled “settings”Partial<T>
Returns
Section titled “Returns”void
