Preview:ts export interface Typ { val: string } export function fn<X extends Typ = Typ>() { const val_1: "val" extends keyof Typ ? string : number = "......." //! Type 'string' is not assignable to type '"val" extends keyof X ? string : number'.(2322) const val_2: "val" extends keyof X ? string : number = "...... ...
You can choose specific lines to embed by selecting them before copying the link.