GuardSpec
Defined in: extract/spec.ts:149
Guard specification - validates a successfully extracted value against a predicate. Fails with ‘constraint’ kind if the predicate returns false.
Type Parameters
Section titled “Type Parameters”Properties
Section titled “Properties”description
Section titled “description”
readonlydescription:string
Defined in: extract/spec.ts:153
readonlykind:"guard"
Defined in: extract/spec.ts:150
predicate()
Section titled “predicate()”
readonlypredicate: (value) =>boolean
Defined in: extract/spec.ts:152
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean
reason?
Section titled “reason?”
readonlyoptionalreason:string
Defined in: extract/spec.ts:154
source
Section titled “source”
readonlysource:T
Defined in: extract/spec.ts:151