Typescript Define Type In Function Int