Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update README.md

  • Loading branch information...
commit c6926e0ac4e8986e558f3069ca6ef5afc2734bff 1 parent f12fa03
@basarat basarat authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 test/index/README.md
View
17 test/index/README.md
@@ -66,6 +66,23 @@ var b1 = new B1();
var b2 = new B2();
```
+Or you can import at a more granular level (for lazy loads):
+```
+import a = require('../../index/a');
+import b1 = require('../../index/b1');
+import b2 = require('../../index/b2');
+
+// USE CLASSES FROM A/B:
+
+// With `export =` and naming file same as main export variable:
+var a1 = new a.A1();
+var a2 = new a.A2();
+
+// Conventional javascript file naming and exporting class with `export class ClassName`
+var b1Instance = new b1.B1();
+var b2Instance = new b2.B2();
+```
+
# Limitations
* *No* file should import a `foldername.ts` above it in the tree to prevent a cyclic dependency (since `foldername.ts` already has a require statement pointing to this subfile)

0 comments on commit c6926e0

Please sign in to comment.
Something went wrong with that request. Please try again.