Skip to content

Commit

Permalink
Add optional deep chain with private access
Browse files Browse the repository at this point in the history
This was also recently approved in TC39. I collected the results by taking the maximum of the optional chain and private instance fields results, then manually verifying the supported browsers. Only Chrome has it so far.

Re: compat-table#1612
  • Loading branch information
jridgewell authored and ljharb committed Apr 30, 2020
1 parent aea5080 commit 1dbb63f
Show file tree
Hide file tree
Showing 2 changed files with 1,790 additions and 1,642 deletions.
26 changes: 26 additions & 0 deletions data-esnext.js
Expand Up @@ -929,6 +929,32 @@ exports.tests = [
typescript3_8corejs3: false,
}
},
{
name: 'optional deep private instance class fields access',
exec: function () {/*
class C {
#x = 42;
x(o = {p: this}){
return o?.p.#x;
}
}
return new C().x() === 42 && new C().x(null) === void 0;
*/},
res: {
ie11: false,
firefox2: false,
firefox74: firefox.privateClassFields,
chrome1: false,
chrome78: {val: 'flagged', note_id: "chrome-optional-chaining", note_html: "The feature have to be enabled via <code>--js-flags=\"--harmony-optional-chaining\"</code> flag"},
chrome80: true,
safari1: false,
safari13_1: false,
opera10_50: false,
graalvm20: false,
babel7corejs3: false,
typescript3_8corejs3: false,
}
},
{
name: 'computed instance class fields',
exec: function () {/*
Expand Down

0 comments on commit 1dbb63f

Please sign in to comment.