typescript cast object to type. There are any references about typescript cast object to type in here. you can look below.