From 847d468b4625f1f356e787437b61e2a97ab26839 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Tue, 9 Dec 2025 00:38:36 +0000 Subject: [PATCH] refactor(transformer): correct spelling (#16615) Pure refactor. "writable" is the correct spelling. Correct "writeable" to "writable" in a few places. --- .../src/es2022/class_properties/class_details.rs | 6 +++--- .../src/es2022/class_properties/private_field.rs | 2 +- .../src/es2022/class_properties/private_method.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/oxc_transformer/src/es2022/class_properties/class_details.rs b/crates/oxc_transformer/src/es2022/class_properties/class_details.rs index b43c294a4ae01..cea89dba48931 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/class_details.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/class_details.rs @@ -177,9 +177,9 @@ impl<'a> ClassesStack<'a> { }) } - /// Lookup details of writeable private property referred to by `ident`. + /// Lookup details of writable private property referred to by `ident`. /// Returns `Some` if it refers to a private prop and setter method - pub fn find_writeable_private_prop<'b>( + pub fn find_writable_private_prop<'b>( &'b mut self, ident: &PrivateIdentifier<'a>, ) -> Option> { @@ -229,7 +229,7 @@ impl<'a> ClassesStack<'a> { /// /// This is the return value of [`ClassesStack::find_private_prop`], /// [`ClassesStack::find_readable_private_prop`] and -/// [`ClassesStack::find_writeable_private_prop`]. +/// [`ClassesStack::find_writable_private_prop`]. pub(super) struct ResolvedPrivateProp<'a, 'b> { /// Binding for temp var representing the property pub prop_binding: &'b BoundIdentifier<'a>, diff --git a/crates/oxc_transformer/src/es2022/class_properties/private_field.rs b/crates/oxc_transformer/src/es2022/class_properties/private_field.rs index dde66433ce7ce..3d6e2122c5221 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/private_field.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/private_field.rs @@ -60,7 +60,7 @@ impl<'a> ClassProperties<'a, '_> { let span = field_expr.span; let object = field_expr.object.take_in(ctx.ast); let resolved = if is_assignment { - match self.classes_stack.find_writeable_private_prop(&field_expr.field) { + match self.classes_stack.find_writable_private_prop(&field_expr.field) { Some(prop) => prop, _ => { // Early return for read-only error diff --git a/crates/oxc_transformer/src/es2022/class_properties/private_method.rs b/crates/oxc_transformer/src/es2022/class_properties/private_method.rs index c4a31068d8943..2de2ed171f40c 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/private_method.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/private_method.rs @@ -49,7 +49,7 @@ impl<'a> ClassProperties<'a, '_> { let mut function = value.take_in_box(ctx.ast); let resolved_private_prop = if *kind == MethodDefinitionKind::Set { - self.classes_stack.find_writeable_private_prop(ident) + self.classes_stack.find_writable_private_prop(ident) } else { self.classes_stack.find_readable_private_prop(ident) };