add typescript support for server