Andrew Fedoniouk (2013-07-10T23:15:12.000Z)
Consider this simple construct:

module "test" {
    export function setVar() {
        gvar = "GVAR";               // note 'gvar' is not defined in the module
    }
    export function getVar() {
        return gvar;
    }
}

module Test from "test";

Having this in place I am calling

Test.setVar();

Question: where is that 'gvar' created? Possible case:

a. {{globalns}}.gvar == "GVAR"   // so in global namespace or
b. {{globalns}}.Test.gvar == "GVAR" // in module namepspace

In other words does the module establish its own dynaimic namespace/scope?

If that behavior is spec'ed already I'll appreciate for the link.

--
Andrew Fedoniouk.

http://terrainformatica.com
domenic at domenicdenicola.com (2013-07-13T01:03:13.184Z)
Consider this simple construct:

```js
module "test" {
    export function setVar() {
        gvar = "GVAR";               // note 'gvar' is not defined in the module
    }
    export function getVar() {
        return gvar;
    }
}

module Test from "test";
```

Having this in place I am calling

```js
Test.setVar();
```

Question: where is that `gvar` created? Possible case:

1. `{{globalns}}.gvar == "GVAR"   // so in global namespace` or
2. `{{globalns}}.Test.gvar == "GVAR" // in module namespace`

In other words does the module establish its own dynamic namespace/scope?

If that behavior is spec'ed already I'll appreciate for the link.