Typescript check against ES5