Skip to content

Commit abb0e0e

Browse files
committed
refactor(transformer/class-properties): rename var (#7477)
Pure refactor. Name var more descriptively.
1 parent 17fb7e5 commit abb0e0e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/oxc_transformer/src/es2022/class_properties/class.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
319319
}
320320
ClassElement::StaticBlock(_) => {
321321
// Static block only necessitates transforming class if it's being transformed
322-
if self.static_block {
322+
if self.transform_static_blocks {
323323
has_static_prop_or_static_block = true;
324324
continue;
325325
}
@@ -371,7 +371,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
371371
false
372372
}
373373
ClassElement::StaticBlock(block) => {
374-
if self.static_block {
374+
if self.transform_static_blocks {
375375
self.convert_static_block(block, ctx);
376376
false
377377
} else {

crates/oxc_transformer/src/es2022/class_properties/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub struct ClassPropertiesOptions {
136136
pub struct ClassProperties<'a, 'ctx> {
137137
// Options
138138
set_public_class_fields: bool,
139-
static_block: bool,
139+
transform_static_blocks: bool,
140140

141141
ctx: &'ctx TransformCtx<'a>,
142142

@@ -200,7 +200,7 @@ struct PrivateProp<'a> {
200200
impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
201201
pub fn new(
202202
options: ClassPropertiesOptions,
203-
static_block: bool,
203+
transform_static_blocks: bool,
204204
ctx: &'ctx TransformCtx<'a>,
205205
) -> Self {
206206
// TODO: Raise error if these 2 options are inconsistent
@@ -209,7 +209,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
209209

210210
Self {
211211
set_public_class_fields,
212-
static_block,
212+
transform_static_blocks,
213213
ctx,
214214
private_props_stack: SparseStack::new(),
215215
class_expression_addresses_stack: NonEmptyStack::new(Address::DUMMY),

0 commit comments

Comments
 (0)