typescript - How to access something in the global namespace with the same name as something in a module? -
for example:
declare function foo(x : string, y : boolean) : string; module bar { export function foo(x : string) { homecoming ???.foo(x, true); } }
how can access global foo
anywhere within bar
(where raw foo
reference implicitly reference bar.foo
)?
there isn't way this.
technically write window['foo']
, break in runtimes global object not called window
.
namespaces typescript
No comments:
Post a Comment