Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
magic-akari committed Sep 29, 2023
1 parent 809f7c6 commit 4622213
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/swc_ecma_transforms_typescript/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,8 @@ impl Transform {
}

/// Note:
/// Const exported declarations are transformed into immutable bindings.
/// `export` from `export let` / ` export var` will be stripped,
/// and a mutable binding will be transformed into assignment to the
/// namespace. All references to the mutable binding will be replaced with
/// All exported variable declarations are transformed into assignment to the
/// namespace. All references to the exported binding will be replaced with
/// qualified access to the namespace property.
///
/// Exported function and class will be treat as const exported which is in
Expand All @@ -592,7 +590,7 @@ impl Transform {
///
/// Input:
/// ```TypeScript
/// export const foo = init, { bar: baz } = init;
/// export const foo = init, { bar: baz = init } = init;
///
/// export function a() {}
///
Expand All @@ -601,7 +599,7 @@ impl Transform {
///
/// Output:
/// ```TypeScript
/// const foo = NS.foo = init, { bar: baz } = { bar: NS.baz } = init;
/// NS.foo = init, { bar: NS.baz = init } = init;
///
/// function a() {}
/// NS.a = a;
Expand Down

0 comments on commit 4622213

Please sign in to comment.