"hello world" .replace "world" "mars" ; returns "hello mars"
tools (and others like them) have helped the production compilers that,这一点在PDF资料中也有详细论述
Don't use while let or while loops,更多细节参见PDF资料
Then, when it comes back to check the callback, it will have a contextual type of (x: number) = void, which allows it to infer that x is a number as well.