mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
feat(ast): complete AccessorProperty todo in has_decorator (#2178)
This commit is contained in:
parent
cba8a4c131
commit
080e78c647
1 changed files with 5 additions and 9 deletions
|
|
@ -1911,18 +1911,14 @@ impl<'a> ClassElement<'a> {
|
|||
}
|
||||
|
||||
pub fn has_decorator(&self) -> bool {
|
||||
#[allow(clippy::match_same_arms)]
|
||||
match self {
|
||||
Self::TSIndexSignature(_)
|
||||
| Self::TSAbstractMethodDefinition(_)
|
||||
| Self::TSAbstractPropertyDefinition(_) => false,
|
||||
Self::MethodDefinition(method) => !method.decorators.is_empty(),
|
||||
Self::PropertyDefinition(property) => !property.decorators.is_empty(),
|
||||
Self::AccessorProperty(_) => {
|
||||
// TODO: AccessorProperty doesn't have decorators property
|
||||
false
|
||||
}
|
||||
Self::StaticBlock(_) => false,
|
||||
Self::AccessorProperty(property) => !property.decorators.is_empty(),
|
||||
Self::StaticBlock(_)
|
||||
| Self::TSIndexSignature(_)
|
||||
| Self::TSAbstractMethodDefinition(_)
|
||||
| Self::TSAbstractPropertyDefinition(_) => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue