Typescript Max Number In Javascript