Unverified Commit f8ae35c2 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

docs: clarify Turbopack ModulePart export examples (#99104)

## Summary

Clarify the examples for `ModulePart::Export` and `ModulePart::Exports`
so they illustrate the export declarations those parts represent, rather
than the importing site or a single-export case.

This follows two late review suggestions on the already-merged #96396:
[named
export](https://github.com/vercel/next.js/pull/96396#discussion_r4082789388)
and [export
declarations](https://github.com/vercel/next.js/pull/96396#discussion_r4082794496).
No behavior changes.

## Verification

- `cargo fmt --all -- --check` (from `turbopack/`)
- `git diff --check`
- Confirmed the diff changes only two Rust doc-comment lines.

<!-- NEXT_JS_LLM -->


<!-- fleet 993ef5d6-cc80-4082-8e14-ff9ac871ce33 -->
Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
Co-authored-by: 's avatarLuke Sandberg <210140+lukesandberg@users.noreply.github.com>
parent 8fab0b4b
...@@ -3425,7 +3425,7 @@ pub enum ModulePart { ...@@ -3425,7 +3425,7 @@ pub enum ModulePart {
/// Represents the side effects of a module, such as `import "./module"`. /// Represents the side effects of a module, such as `import "./module"`.
/// This part is evaluated even if all exports are unused. /// This part is evaluated even if all exports are unused.
Evaluation, Evaluation,
/// Represents a named export, such as `foo` in `import { foo } from "./module"`. /// Represents a named export, such as `foo` in `export const foo = "bar";`.
Export(RcStr), Export(RcStr),
/// Represents an export for which one member is used. /// Represents an export for which one member is used.
/// ///
...@@ -3454,7 +3454,7 @@ pub enum ModulePart { ...@@ -3454,7 +3454,7 @@ pub enum ModulePart {
Internal(u32), Internal(u32),
/// Represents the local declarations of a module, such as `const value = 1`. /// Represents the local declarations of a module, such as `const value = 1`.
Locals, Locals,
/// Represents the module's export declarations, such as `export { value }`. /// Represents the module's export declarations, such as `export { foo, bar }`.
Exports, Exports,
/// Represents a facade that behaves like the original module while referencing its internal /// Represents a facade that behaves like the original module while referencing its internal
/// parts, such as the facade emitted for a split module. /// parts, such as the facade emitted for a split module.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment