Double-underscored arguments in AMD output: is this expected behaviour?

Topics: General
Mar 28, 2013 at 4:46 PM
Edited Mar 28, 2013 at 4:47 PM
I have this bit of TypeScript in one file which imports a module:
import storage = module('util/storage');

var myStore = new storage.HashStore();
If I compile to a AMD module it creates the following define statement. Notice the "storage" parameter and how it's directly assigned to the variable of the normal name.
define(["require", "exports", 'util/storage'], function(require, exports, __storage__) {
    var storage = __storage__;
    var myStore = new storage.HashStore();
})
Also I'm confused on why it would specify "require" and "exports" dependency parameters, wouldn't those be defined in the scope by the AMS loader?