mirror of
https://github.com/danbulant/oxc
synced 2026-05-23 06:08:47 +00:00
refactor(transformer/class-properties): rename var (#7477)
Pure refactor. Name var more descriptively.
This commit is contained in:
parent
17fb7e5303
commit
abb0e0e08e
2 changed files with 5 additions and 5 deletions
|
|
@ -319,7 +319,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
|
|||
}
|
||||
ClassElement::StaticBlock(_) => {
|
||||
// Static block only necessitates transforming class if it's being transformed
|
||||
if self.static_block {
|
||||
if self.transform_static_blocks {
|
||||
has_static_prop_or_static_block = true;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -371,7 +371,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
|
|||
false
|
||||
}
|
||||
ClassElement::StaticBlock(block) => {
|
||||
if self.static_block {
|
||||
if self.transform_static_blocks {
|
||||
self.convert_static_block(block, ctx);
|
||||
false
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ pub struct ClassPropertiesOptions {
|
|||
pub struct ClassProperties<'a, 'ctx> {
|
||||
// Options
|
||||
set_public_class_fields: bool,
|
||||
static_block: bool,
|
||||
transform_static_blocks: bool,
|
||||
|
||||
ctx: &'ctx TransformCtx<'a>,
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ struct PrivateProp<'a> {
|
|||
impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
|
||||
pub fn new(
|
||||
options: ClassPropertiesOptions,
|
||||
static_block: bool,
|
||||
transform_static_blocks: bool,
|
||||
ctx: &'ctx TransformCtx<'a>,
|
||||
) -> Self {
|
||||
// TODO: Raise error if these 2 options are inconsistent
|
||||
|
|
@ -209,7 +209,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
|
|||
|
||||
Self {
|
||||
set_public_class_fields,
|
||||
static_block,
|
||||
transform_static_blocks,
|
||||
ctx,
|
||||
private_props_stack: SparseStack::new(),
|
||||
class_expression_addresses_stack: NonEmptyStack::new(Address::DUMMY),
|
||||
|
|
|
|||
Loading…
Reference in a new issue