( is: (value: E) => value is T, annotations?: Schema.Annotations.Filter )
| 4245 | |
| 4246 | /** @internal */ |
| 4247 | export function makeFilterByGuard<T extends E, E>( |
| 4248 | is: (value: E) => value is T, |
| 4249 | annotations?: Schema.Annotations.Filter |
| 4250 | ): Filter<any> { |
| 4251 | return new Filter( |
| 4252 | (input: E, _ast, options) => is(input) ? undefined : new SchemaIssue.InvalidValue(undefined, input, options), |
| 4253 | annotations, |
| 4254 | true // after a guard, we always want to abort |
| 4255 | ) |
| 4256 | } |
| 4257 | |
| 4258 | /** @internal */ |
| 4259 | export function isFinite(annotations?: Schema.Annotations.Filter) { |