Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/samualtnorman/predicates. A library of predicate functions and builders intended to be used with Ty
Something went wrong. Try again.
1234567import type { UnionToIntersection } from "@samual/lib"import type { Predicate, PredicateType } from "."
export const IntersectSchema = <T extends Predicate<any>>(predicates: T[]) => (value: unknown): value is UnionToIntersection<PredicateType<T>> => predicates.every(predicate => predicate(value))