fix(ast): few serialization issues (#2522)

A few more I missed in #2506. Re #2463.

Only remaining snake_case in the current types of the AST:
`trailing_comma` in ArrayExpression, ObjectExpression &
ArrayAssignmentTarget.
This commit is contained in:
Arnaud Barré 2024-02-27 06:04:13 +01:00 committed by GitHub
parent 76add55031
commit 6d5ec6dedd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View file

@ -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))]

View file

@ -22,7 +22,7 @@ export interface TSAbstractMethodDefinition extends Omit<MethodDefinition, 'type
"#;
#[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 TSThisParameter<'a> {
#[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>),