Skip to content

Commit

Permalink
refactor(transformer/class-properties)!: rename `ClassPropertiesOptio…
Browse files Browse the repository at this point in the history
…ns::loose`
  • Loading branch information
overlookmotel committed Dec 7, 2024
1 parent f31d85c commit 9dd0e00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/oxc_transformer/src/es2022/class_properties/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ type FxIndexMap<K, V> = IndexMap<K, V, FxBuildHasher>;
#[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.
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9dd0e00

Please sign in to comment.