Skip to content
kazuho edited this page Jul 3, 2012 · 7 revisions

A source file may refer to the classes defined in other source files by importing the files. The import statement has several variations.

// import all classes that do not start with "_" from "a.jsx"
import "a.jsx";

// import two classes C1 and _Internal from "a.jsx"
import C1, _Internal from "a.jsx";

// import all classes that do not start with "_" under prefix A
import "a.jsx" into A; // class C1 of a.jsx can be referred to as: A.C1

// import all files under directory "sub"
import "sub/*.jsx";
Clone this wiki locally