requireAbilityDigest
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
requireAbilityDigest(
context?):string
Defined in: packages/pipeline-casl/src/helpers/ability-digest.ts:60
abilityDigest, failing closed: it throws instead of returning
undefined when no ability is present. Use it where a missing ability must
stop the operation, such as an idempotency replay scope, whose factory must
throw rather than let an operation run without a scope.
Parameters
Section titled “Parameters”context?
Section titled “context?”IPipelineContext<unknown, unknown>
The pipeline execution; omitted, the running one.
Returns
Section titled “Returns”string
The 64-character hex digest.
Throws
Section titled “Throws”When no ability is present.
Throws
Section titled “Throws”When a rule holds a value that is not plain JSON.
Example
Section titled “Example”idempotent({ keyFactory, replayScopeFactory: requireAbilityDigest });