Skip to content

Instantly share code, notes, and snippets.

@chriskrycho
Created July 4, 2017 14:21
Show Gist options
  • Save chriskrycho/85f01542bdff5444e467b137e4056ab1 to your computer and use it in GitHub Desktop.
Save chriskrycho/85f01542bdff5444e467b137e4056ab1 to your computer and use it in GitHub Desktop.
export namespace Foo {
export const bar: boolean;
export const quux: (a: boolean) => string;
}
export default Foo;
export const baz: string;
import Foo from 'foo';
import { baz } from 'foo';
import Quux from 'quux';
console.log(Foo.bar);
console.log(baz === 'something');
console.log(Quux.Foo === Foo);
import FooFoo from 'foo';
export namespace Quux {
export const Foo: typeof FooFoo;
}
export default Quux;
{
"compilerOptions": {
"strict": true,
"noEmit": false,
"baseUrl": "./",
"typeRoots": ["./"]
},
"include": ["**/*"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment