import * as foo from './foo'; function a () { foo.foo(); foo.foo(); var a; if ( a.b ) { // empty } } a();