The triple script dialect includes
Unlike ECMA-262, when using
typeof the righthand side must be parenthesized. E.g.
typeof foo is an error, but
typeof(foo) is not.
NB: The result of a
typeof expression is a string, and there is no need to use triple equals when checking the result. In fact, it is an error to check a
typeof expression with triple equals.
There is no support for "ambient" names in the triple script dialect; the linkage model requires that it be possible for all scopes to be statically checked with regard to names' "visibility". The
typeof "escape hatch" is the only way to avoid the combination of explicit imports and static linkage.