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

11 lines
206 B
TypeScript

// @strictNullChecks: true
declare const envVar: string | undefined;
if (typeof envVar === `string`) {
envVar.slice(0)
}
declare const obj: {test: string} | {}
if (`test` in obj) {
obj.test.slice(0)
}