diff --git a/crates/oxc_ast/src/ast/js.rs b/crates/oxc_ast/src/ast/js.rs index 3f3abc2fea023..d0999fbcf24cd 100644 --- a/crates/oxc_ast/src/ast/js.rs +++ b/crates/oxc_ast/src/ast/js.rs @@ -2285,7 +2285,7 @@ pub struct ImportNamespaceSpecifier<'a> { } #[derive(Debug, Hash)] -#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type"))] +#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type", rename_all = "camelCase"))] #[cfg_attr(all(feature = "serde", feature = "wasm"), derive(tsify::Tsify))] pub struct WithClause<'a> { #[cfg_attr(feature = "serde", serde(flatten))] @@ -2322,7 +2322,7 @@ impl<'a> ImportAttributeKey<'a> { } #[derive(Debug, Hash)] -#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type"))] +#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type", rename_all = "camelCase"))] #[cfg_attr(all(feature = "serde", feature = "wasm"), derive(tsify::Tsify))] pub struct ExportNamedDeclaration<'a> { #[cfg_attr(feature = "serde", serde(flatten))] @@ -2362,7 +2362,7 @@ impl<'a> ExportDefaultDeclaration<'a> { } #[derive(Debug, Hash)] -#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type"))] +#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type", rename_all = "camelCase"))] #[cfg_attr(all(feature = "serde", feature = "wasm"), derive(tsify::Tsify))] pub struct ExportAllDeclaration<'a> { #[cfg_attr(feature = "serde", serde(flatten))] @@ -2380,7 +2380,7 @@ impl<'a> ExportAllDeclaration<'a> { } #[derive(Debug, Hash)] -#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type"))] +#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type", rename_all = "camelCase"))] #[cfg_attr(all(feature = "serde", feature = "wasm"), derive(tsify::Tsify))] pub struct ExportSpecifier<'a> { #[cfg_attr(feature = "serde", serde(flatten))] diff --git a/crates/oxc_ast/src/ast/ts.rs b/crates/oxc_ast/src/ast/ts.rs index 7e63713bc2717..79e03cceee029 100644 --- a/crates/oxc_ast/src/ast/ts.rs +++ b/crates/oxc_ast/src/ast/ts.rs @@ -22,7 +22,7 @@ export interface TSAbstractMethodDefinition extends Omit { #[cfg_attr(feature = "serde", serde(flatten))] @@ -810,7 +810,7 @@ pub struct TSImportAttribute<'a> { } #[derive(Debug, Hash)] -#[cfg_attr(feature = "serde", derive(Serialize), serde(rename_all = "camelCase"))] +#[cfg_attr(feature = "serde", derive(Serialize), serde(untagged))] #[cfg_attr(all(feature = "serde", feature = "wasm"), derive(tsify::Tsify))] pub enum TSImportAttributeName<'a> { Identifier(IdentifierName<'a>),