UNPKG

@3fv/guard

Version:

TypeScript guard suite

7 lines (6 loc) 247 B
export type TypeGuard<T> = (o: any) => o is T; export type ClassConstructor<T> = new (...args: any[]) => T; export type LiftTypeGuard<T> = () => boolean; export type TypeGuardExtras<T> = TypeGuard<T> & { lift: (o: any) => LiftTypeGuard<T>; };