On Sat, Jun 8, 2013 at 7:07 PM, Sam Tobin-Hochstadt <sa...@ccs.neu.edu> wrote:
>
> I think you misunderstand.  The requirement that modules not have free
> variables at compile time *includes* global references. I expect that
> development environments won't have a problem handling this or
> enforcing whatever properties you're looking for.

I think I see what you're saying. Let me just see if I'm correct.

At compile time any references in a module which are not explicitly
imported but are language globals will not cause compile errors.
Any references which aren't explicitly imported and aren't language
globals will cause a compile error?

So

module "test" {
    new Date();
}

is fine.

While

module "test2" {
    $
}

will throw an error unless you add the line

import $ from "jquery";

even if jQuery was available in the global scope and had been loaded
in by a normal script tag?
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to