Skip to content

Commit

Permalink
feat(transformer): class properties transform
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel authored and Boshen committed Nov 22, 2024
1 parent 8d1ea70 commit c986cf7
Show file tree
Hide file tree
Showing 19 changed files with 14,236 additions and 4,433 deletions.
10 changes: 10 additions & 0 deletions crates/oxc_transformer/src/common/helper_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ pub enum Helper {
ObjectDestructuringEmpty,
ObjectWithoutProperties,
ToPropertyKey,
DefineProperty,
ClassPrivateFieldInitSpec,
ClassPrivateFieldGet2,
ClassPrivateFieldSet2,
AssertClassBrand,
}

impl Helper {
Expand All @@ -162,6 +167,11 @@ impl Helper {
Self::ObjectDestructuringEmpty => "objectDestructuringEmpty",
Self::ObjectWithoutProperties => "objectWithoutProperties",
Self::ToPropertyKey => "toPropertyKey",
Self::DefineProperty => "defineProperty",
Self::ClassPrivateFieldInitSpec => "classPrivateFieldInitSpec",
Self::ClassPrivateFieldGet2 => "classPrivateFieldGet2",
Self::ClassPrivateFieldSet2 => "classPrivateFieldSet2",
Self::AssertClassBrand => "assertClassBrand",
}
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_transformer/src/common/var_declarations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ impl<'a> VarDeclarationsStore<'a> {

/// Add a `let` declaration to be inserted at top of current enclosing statement block,
/// given a `BoundIdentifier`.
#[expect(dead_code)]
pub fn insert_let(
&self,
binding: &BoundIdentifier<'a>,
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_transformer/src/compiler_assumptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub struct CompilerAssumptions {
pub set_computed_properties: bool,

#[serde(default)]
#[deprecated = "Not Implemented"]
pub set_public_class_fields: bool,

#[serde(default)]
Expand Down
Loading

0 comments on commit c986cf7

Please sign in to comment.