swc/crates/swc_ecma_parser/tests/tsc/callChainInference.ts
2022-02-04 17:08:38 +09:00

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");