Index
import
At a global level, you can use import statements of the following form:import "filename";
This statement imports all global symbols from “filename” (and symbols imported there) into the current global scope (different than in ES6 but backwards-compatible for Solidity). This form is not recommended for use, because it unpredictably pollutes the namespace.
The following example creates a new global symbol symbolName whose members are all the global symbols from "filename":
import * as symbolName from "filename";
A variant of this syntax that is not part of ES6, but possibly useful is:
import "filename" as symbolName;
which is equivalent to
import * as
symbolName
from "filename";
.import {symbol1 as alias, symbol2} from "filename";