Writing Emscripten libraries in TypeScript

We’ll use the new TypeScript decorators to implement a usable syntax for writing Emscripten libraries. The package is available on npm. Emscripten libraries allow calling JavaScript code from asm.js i

Counting sign changes without branching

The full code with a test is in a gist. Suppose we have a list of numbers and want to know how many times the signs of the numbers change, meaning a positive number is followed by a negative one or vi

Publishing TypeScript-based modules on npm

TypeScript 1.5 supports ES6 style module import and export declarations. Let’s see how modules can now be easily distributed on npm together with type information using a tool called autodts. The samp