Is keyword "export" required for an interface/function/etc in a declared or/and ambient module?

Topics: General, Language Specification
Apr 27, 2013 at 1:06 AM
Example:

FILE: module1test4.ts
declare module "module1test4" {
    interface TestInterface {
    }
}
FILE: module2test4.ts
import m = module("module1test4")
var a: m.TestInterface;
These modules are compiled without errors. But I found no information in the specification about using export in ambient or declared modules.

Help me, please
Coordinator
Apr 29, 2013 at 3:37 PM
We went back and forth a couple times on this. I believe we may allow you to elide 'export' because the ambient module is describing the public surface, without talking about its implementation. You'd generally only not export something from the module if it was used in the implementation and not the public interface.

It appears to be optional in the currently 0.9.x work as well.