Reputation: 11241
For example:
declare function foo(x : string, y : boolean) : string;
module Bar {
export function foo(x : string) { return ???.foo(x, true); }
}
How can I access the global foo
from anywhere inside Bar
(where a raw foo
reference will implicitly reference Bar.foo
)?
Upvotes: 1
Views: 85
Reputation: 220944
There isn't a good way to do this.
Technically you could write window['foo']
, but this will break in runtimes where the global object is not called window
.
Upvotes: 3