// @strict: true const fn1 = ( params: Pick>, ): Params => params; function fn2(x: Exclude) { var y: T = x; x = y; } const fn3 = ( params: Pick>, ): Params => params; function fn4(x: Extract) { var y: T = x; x = y; } declare var x: Extract; // Should be `numebr | string` and not `any` type ExtractWithDefault = T extends U ? T : D; type ExcludeWithDefault = T extends U ? D : T; const fn5 = ( params: Pick>, ): Params => params; function fn6(x: ExcludeWithDefault) { var y: T = x; x = y; } const fn7 = ( params: Pick>, ): Params => params; function fn8(x: ExtractWithDefault) { var y: T = x; x = y; } type TemplatedConditional = TCheck extends TExtends ? TTrue : TFalse; const fn9 = ( params: Pick>, ): Params => params; function fn10(x: TemplatedConditional) { var y: T = x; x = y; } const fn11 = ( params: Pick>, ): Params => params; function fn12(x: TemplatedConditional) { var y: T = x; x = y; } declare var z: any; const zee = z!!!; // since x is `any`, `x extends null | undefined` should be both true and false - and thus yield `any`