Unified External Type

The external type is used to represent all runtime JavaScript types as a single type during compile time. While all JavaScript types are treated as a single type at compile time, they are not treated like this at runtime. Instead, at runtime, any symbol having the external type can be any one of the possible JavaScript types.

The var keyword will declare a variable with the external type. The function keyword will declare a function with a return type of the external type. Finally, the external keyword can be used to import code, libraries, and functions from JavaScript or to explicitly mark a function parameter with the unified external type.

See Also

Share

HTML | BBCode | Direct Link