./ ?C:/foo or http://example.com/bar?//computername/module ?Falsy<T> | numberFalsy<T> is a conditional type that produces a subset of "" | false | 0 | null | undefinedif (!x) { x; /*1*/ } else { x /*2*/ } /*3*/x; for some x: Tx should have type Truthy<T>, at 2 has type Falsy<T>x would have type Truthy<T> | Falsy<T> due to how control flow analysis worksx to go back to T again at this point or the type is effectively unusableT | U where T is W extends X ? Z1 : never and U is W extends X ? never : Z2, for the same X, T | U becomes Z1 | Z2ts
if (!x) {
if (typeof x === "string" {
x; // Stringy<Truthy<T>>
}
} else {
x;
}
x; // Stringy<Truthy<T>> | NotStringy<Truthy<T>> | Falsy<T>
Extract<keyof T, "a" | "b"> is the same as (keyof T) & ("a" | "b") due to union-intersection distributivity and never-reduction{ __tag: void } & string because people use it for tagging{ toString(): string } which matches primitivesExclude operator (subtraction types) for representing e.g.string - "a"Extract / filtering operations be new primitives?I'm wondering if we're in a state where workarounds unsoundness and corner cases make things actually unintelligible for the - even experienced - end user?
That may not be the case and we may find a sweet spot but I'm questioning
"10/19/2019" :)
Most helpful comment
"10/19/2019" :)