fix(ast): add Function to generated TS types and fix ModifierKind serialization (#2534)

This commit is contained in:
Arnaud Barré 2024-02-28 07:40:14 +01:00 committed by GitHub
parent 24ded3cb15
commit d181209759
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -1701,6 +1701,7 @@ pub struct BindingRestElement<'a> {
/// Function Definitions /// Function Definitions
#[derive(Debug, Hash)] #[derive(Debug, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize), serde(rename_all = "camelCase"))] #[cfg_attr(feature = "serde", derive(Serialize), serde(rename_all = "camelCase"))]
#[cfg_attr(all(feature = "serde", feature = "wasm"), derive(tsify::Tsify))]
pub struct Function<'a> { pub struct Function<'a> {
pub r#type: FunctionType, pub r#type: FunctionType,
#[cfg_attr(feature = "serde", serde(flatten))] #[cfg_attr(feature = "serde", serde(flatten))]

View file

@ -954,7 +954,7 @@ pub struct Decorator<'a> {
} }
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize), serde(tag = "type", rename_all = "camelCase"))] #[cfg_attr(feature = "serde", derive(Serialize), serde(rename_all = "camelCase"))]
#[cfg_attr(all(feature = "serde", feature = "wasm"), derive(tsify::Tsify))] #[cfg_attr(all(feature = "serde", feature = "wasm"), derive(tsify::Tsify))]
pub enum ModifierKind { pub enum ModifierKind {
Abstract, Abstract,