mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(ast): implement same traits on all fieldless enums (#3031)
Implement same traits on all AST fieldless enums, for consistency. Just a little bit of tidying.
This commit is contained in:
parent
280441f646
commit
1249c6c326
2 changed files with 6 additions and 6 deletions
|
|
@ -217,7 +217,7 @@ pub struct TSTypeOperator<'a> {
|
|||
pub type_annotation: TSType<'a>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serialize", derive(Serialize, Tsify))]
|
||||
#[cfg_attr(feature = "serialize", serde(rename_all = "lowercase"))]
|
||||
pub enum TSTypeOperatorOperator {
|
||||
|
|
@ -520,7 +520,7 @@ pub struct TSTypeAliasDeclaration<'a> {
|
|||
pub modifiers: Modifiers<'a>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Hash, Clone, PartialEq, Eq, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serialize", derive(Serialize, Tsify))]
|
||||
#[cfg_attr(feature = "serialize", serde(rename_all = "lowercase"))]
|
||||
pub enum TSAccessibility {
|
||||
|
|
@ -612,7 +612,7 @@ pub struct TSCallSignatureDeclaration<'a> {
|
|||
pub type_parameters: Option<Box<'a, TSTypeParameterDeclaration<'a>>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serialize", derive(Serialize, Tsify))]
|
||||
#[cfg_attr(feature = "serialize", serde(rename_all = "lowercase"))]
|
||||
pub enum TSMethodSignatureKind {
|
||||
|
|
@ -867,7 +867,7 @@ pub struct TSMappedType<'a> {
|
|||
pub readonly: TSMappedTypeModifierOperator,
|
||||
}
|
||||
|
||||
#[derive(Debug, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serialize", derive(Serialize, Tsify))]
|
||||
#[cfg_attr(feature = "serialize", serde(rename_all = "camelCase"))]
|
||||
pub enum TSMappedTypeModifierOperator {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ pub mod scope;
|
|||
pub mod symbol;
|
||||
pub mod xml_entities;
|
||||
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum NumberBase {
|
||||
Float,
|
||||
Decimal,
|
||||
|
|
@ -27,7 +27,7 @@ impl NumberBase {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum BigintBase {
|
||||
Decimal,
|
||||
Binary,
|
||||
|
|
|
|||
Loading…
Reference in a new issue