import

The import keyword makes the contents of a module available in a script or another module. This keyword operates with the keyword export as its counterpart.

An import statement assigns a module alias with as. A with block optionally lists imported names, and may restate types for clarity. Without a with block, exported elements are accessed through the module alias.

The use of import is documented together with export and modules.

User Contributed Notes
0 notes + add a note