swc/crates/swc_ecma_parser/tests/tsc/newTargetNarrowing.ts

13 lines
164 B
TypeScript
Raw Normal View History

// @target: es6
// @strict: true
function foo(x: true) { }
function f() {
if (new.target.marked === true) {
foo(new.target.marked);
}
}
f.marked = true;