mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 19:22:32 +03:00
18 lines
219 B
TypeScript
18 lines
219 B
TypeScript
|
// @strict: true
|
||
|
|
||
|
// Repro from #42404
|
||
|
|
||
|
interface Y {
|
||
|
foo<T>(this: T, arg: keyof T): void;
|
||
|
a: number;
|
||
|
b: string;
|
||
|
}
|
||
|
|
||
|
declare const value: Y | undefined;
|
||
|
|
||
|
if (value) {
|
||
|
value?.foo("a");
|
||
|
}
|
||
|
|
||
|
value?.foo("a");
|