UNPKG

ts-neverfalse

Version:

Automated error coalescing and aggregation to simplify advanced type evaluations in Typescript

17 lines (15 loc) 354 B
declare global { namespace NeverFalse { interface Config { } } } interface NFConfig { includeT?: boolean; } type Config<T> = { includeT: false; } & T; type includeT<T extends NFConfig> = T["includeT"] extends true ? true : false; type INCLUDE_T = includeT<NeverFalse.Config>; export type { Config, INCLUDE_T, includeT };