( is: (value: E) => value is T, annotations?: Schema.Annotations.Filter )
| 3225 | |
| 3226 | /** @internal */ |
| 3227 | export function makeFilterByGuard<T extends E, E>( |
| 3228 | is: (value: E) => value is T, |
| 3229 | annotations?: Schema.Annotations.Filter |
| 3230 | ): Filter<any> { |
| 3231 | return new Filter( |
| 3232 | (input: E, _ast, options) => is(input) ? undefined : new SchemaIssue.InvalidValue(undefined, input, options), |
| 3233 | annotations, |
| 3234 | true // after a guard, we always want to abort |
| 3235 | ) |
| 3236 | } |
| 3237 | |
| 3238 | /** @internal */ |
| 3239 | export function isFinite(annotations?: Schema.Annotations.Filter) { |