Typescript module creation AMD vs Common JS

amd, commonjs, module, typescript

Solution

AMD is used in the browser (e.g RequireJS) : reason is it allows parallel download of files as network latency is a major bottleneck.

CommonJS is used in the server (e.g. nodejs) where files can be read from disk upfront, but you don't want to read a file till you try to use the code it contains.

Here is a video on the subject that further explains this : http://www.youtube.com/watch?v=KDrWLMUY0R0

Problem

Can any Typescript experts clarify when and why you would choose AMD vs Common JS for module creation when using Typescript?

Original source