Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@samth
Last active December 16, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samth/5355676 to your computer and use it in GitHub Desktop.
Save samth/5355676 to your computer and use it in GitHub Desktop.
// A.js
import y from "B";
console.log("a");
export var x;
// B.js
import z from "C";
console.log("b");
export var y;
// C.js
import x from "A";
console.log("c");
export var z;
/*** Gets transformed into: ***/
module "A" {
import y from "B";
console.log("a");
export var x;
}
module "B" {
import z from "C";
console.log("b");
export var y;
}
export module "C" {
import x from "A";
console.log("c");
export var z;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment