Import/export syntax
Module import and export syntax declares dependencies between modules and makes selected bindings available to other modules.
The Joy of JavaScript
A JavaScript module feature for making bindings or values available to other modules.
- How it is used
- Standardizes how client and server modules expose, consume, and organize reusable JavaScript code.
- How deep it goes
- Defines module privacy, export forms, path specifiers, and static analysis, while deferring the complete set of syntax combinations.
- Examples
- Uses classes, validation utilities, blockchain domain modules, relative paths, absolute paths, and remote module URLs.
- What you can do after
- Apply it via ESM to design reusable module APIs and expose only the code other parts of an application need.
Read how The Joy of JavaScript explains import/export syntax →
Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond
A module syntax form that makes a declaration or value available outside the current module.
- How it is used
- Shares reusable functions and classes between modules without making their private helpers global.
- How deep it goes
- Works through default and named forms, import naming, read-only bindings, and top-level export placement without detailing module loading.
- Examples
- Uses a statistics logger with a private helper, formatting functions, class imports, and a lucky-number module exercise.
- What you can do after
- Build it from scratch: create a module with private state, export its public function, and import that function elsewhere.
Learn Haskell by Example
A module export is a definition made visible to code that imports the module containing it.
- How it is used
- Structures Haskell projects by grouping related definitions and controlling which names importing modules can use.
- How deep it goes
- Defines basic module, import, qualification, and re-export mechanics through examples, without explaining IO-action details.
- Examples
- Uses `Lib` and `Main` modules, an exported `someFunc`, qualified names, and a bundled `Csv` module.
- What you can do after
- Apply Haskell module syntax to expose definitions, import them elsewhere, qualify clashes, and bundle related exports.
Read how Learn Haskell by Example explains import/export syntax →
Pro Angular 16
An export statement is JavaScript or TypeScript module syntax that makes declarations available to importing modules, including through re-exported modules.
- How it is used
- Organizes application files into modules and declares dependencies between the features they provide.
- How deep it goes
- Explains default file visibility, named exports, import syntax, extension omission, and dependency-driven bundling without covering re-export syntax.
- Examples
- Demonstrates exported name and weather classes plus TodoItem and TodoList modules.
- What you can do after
- Apply named exports and imports to share classes between TypeScript files and produce a dependency-aware browser bundle.
Julia as a Second Language
An export statement is Julia syntax that makes selected bindings from a module available without requiring the module-name prefix.
- How it is used
- Makes selected module bindings callable without module-name prefixes in package code and REPL workflows.
- How deep it goes
- Explains the declaration and demonstrates its effect, but does not descend into module-loading internals.
- Examples
- Uses exported sine and cosine functions, REPL calls, built-in comparisons, and a CairoMakie plot.
- What you can do after
- Apply it by declaring public module functions and calling them directly after using the package.
Read how Julia as a Second Language explains import/export syntax →
Related concepts
- moduleused by · A module is a distinct, bounded software unit that groups related code or functionality and provides an organizational or interaction boundary within a larger system.
- default exportincludes · A default export is the module export designated for import as the module’s default, without requiring a matching exported name.
- named exportincludes · A named export is a module binding made available under an explicit name that importing code can reference, with optional renaming.
- data constructorconfigures · A data constructor is a named alternative of an algebraic data type that creates values of that type, optionally containing arguments.
- functionuses · A function is a callable program unit that performs an operation, may accept inputs, and can produce a result or side effect.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




