mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +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");
|