Recall & Review
beginner
What does re-exporting modules mean in TypeScript?
Re-exporting modules means exporting something from one module again through another module, so you can gather exports in one place for easier imports.
Click to reveal answer
beginner
How do you re-export all exports from another module?
Use
export * from './module'; to re-export everything that the other module exports.Click to reveal answer
beginner
How can you re-export a specific export from another module?
Use
export { name } from './module'; to re-export only the named export.Click to reveal answer
intermediate
Why use re-exporting in a project?
It helps organize code by creating a single entry point to import many things, making imports cleaner and easier to manage.Click to reveal answer
intermediate
Can you rename exports while re-exporting? How?
Yes, you can rename exports using
export { originalName as newName } from './module';.Click to reveal answer
Which syntax re-exports all exports from a module named 'utils'?
✗ Incorrect
The correct syntax to re-export all exports is
export * from './utils';.How do you re-export only the 'calculate' function from 'math.ts'?
✗ Incorrect
Use
export { calculate } from './math'; to re-export only the 'calculate' function.What is the benefit of re-exporting modules?
✗ Incorrect
Re-exporting helps organize imports by gathering exports in one place.
Can you rename an export while re-exporting it?
✗ Incorrect
You can rename exports using
export { originalName as newName } from './module';.Which statement is true about re-exporting?
✗ Incorrect
Re-exporting lets you combine exports from different modules into a single module.
Explain how re-exporting modules works and why it is useful in TypeScript projects.
Think about how you can collect exports from many files into one place.
You got /4 concepts.
Describe the difference between re-exporting all exports and re-exporting specific exports from a module.
Consider when you want everything vs. only some parts.
You got /4 concepts.