UNPKG

validata

Version:

Type safe data validation and sanitization

16 lines (15 loc) 495 B
import { TypeOf } from './../types'; declare const sample: import("../types").ValueProcessor<{ maybeString: string | undefined; myString: string; numericString: string; }>; export type SampleContract = TypeOf<typeof sample>; interface Sample { maybeString?: string | undefined; myString: string; numericString: string; } type SameType<T, U> = T[] extends U[] ? U[] extends T[] ? true : false : false; export type ThisIsTrue = SameType<SampleContract, Sample>; export {};