Skip to content

Instantly share code, notes, and snippets.

@dherman
Created November 21, 2012 22:58
Show Gist options
  • Save dherman/4128398 to your computer and use it in GitHub Desktop.
Save dherman/4128398 to your computer and use it in GitHub Desktop.
module syntax alternatives
// Option 1: destructuring syntax
import m = module "jquery";
import { foo, bar } = module "jquery";
import foo = (module "jquery").foo;
export { *: module "jquery" };
export { foo: (module "jquery").foo, bar: (module "jquery").bar };
export = stuff;
// Option 2: natural language syntax
import "jquery" as m;
import { foo, bar } from "jquery";
import { foo } from "jquery";
export * from "jquery";
export { foo, bar } from "jquery";
export = stuff;
// Option 3: mishmash
import m = "jquery";
import { foo, bar } from "jquery";
import { foo } from "jquery";
export * from "jquery";
export { foo, bar } from "jquery";
export = stuff;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment