Last active
January 31, 2017 21:25
-
-
Save vvuk/0847b8175b2821c9c6973aca18e619de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// == one.ts == | |
export interface SomethingPublic { | |
foo(a: number): number; | |
} | |
// == two.ts == | |
// error: SomethingPublic is not visible here | |
// this doesn't help: | |
/// <reference path="one.ts" /> | |
class Foo implements SomethingPublic { | |
foo(a: number): number { | |
return a + 1; | |
} | |
} | |
export createFoo(): Foo { | |
return new Foo(); | |
} | |
// == mything.ts == | |
export * from './one'; | |
// == example.ts == | |
import * as MyThing from './mything'; | |
let foo = MyThing.createFoo(); | |
// MyThing.Foo -> not defined/exported here | |
foo.foo(5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment