=== tests/cases/compiler/genericReversingTypeParameters2.ts === class BiMap { >BiMap : BiMap >K : K >V : V private inverseBiMap: BiMap; >inverseBiMap : BiMap >BiMap : BiMap >V : V >K : K public get(key: K): V { return null; } >get : (key: K) => V >key : K >K : K >V : V >null : null public inverse(): BiMap { return null; } >inverse : () => BiMap >BiMap : BiMap >V : V >K : K >null : null } var b = new BiMap(); >b : BiMap >new BiMap() : BiMap >BiMap : typeof BiMap var i = b.inverse(); // used to get the type wrong here. >i : BiMap >b.inverse() : BiMap >b.inverse : () => BiMap >b : BiMap >inverse : () => BiMap var r2b = i.get(1); >r2b : string >i.get(1) : string >i.get : (key: number) => string >i : BiMap >get : (key: number) => string >1 : number