tc39 / proposal-class-fields

Orthogonally-informed combination of public and private fields proposals
https://arai-a.github.io/ecma262-compare/?pr=1668
1.72k stars 113 forks source link

Destructuring? #304

Closed NickHeiner closed 4 years ago

NickHeiner commented 4 years ago

Is it possible to destructure a private field off this? Something like:

class A { 
  #p; 
  f() { 
    const {#p} = this; 
  } 
}
ljharb commented 4 years ago

No, see #4.

littledan commented 4 years ago

Thanks for answering, @ljharb