* Unify substitution type `any` handling into costruction and instantiation * Strengthen supertype reduction check to reduce breakage * Rename conditional type fields per convention * Explicitly handle anyish signatures in compareSignaturesRelated so strict variance doesnt kill subtyping * Allow tuple expansions to an `any` rest to be considered an `any` signature as well
7 lines
342 B
TypeScript
7 lines
342 B
TypeScript
// @strict: true
|
|
type UnionKeys<T> = T extends any ? keyof T : never;
|
|
type BugHelper<T, TAll> = T extends any ? Exclude<UnionKeys<TAll>, keyof T> : never
|
|
type Bug<TAll> = BugHelper<TAll, TAll>
|
|
type Q = UnionKeys<{ a : any } | { b: any }> // should be "a" | "b"
|
|
type R = Bug<{ a : any } | { b: any }> // should be "a" | "b"
|