[typescript] How to get a variable type in Typescript?