From 9dd0e00359f168d0521c1784d57c038530db18d0 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sat, 7 Dec 2024 10:28:17 +0000 Subject: [PATCH] refactor(transformer/class-properties)!: rename `ClassPropertiesOptions::loose` --- crates/oxc_transformer/src/es2022/class_properties/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/oxc_transformer/src/es2022/class_properties/mod.rs b/crates/oxc_transformer/src/es2022/class_properties/mod.rs index 3f2a4719ae1bc0..08f27dc1e9317b 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/mod.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/mod.rs @@ -168,8 +168,7 @@ type FxIndexMap = IndexMap; #[derive(Debug, Default, Clone, Copy, Deserialize)] #[serde(default, rename_all = "camelCase")] pub struct ClassPropertiesOptions { - #[serde(alias = "loose")] - pub(crate) set_public_class_fields: bool, + pub(crate) loose: bool, } /// Class properties transform. @@ -227,8 +226,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> { ctx: &'ctx TransformCtx<'a>, ) -> Self { // TODO: Raise error if these 2 options are inconsistent - let set_public_class_fields = - options.set_public_class_fields || ctx.assumptions.set_public_class_fields; + let set_public_class_fields = options.loose || ctx.assumptions.set_public_class_fields; Self { set_public_class_fields,