Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Question regarding nested classes #71

@billinghamj

Description

@billinghamj

Given a case where you have nested classes, and the "inner" class wants to access the private property of the "outer" class:

class A {
  #b;

  foo() {
    const self = this;

    console.log(self.#b); // this works

    class C {
      bar() {
        console.log(self.#b); // does this work?
      }
    }
  }
}

Would the above code work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions