Question: I am developing an extension using typescript,and I don't know how to use typescript to call web API, anyone know or can provide an sample to me?

Answer: 
Typescript is compiled into javascript, in Javascript specifically node environemnt, there are many ways to make an HTTP call to the web API.
You can use these libraries:

1. axios
2. got
3. node-fetch

These libraries have type definitions.
> 
> I am developing an extension using typescript,and I don't know how to use typescript to call web API, anyone know or can provide an sample to me
> 
> 
> 

You need to write code generation code *specific* to your APP + front end framework. 

For starters checkout <http://type.litesolutions.net/>

---

Just another reason to consider [NodeJS](https://medium.com/@basarat/issues-with-polyglot-programming-8f9ba0bfcb47).