Перейти к содержимому
Русский

DurableStateOptionsValidator

Это содержимое пока не доступно на вашем языке.

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.

S

new DurableStateOptionsValidator<S>(): DurableStateOptionsValidator<S>

Defined in: src/persistence/DurableStateOptions.ts:65

DurableStateOptionsValidator<S>

OptionsValidator<DurableStateOptionsType<S>>.constructor

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.

Partial<T>

void

OptionsValidator.validate