Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions crates/oxc_ast/src/ast/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2590,12 +2590,16 @@ pub struct ExportAllDeclaration<'a> {
///
/// Each [`ExportSpecifier`] is one of the named exports in an [`ExportNamedDeclaration`].
///
/// Note: `export_kind` relates to whether this specific `ExportSpecifier` is preceded by `type` keyword.
/// If the whole `ExportNamedDeclaration` has a `type` prefix, its `ExportSpecifier`s will still have
/// `export_kind: ImportOrExportKind::Value`. e.g. in this case: `export type { Foo, Bar }`.
///
/// ## Example
///
/// ```ts
/// // ____ export_kind
/// import { type Foo as Bar } from './foo';
/// // exported ^^^ ^^^ local
/// export { type Foo as Bar };
/// // local ^^^ ^^^ exported
/// ```
#[ast(visit)]
#[derive(Debug)]
Expand All @@ -2605,7 +2609,7 @@ pub struct ExportSpecifier<'a> {
pub local: ModuleExportName<'a>,
pub exported: ModuleExportName<'a>,
#[ts]
pub export_kind: ImportOrExportKind, // `export type *`
pub export_kind: ImportOrExportKind, // `export { type Foo as Bar };`
}

inherit_variants! {
Expand Down
Loading