mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 00:23:10 +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");
|