export type OrNil = T | undefined | null; export type OrNone = T | undefined | null | false | ''; export type PromiseData = T extends Promise ? R : T; export type FunctionParam = T extends (arg: infer R) => any ? R : any; export type FunctionResult = T extends (...args: any[]) => infer R ? R : any;