Dynamic JavaScript is out by design
Closures that capture locals, iterators, Promises, prototypes and undeclared properties are not supported.
AssemblyScript looks like TypeScript and compiles straight to fast WebAssembly. It is a different language, though, and your existing JavaScript won't run in it. Here is when that matters.
Writing WebAssembly by hand, or in Rust, is a lot to ask of a TypeScript developer.
AssemblyScript compiles a variant of TypeScript ahead of time to WebAssembly with Binaryen, using WebAssembly's own types such as i32 and f64. There is no interpreter in the way.
For numeric kernels written for WebAssembly, it gives you small, fast modules in a syntax you already read.
Code that relies on dynamic objects, closures or promises has nowhere to go in a language without them.
AssemblyScript has no union types but nullable classes, no closures that capture locals, no iterators, no Promises and no dynamic objects, and throwing aborts the program. It says that dynamicness is out by design.
tinyscript runs JavaScript as written, with its objects, closures, generators and promises, and uses TypeScript only as hints. Both end up as WebAssembly; only one runs the code you already have.
Closures that capture locals, iterators, Promises, prototypes and undeclared properties are not supported.
Most readers need one answer: which tool fits the code they have.