GuardSpec
Defined in: extract/spec.ts:137
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:141
readonlykind:"guard"
Defined in: extract/spec.ts:138
predicate()
Section titled “predicate()”
readonlypredicate: (value) =>boolean
Defined in: extract/spec.ts:140
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean
reason?
Section titled “reason?”
readonlyoptionalreason:string
Defined in: extract/spec.ts:142
source
Section titled “source”
readonlysource:T
Defined in: extract/spec.ts:139