import { <binding1_1> as <binding1_2>, ..., <bindingN_1> as <bindingN_2> } from <from>
The _1 parts of bindings are therefore the identifier names that are
imported, as specified in export clauses of the module. The _2 parts
are the names under which they are imported in the current module.
Special cases:
When _1.name == _2.name, there is shorter syntax in ES, i.e.,
import { binding } from 'from'.
When _1.name == "default", it is equivalent to a default import.
import
statement, except namespace import.This corresponds to the following syntax:
import { <binding1_1> as <binding1_2>, ..., <bindingN_1> as <bindingN_2> } from <from>
The
_1
parts of bindings are therefore the identifier names that are imported, as specified inexport
clauses of the module. The_2
parts are the names under which they are imported in the current module.Special cases:
_1.name == _2.name
, there is shorter syntax in ES, i.e.,import { binding } from 'from'
._1.name == "default"
, it is equivalent to a default import.