refactor(transformer/class-properties): TODO comments (#8392)

This commit is contained in:
overlookmotel 2025-01-10 03:38:27 +00:00
parent aaa009dd4d
commit e7c89bad98
2 changed files with 9 additions and 0 deletions

View file

@ -160,5 +160,12 @@ impl<'a> VisitMut<'a> for PrivateMethodVisitor<'a, '_, '_> {
#[inline]
fn visit_class(&mut self, _class: &mut Class<'a>) {
// Ignore because we don't need to transform `super` for other classes.
// TODO: Actually we do need to transform `super` in:
// 1. Class decorators
// 2. Class `extends` clause
// 3. Class property/method/accessor computed keys
// 4. Class property/method/accessor decorators
// (or does `super` in a decorator refer to inner class?)
}
}

View file

@ -365,6 +365,8 @@ impl<'a> VisitMut<'a> for StaticVisitor<'a, '_, '_> {
self.reparent_scope_if_first_level(&class.scope_id);
// TODO: Need to visit decorators *before* incrementing `scope_depth`.
// Decorators could contain scopes. e.g. `@(() => {}) class C {}`
self.scope_depth += 1;
walk_mut::walk_class(self, class);
self.scope_depth -= 1;