UMD

UMD

A UMD module is one that can either be used as module (through an import), or as a global (when run in an environment without a module loader). Many popular libraries, such as Moment.js, are written this way. For example, in Node.js or using RequireJS, you would write:

import moment = require("moment");
console.log(moment.format());

whereas in a vanilla browser environment you would write:

console.log(moment.format());
doc_TypeScript
2016-10-04 19:25:41
Comments
Leave a Comment

Please login to continue.