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