TypeScript/tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts

8 lines
No EOL
161 B
TypeScript

interface I { global: string; }
var result: I;
var result2: I;
if (!(result instanceof RegExp)) {
result = result2;
} else if (!result.global) {
}