Typescript version

Built from Typescript, added some help information and correct distance
calculaion