Jun 1 2017

Using TypeScript to implement Multi-Platform Libraries

Category: JavaScript | TypeScriptFrancesco @ 02:40

This time my post has been published on Dotnet curry.com. Enjoy it!

TypeScript can target several JavaScript versions and several module export conventions (AMD, CommonJS, System, ES6, or simply globals + namespaces).

However, in general, each platform requires different configuration settings and a different module structure. As a result, there is no built-in option to simultaneously generate JavaScript and declaration files (d.ts) from a single TypeScript source file for several platforms.

More specifically AMD and CommonJS conventions are covered simultaneously by selecting the UMD module target; but globals and ES6, require different settings….Read full article.

Tags: , , , , , , , , ,