-
Notifications
You must be signed in to change notification settings - Fork 13.2k
ES private class elements #42458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rbuckton
merged 87 commits into
microsoft:master
from
bloomberg:es-private-methods-and-accessors
Mar 25, 2021
Merged
ES private class elements #42458
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
e3a3fb8
Added support for private identifier methods.
dragomirtitian 4ab27a2
Added tests for private methods.
dragomirtitian 6977b9f
Added check to only not allow private name method signatures in anyth…
dragomirtitian bc8c07e
Added private accessors tests
dragomirtitian 2760ed8
Transform private methods
mkubilayk 04af85d
Rename shouldTransformPrivateFields
mkubilayk f048d72
Accept baseline
mkubilayk f8cfb81
Use a single WeakSet for brand-check
mkubilayk 4aa4c3b
Accept baseline
mkubilayk 0ac1271
Add a test for using private methods in static field initializers
mkubilayk 7da5bd9
Add breaking checker test
mkubilayk e133f60
Add to instances once per-instance
mkubilayk aa5dd8a
Accept baseline
mkubilayk a3889a7
fix: evaluate receiver and rhs expressions before throwing on readonl…
mkubilayk 8952caa
Add a test for evaluating rhs before readonly assignment
mkubilayk dee87bb
Transpile private accessors
mkubilayk aec7e9b
Accept baseline
mkubilayk f3bbf0f
fix: handle readonly/writeonly accessors
mkubilayk a1b59cd
accept baseline
mkubilayk 6b74498
add a test for private setter without a getter
mkubilayk d51f6cd
fix: getAllUnscopedEmitHelpers
mkubilayk c175770
fix: better handling of duplicate names
mkubilayk 4301af5
Fixed wrong error message for private methods in class expressions.
dragomirtitian 3a056b2
change error message
mkubilayk 95df2d1
add a test for async private methods with a higher target
mkubilayk 590124e
fix: setter assignment returns rhs value
mkubilayk 219ea83
add a test for setter assignment return value
mkubilayk 25da8ca
fix: handle duplicate accessors
mkubilayk a2228be
add tests for duplicate accessors
mkubilayk ff4f737
docs: add missing parameter docs
mkubilayk 704727c
Fixed failing test.
dragomirtitian 73925dc
baseline-accept: ordering changes
mkubilayk 67fd38d
fix: attach weakSetName to property declaration
mkubilayk 45c2a41
add a test for nested private methods
mkubilayk 356b91d
add a test with any
mkubilayk b391464
Merge pull request #51 from bloomberg/fix/nested-private-methods
dragomirtitian 5ebb3d6
Added support for static private fields accessors and methods.
dragomirtitian 7006c09
Added error message for private identifiers used with static decorato…
dragomirtitian b876613
Fixed emit static bug that used private names outside of classes for …
dragomirtitian 31a8c00
Added tests for private static fields methods and accessors.
dragomirtitian 9219e99
Merge remote-tracking branch 'remotes/origin/master' into es-private-…
dragomirtitian 5a27a32
Merge remote-tracking branch 'remotes/bloomberg/es-private-methods-an…
dragomirtitian 964fc27
Fixed error messages and tests after merge.
dragomirtitian d2ab6fc
Merge branch 'es-private-methods-and-accessors' into es-private-stati…
dragomirtitian 23f6c67
Accept new baseline.
dragomirtitian 374e6f3
Improved duplicate identifier checks for static private class elements.
dragomirtitian 62b4f2f
Added error when using initializers with private static fields when u…
dragomirtitian b2a692d
Fixed code review issues.
dragomirtitian 363041e
Removed semantically wrong emit on `useDefineForClassFields:true` wit…
dragomirtitian 64757e0
Changed emit for uninitialized private static fields.
dragomirtitian 68a7f80
Added runtime error in helper if a static private field is accessed b…
dragomirtitian 7e7b0b1
Fixed code review comments for private identifier static class elements.
dragomirtitian 30c7f69
add debug.assertNever for unknown node type (#53)
mkubilayk c924058
Merge remote-tracking branch 'upstream/master' into es-private-method…
mkubilayk e65116f
Merge remote-tracking branch 'upstream/master' into es-private-method…
mkubilayk 4748c87
Fixed code review issues.
dragomirtitian 09a5aae
Merge branch 'es-private-methods-and-accessors' into es-private-stati…
dragomirtitian 497e47f
Fixed code review issues for private class elements.
dragomirtitian 294cc48
Fixes class shadowing when checking access to a private static class …
dragomirtitian 027bdb3
Merge remote-tracking branch 'remotes/origin/master' into es-private-…
dragomirtitian 7bbc944
Merge remote-tracking branch 'upstream/master'
mkubilayk dd526e7
fix private methods/accessors in class expr inside a loop
mkubilayk f6ecfab
collapse switch case
mkubilayk 6c3f661
fix class name
mkubilayk ef69c6c
simplify getPrivateMethodsAndAccessors
mkubilayk 2a646ed
remove findPreviousAccessorInfo
mkubilayk d8136f7
lazily create weakSetName identifier
mkubilayk fbd749c
Merge remote-tracking branch 'remotes/bloomberg/es-private-static-fie…
dragomirtitian f96eafe
Merge remote-tracking branch 'remotes/bloomberg/es-private-static-fie…
dragomirtitian 2de8a43
Merge branch 'es-private-methods-and-accessors' of https://github.com…
dragomirtitian 7490a36
do not allocate a node if not needed in visitMehodDeclaration (#55)
mkubilayk c273258
Removed all the emit helpers for private identifier methods accessors…
dragomirtitian 1addbb3
Simplified emit for private identifier class elements.
dragomirtitian c461b92
do not clone the receiver (#57)
mkubilayk a61fd5f
leave bad code in for #constructor and duplicate private names (#58)
mkubilayk 89f746a
Added check for WeakSet collision.
dragomirtitian ff24636
Added error for using a set only accessor.
dragomirtitian a60e429
Merge pull request #61 from bloomberg/es-private-methods-and-accessor…
dragomirtitian f5816ab
update keyof tests and ?? (#62)
mkubilayk 3b62d3c
fix emit helpers comments
mkubilayk 7d8a2b9
produce an error if private field helpers are not up to date
mkubilayk d0d2055
add tests
mkubilayk 93a7ca3
fix setter-only compound assignment
mkubilayk 6da2cdd
Merge pull request #63 from bloomberg/helper-parameter-count
mkubilayk 30805b7
fix tests
mkubilayk 8d77a8e
fix duplicated trailing comments (#64)
mkubilayk 8078ae0
clear receiver pos and setTextRange on helper calls
mkubilayk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added error for using a set only accessor.
- Loading branch information
commit ff2463660b7328e551848f176e6e83df2437db22
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
tests/baselines/reference/privateWriteOnlyAccessorRead.errors.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts(8,17): error TS2806: Private accessor was defined without a getter. | ||
| tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts(11,5): error TS2806: Private accessor was defined without a getter. | ||
| tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts(16,13): error TS2806: Private accessor was defined without a getter. | ||
| tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts(18,17): error TS2806: Private accessor was defined without a getter. | ||
| tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts(21,18): error TS2806: Private accessor was defined without a getter. | ||
| tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts(25,9): error TS2806: Private accessor was defined without a getter. | ||
| tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts(26,12): error TS2806: Private accessor was defined without a getter. | ||
|
|
||
|
|
||
| ==== tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts (7 errors) ==== | ||
| class Test { | ||
| set #value(v: { foo: { bar: number } }) {} | ||
| set #valueRest(v: number[]) {} | ||
| set #valueOne(v: number) {} | ||
|
|
||
| m() { | ||
| const foo = { bar: 1 }; | ||
| console.log(this.#value); // error | ||
| ~~~~~~~~~~~ | ||
| !!! error TS2806: Private accessor was defined without a getter. | ||
| this.#value = { foo }; // ok | ||
| this.#value = { foo }; // ok | ||
| this.#value.foo = foo; // error | ||
| ~~~~~~~~~~~ | ||
| !!! error TS2806: Private accessor was defined without a getter. | ||
|
|
||
| ({ o: this.#value } = { o: { foo } }); //ok | ||
| ({ ...this.#value } = { foo }); //ok | ||
|
|
||
| ({ foo: this.#value.foo } = { foo }); //error | ||
| ~~~~~~~~~~~ | ||
| !!! error TS2806: Private accessor was defined without a getter. | ||
| ({ | ||
| foo: { ...this.#value.foo }, | ||
| ~~~~~~~~~~~ | ||
| !!! error TS2806: Private accessor was defined without a getter. | ||
| } = { foo }); //error | ||
|
|
||
| let r = { o: this.#value }; //error | ||
| ~~~~~~~~~~~ | ||
| !!! error TS2806: Private accessor was defined without a getter. | ||
|
|
||
| [this.#valueOne, ...this.#valueRest] = [1, 2, 3]; | ||
| let arr = [ | ||
| this.#valueOne, | ||
| ~~~~~~~~~~~~~~ | ||
| !!! error TS2806: Private accessor was defined without a getter. | ||
| ...this.#valueRest | ||
| ~~~~~~~~~~~~~~~ | ||
| !!! error TS2806: Private accessor was defined without a getter. | ||
| ]; | ||
| } | ||
| } | ||
| new Test().m(); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| //// [privateWriteOnlyAccessorRead.ts] | ||
| class Test { | ||
| set #value(v: { foo: { bar: number } }) {} | ||
| set #valueRest(v: number[]) {} | ||
| set #valueOne(v: number) {} | ||
|
|
||
| m() { | ||
| const foo = { bar: 1 }; | ||
| console.log(this.#value); // error | ||
| this.#value = { foo }; // ok | ||
| this.#value = { foo }; // ok | ||
| this.#value.foo = foo; // error | ||
|
|
||
| ({ o: this.#value } = { o: { foo } }); //ok | ||
| ({ ...this.#value } = { foo }); //ok | ||
|
|
||
| ({ foo: this.#value.foo } = { foo }); //error | ||
| ({ | ||
| foo: { ...this.#value.foo }, | ||
| } = { foo }); //error | ||
|
|
||
| let r = { o: this.#value }; //error | ||
|
|
||
| [this.#valueOne, ...this.#valueRest] = [1, 2, 3]; | ||
| let arr = [ | ||
| this.#valueOne, | ||
| ...this.#valueRest | ||
| ]; | ||
| } | ||
| } | ||
| new Test().m(); | ||
|
|
||
|
|
||
| //// [privateWriteOnlyAccessorRead.js] | ||
| var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
| if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
| if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
| return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
| }; | ||
| var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
| if (kind === "m") throw new TypeError("Private method is not writable"); | ||
| if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); | ||
| if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); | ||
| return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; | ||
| }; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| var _Test_instances, _Test_value_set, _Test_valueRest_set, _Test_valueOne_set; | ||
| class Test { | ||
| constructor() { | ||
| _Test_instances.add(this); | ||
| } | ||
| m() { | ||
| var _a, _b, _c; | ||
| const foo = { bar: 1 }; | ||
| console.log(__classPrivateFieldGet(this, _Test_instances, "a")); // error | ||
| __classPrivateFieldSet(// error | ||
| this, _Test_instances, { foo }, "a", _Test_value_set); // ok | ||
| __classPrivateFieldSet(// ok | ||
| this, _Test_instances, { foo }, "a", _Test_value_set); // ok | ||
| __classPrivateFieldGet(// ok | ||
| this, _Test_instances, "a").foo = foo; // error | ||
| (_a = this, { o: ({ set value(_d) { __classPrivateFieldSet(_a, _Test_instances, _d, "a", _Test_value_set); } }).value } = { o: { foo } }); //ok | ||
| (__classPrivateFieldGet(this, _Test_instances, "a") = __rest({ foo }, [])); //ok | ||
| ({ foo: __classPrivateFieldGet(this, _Test_instances, "a").foo } = { foo }); //error | ||
| ({ | ||
| foo: Object.assign({}, __classPrivateFieldGet(this, _Test_instances, "a").foo), | ||
| } = { foo }); //error | ||
| let r = { o: __classPrivateFieldGet(this, _Test_instances, "a") }; //error | ||
| _b = this, _c = this, [({ set value(_d) { __classPrivateFieldSet(_b, _Test_instances, _d, "a", _Test_valueOne_set); } }).value, ...({ set value(_d) { __classPrivateFieldSet(_c, _Test_instances, _d, "a", _Test_valueRest_set); } }).value] = [1, 2, 3]; | ||
| let arr = [ | ||
| __classPrivateFieldGet(this, _Test_instances, "a"), | ||
| ...__classPrivateFieldGet(this, _Test_instances, "a") | ||
| ]; | ||
| } | ||
| } | ||
| _Test_instances = new WeakSet(), _Test_value_set = function _Test_value_set(v) { }, _Test_valueRest_set = function _Test_valueRest_set(v) { }, _Test_valueOne_set = function _Test_valueOne_set(v) { }; | ||
| new Test().m(); | ||
111 changes: 111 additions & 0 deletions
111
tests/baselines/reference/privateWriteOnlyAccessorRead.symbols
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| === tests/cases/conformance/classes/members/privateNames/privateWriteOnlyAccessorRead.ts === | ||
| class Test { | ||
| >Test : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
|
|
||
| set #value(v: { foo: { bar: number } }) {} | ||
| >#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >v : Symbol(v, Decl(privateWriteOnlyAccessorRead.ts, 1, 13)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 1, 17)) | ||
| >bar : Symbol(bar, Decl(privateWriteOnlyAccessorRead.ts, 1, 24)) | ||
|
|
||
| set #valueRest(v: number[]) {} | ||
| >#valueRest : Symbol(Test.#valueRest, Decl(privateWriteOnlyAccessorRead.ts, 1, 44)) | ||
| >v : Symbol(v, Decl(privateWriteOnlyAccessorRead.ts, 2, 17)) | ||
|
|
||
| set #valueOne(v: number) {} | ||
| >#valueOne : Symbol(Test.#valueOne, Decl(privateWriteOnlyAccessorRead.ts, 2, 32)) | ||
| >v : Symbol(v, Decl(privateWriteOnlyAccessorRead.ts, 3, 16)) | ||
|
|
||
| m() { | ||
| >m : Symbol(Test.m, Decl(privateWriteOnlyAccessorRead.ts, 3, 29)) | ||
|
|
||
| const foo = { bar: 1 }; | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 6, 9)) | ||
| >bar : Symbol(bar, Decl(privateWriteOnlyAccessorRead.ts, 6, 17)) | ||
|
|
||
| console.log(this.#value); // error | ||
| >console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) | ||
| >console : Symbol(console, Decl(lib.dom.d.ts, --, --)) | ||
| >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
|
|
||
| this.#value = { foo }; // ok | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 8, 19)) | ||
|
|
||
| this.#value = { foo }; // ok | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 9, 19)) | ||
|
|
||
| this.#value.foo = foo; // error | ||
| >this.#value.foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 1, 17)) | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 1, 17)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 6, 9)) | ||
|
|
||
| ({ o: this.#value } = { o: { foo } }); //ok | ||
| >o : Symbol(o, Decl(privateWriteOnlyAccessorRead.ts, 12, 6)) | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >o : Symbol(o, Decl(privateWriteOnlyAccessorRead.ts, 12, 27)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 12, 32)) | ||
|
|
||
| ({ ...this.#value } = { foo }); //ok | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 13, 27)) | ||
|
|
||
| ({ foo: this.#value.foo } = { foo }); //error | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 15, 6)) | ||
| >this.#value.foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 1, 17)) | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 1, 17)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 15, 33)) | ||
|
|
||
| ({ | ||
| foo: { ...this.#value.foo }, | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 16, 6)) | ||
| >this.#value.foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 1, 17)) | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 1, 17)) | ||
|
|
||
| } = { foo }); //error | ||
| >foo : Symbol(foo, Decl(privateWriteOnlyAccessorRead.ts, 18, 9)) | ||
|
|
||
| let r = { o: this.#value }; //error | ||
| >r : Symbol(r, Decl(privateWriteOnlyAccessorRead.ts, 20, 7)) | ||
| >o : Symbol(o, Decl(privateWriteOnlyAccessorRead.ts, 20, 13)) | ||
| >this.#value : Symbol(Test.#value, Decl(privateWriteOnlyAccessorRead.ts, 0, 12)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
|
|
||
| [this.#valueOne, ...this.#valueRest] = [1, 2, 3]; | ||
| >this.#valueOne : Symbol(Test.#valueOne, Decl(privateWriteOnlyAccessorRead.ts, 2, 32)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >this.#valueRest : Symbol(Test.#valueRest, Decl(privateWriteOnlyAccessorRead.ts, 1, 44)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
|
|
||
| let arr = [ | ||
| >arr : Symbol(arr, Decl(privateWriteOnlyAccessorRead.ts, 23, 7)) | ||
|
|
||
| this.#valueOne, | ||
| >this.#valueOne : Symbol(Test.#valueOne, Decl(privateWriteOnlyAccessorRead.ts, 2, 32)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
|
|
||
| ...this.#valueRest | ||
| >this.#valueRest : Symbol(Test.#valueRest, Decl(privateWriteOnlyAccessorRead.ts, 1, 44)) | ||
| >this : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
|
|
||
| ]; | ||
| } | ||
| } | ||
| new Test().m(); | ||
| >new Test().m : Symbol(Test.m, Decl(privateWriteOnlyAccessorRead.ts, 3, 29)) | ||
| >Test : Symbol(Test, Decl(privateWriteOnlyAccessorRead.ts, 0, 0)) | ||
| >m : Symbol(Test.m, Decl(privateWriteOnlyAccessorRead.ts, 3, 29)) | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.