What AssemblyScript does is rewire the TypeScript compiler API to the BInaryen compiler back end, which is is able to produce WebAssembly binaries. Rather than re-implementing TypeScript as closely as possible at the expense of performance, AssemblyScript attempts to support features as closely as is reasonable without supporting certain dynamic constructs. AssemblyScript programs are valid TypeScript syntactically although not necessarily semantically.
AssemblyScript has a few special requirements. For example, types must be annotated to avoid unwanted implicit conversions. Also, optional functional parameters require an initializer expression. Union types, except
classType | null,
undefined are not supported by design.
Project documentation describes AssemblyScript as new and ambitious, developed by one person [Wirtz] and occasional contributors. Bugs and breaking changes are to be expected. Wirtz plans to support more of TypeScript while waiting on additional WebAssembly capabilities for garbage collection and exception handling. “The ultimate goal is to be able to compile the AssemblyScript compiler to WebAssembly using itself, in a browser, without using clever workarounds.”
Wirtz is pleased with WebAssembly’s binary format. But he sees it creating a challenge for developers in that its intended support of multiple languages will require proficiency in and development environments for different languages.