You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Add private named instance field transformation (#31)
Implements private instance fields on top of the class properties refactor.Signed-off-by: Joseph Watts <jwatts43@bloomberg.net>Signed-off-by: Max Heiber <max.heiber@gmail.com>
Copy file name to clipboardExpand all lines: tests/baselines/reference/privateNameField.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,15 @@ class A {
9
9
}
10
10
11
11
//// [privateNameField.js]
12
-
"use strict";
13
12
//@target es6
13
+
var_classPrivateFieldSet=function(receiver,privateMap,value){if(!privateMap.has(receiver)){thrownewTypeError("attempted to set private field on non-instance");}privateMap.set(receiver,value);returnvalue;};