Export one primary value from a module.
Section: Modules and Imports
Default export
typescript
typescript
export default function formatCurrency(value: number) {
return `$${value.toFixed(2)}`;
}Explanation
Default exports are common, but many teams prefer named exports for consistency.
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
Re-export from another module
Create barrel files or focused module facades.
Parse JSON into `unknown` first
Treat external JSON as unsafe until validated.