mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
11 lines
206 B
TypeScript
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)
|
||
|
}
|