Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(transformer/class-properties)!: rename ClassPropertiesOptions::loose #7716

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading