export type Expect = T; export type ExpectTrue = T; export type ExpectFalse = T; export type IsTrue = T; export type IsFalse = T; export type Equal = (() => T extends X ? 1 : 2) extends < T, >() => T extends Y ? 1 : 2 ? true : false; export type NotEqual = true extends Equal ? false : true; // https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360 export type IsAny = 0 extends 1 & T ? true : false; export type NotAny = true extends IsAny ? false : true; export type Debug = { [K in keyof T]: T[K] }; export type MergeInsertions = T extends object ? { [K in keyof T]: MergeInsertions } : T; export type Alike = Equal, MergeInsertions>; export type ExpectExtends = EXPECTED extends VALUE ? true : false; export type ExpectValidArgs< FUNC extends (...args: any[]) => any, ARGS extends any[], > = ARGS extends Parameters ? true : false; export type UnionToIntersection = ( U extends any ? (k: U) => void : never ) extends (k: infer I) => void ? I : never;