Export multiple values from a module.

Section: Modules and Imports

Named export

typescript
typescript
export function add(a: number, b: number) {
  return a + b;
}

export const APP_NAME = "CheatSheet";
Explanation

Named exports scale well when a module exposes several helpers.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Modules and Imports
Default export
Export one primary value from a module.
OpenIn sheettypescriptsame section
Type-only import
Import a type without generating runtime usage.
OpenIn sheettypescriptsame section
Re-export from another module
Create barrel files or focused module facades.
OpenIn sheettypescriptsame section
Dynamic import
Load a module asynchronously at runtime.
OpenIn sheettypescriptsame section
Define a class
Type instance fields and constructor parameters.
OpenIn sheettypescript1 tag match
Parse JSON into `unknown` first
Treat external JSON as unsafe until validated.
OpenIn sheettypescript1 tag match