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