Skip to content
Myr

utils.d.ts

This file

Path

types/utils.d.ts

13 lines · 644 bytes · TypeScript

Last changed by

Remove the old `stdio: [..., 'ipc']` syntax (#1245)Sindre Sorhusbefore adoptiondcf611c

History of this file

Take it

The walk stopped after 200 commits: lines older than 9f65b86 point at it.

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 1–7why, one step back
1export type Not<Value extends boolean> = Value extends true ? false : true;
23export type And<First extends boolean, Second extends boolean> = First extends true ? Second : false;45export type Unless<Condition extends boolean, ThenValue, ElseValue = never> = Condition extends true ? ElseValue : ThenValue;67export type AndUnless<Condition extends boolean, ThenValue, ElseValue = unknown> = Condition extends true ? ElseValue : ThenValue;

Fix complexity bug with types (#1037)ehmickybefore adoption6cc519b

lines 8–11why, one step back
8
9// Whether any of T's union element is the same as one of U's union element.10// `&` does not work here.11export type Intersects<T, U> = true extends (T extends U ? true : false) ? true : false;

Ensure all `d.ts` files are considered as ESM (#1216)Sindre Sorhusbefore adoption964f650

lines 12–13why, one step back
12
13export {};