Skip to content

Commit 83b3ea3

Browse files
Accepted baselines.
1 parent 6fccba5 commit 83b3ea3

8 files changed

+55
-218
lines changed

tests/baselines/reference/privateNamesEscapeSequences01(target=es2015).errors.txt

Lines changed: 0 additions & 142 deletions
This file was deleted.

tests/baselines/reference/privateNamesEscapeSequences01(target=es2015).js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -142,23 +142,23 @@ export class IdentifierNameWithExtendedEscape2 {
142142
}
143143
}
144144
//// [PrivateIdentifierNameWithEscape1.js]
145-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
146-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
147-
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");
148-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
145+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
146+
if (kind === "m") throw new TypeError("Private method is not writable");
147+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
148+
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");
149+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
149150
};
150-
var _PrivateIdentifierWithEscape1_;
151+
var _PrivateIdentifierWithEscape1_x;
151152
export class PrivateIdentifierWithEscape1 {
152153
constructor() {
153-
_PrivateIdentifierWithEscape1_.set(this, void 0);
154-
__classPrivateFieldGet(this, _PrivateIdentifierWithEscape1_, "f");
155-
\u0078 = 0;
154+
_PrivateIdentifierWithEscape1_x.set(this, void 0);
155+
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape1_x, 0, "f");
156156
}
157157
doThing() {
158-
this. = 42;
158+
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape1_x, 42, "f");
159159
}
160160
}
161-
_PrivateIdentifierWithEscape1_ = new WeakMap();
161+
_PrivateIdentifierWithEscape1_x = new WeakMap();
162162
//// [PrivateIdentifierNameWithEscape2.js]
163163
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
164164
if (kind === "m") throw new TypeError("Private method is not writable");
@@ -178,23 +178,23 @@ export class PrivateIdentifierWithEscape2 {
178178
}
179179
_PrivateIdentifierWithEscape2_xx = new WeakMap();
180180
//// [PrivateIdentifierNameWithExtendedEscape1.js]
181-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
182-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
183-
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");
184-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
181+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
182+
if (kind === "m") throw new TypeError("Private method is not writable");
183+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
184+
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");
185+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
185186
};
186-
var _PrivateIdentifierWithExtendedEscape1_;
187+
var _PrivateIdentifierWithExtendedEscape1_x;
187188
export class PrivateIdentifierWithExtendedEscape1 {
188189
constructor() {
189-
_PrivateIdentifierWithExtendedEscape1_.set(this, void 0);
190-
__classPrivateFieldGet(this, _PrivateIdentifierWithExtendedEscape1_, "f");
191-
\u{78} = 0;
190+
_PrivateIdentifierWithExtendedEscape1_x.set(this, void 0);
191+
__classPrivateFieldSet(this, _PrivateIdentifierWithExtendedEscape1_x, 0, "f");
192192
}
193193
doThing() {
194-
this. = 42;
194+
__classPrivateFieldSet(this, _PrivateIdentifierWithExtendedEscape1_x, 42, "f");
195195
}
196196
}
197-
_PrivateIdentifierWithExtendedEscape1_ = new WeakMap();
197+
_PrivateIdentifierWithExtendedEscape1_x = new WeakMap();
198198
//// [PrivateIdentifierNameWithExtendedEscape2.js]
199199
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
200200
if (kind === "m") throw new TypeError("Private method is not writable");

tests/baselines/reference/privateNamesEscapeSequences01(target=es2015).symbols

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,19 @@ export class PrivateIdentifierWithEscape1 {
9999
>PrivateIdentifierWithEscape1 : Symbol(PrivateIdentifierWithEscape1, Decl(PrivateIdentifierNameWithEscape1.ts, 0, 0))
100100

101101
#\u0078: number;
102-
># : Symbol(PrivateIdentifierWithEscape1[#], Decl(PrivateIdentifierNameWithEscape1.ts, 0, 43))
103-
>\u0078 : Symbol(PrivateIdentifierWithEscape1[\u0078], Decl(PrivateIdentifierNameWithEscape1.ts, 1, 5))
102+
>#\u0078 : Symbol(PrivateIdentifierWithEscape1[#\u0078], Decl(PrivateIdentifierNameWithEscape1.ts, 0, 43))
104103

105104
constructor() {
106105
this.#\u0078 = 0;
107-
>this.# : Symbol(PrivateIdentifierWithEscape1[#], Decl(PrivateIdentifierNameWithEscape1.ts, 0, 43))
106+
>this.#\u0078 : Symbol(PrivateIdentifierWithEscape1[#\u0078], Decl(PrivateIdentifierNameWithEscape1.ts, 0, 43))
108107
>this : Symbol(PrivateIdentifierWithEscape1, Decl(PrivateIdentifierNameWithEscape1.ts, 0, 0))
109108
}
110109

111110
doThing() {
112111
>doThing : Symbol(PrivateIdentifierWithEscape1.doThing, Decl(PrivateIdentifierNameWithEscape1.ts, 5, 5))
113112

114113
this.#x = 42;
114+
>this.#x : Symbol(PrivateIdentifierWithEscape1[#\u0078], Decl(PrivateIdentifierNameWithEscape1.ts, 0, 43))
115115
>this : Symbol(PrivateIdentifierWithEscape1, Decl(PrivateIdentifierNameWithEscape1.ts, 0, 0))
116116
}
117117
}
@@ -143,19 +143,19 @@ export class PrivateIdentifierWithExtendedEscape1 {
143143
>PrivateIdentifierWithExtendedEscape1 : Symbol(PrivateIdentifierWithExtendedEscape1, Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 0, 0))
144144

145145
#\u{78}: number;
146-
># : Symbol(PrivateIdentifierWithExtendedEscape1[#], Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 0, 51))
147-
>\u{78} : Symbol(PrivateIdentifierWithExtendedEscape1[\u{78}], Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 1, 5))
146+
>#\u{78} : Symbol(PrivateIdentifierWithExtendedEscape1[#\u{78}], Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 0, 51))
148147

149148
constructor() {
150149
this.#\u{78} = 0;
151-
>this.# : Symbol(PrivateIdentifierWithExtendedEscape1[#], Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 0, 51))
150+
>this.#\u{78} : Symbol(PrivateIdentifierWithExtendedEscape1[#\u{78}], Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 0, 51))
152151
>this : Symbol(PrivateIdentifierWithExtendedEscape1, Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 0, 0))
153152
}
154153

155154
doThing() {
156155
>doThing : Symbol(PrivateIdentifierWithExtendedEscape1.doThing, Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 5, 5))
157156

158157
this.#x = 42;
158+
>this.#x : Symbol(PrivateIdentifierWithExtendedEscape1[#\u{78}], Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 0, 51))
159159
>this : Symbol(PrivateIdentifierWithExtendedEscape1, Decl(PrivateIdentifierNameWithExtendedEscape1.ts, 0, 0))
160160
}
161161
}

tests/baselines/reference/privateNamesEscapeSequences01(target=es2015).types

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,13 @@ export class PrivateIdentifierWithEscape1 {
115115
>PrivateIdentifierWithEscape1 : PrivateIdentifierWithEscape1
116116

117117
#\u0078: number;
118-
># : any
119-
>\u0078 : number
118+
>#\u0078 : number
120119

121120
constructor() {
122121
this.#\u0078 = 0;
123-
>this.# : any
122+
>this.#\u0078 = 0 : 0
123+
>this.#\u0078 : number
124124
>this : this
125-
>\u0078 = 0 : 0
126-
>\u0078 : any
127125
>0 : 0
128126
}
129127

@@ -132,7 +130,7 @@ export class PrivateIdentifierWithEscape1 {
132130

133131
this.#x = 42;
134132
>this.#x = 42 : 42
135-
>this.#x : any
133+
>this.#x : number
136134
>this : this
137135
>42 : 42
138136
}
@@ -169,15 +167,13 @@ export class PrivateIdentifierWithExtendedEscape1 {
169167
>PrivateIdentifierWithExtendedEscape1 : PrivateIdentifierWithExtendedEscape1
170168

171169
#\u{78}: number;
172-
># : any
173-
>\u{78} : number
170+
>#\u{78} : number
174171

175172
constructor() {
176173
this.#\u{78} = 0;
177-
>this.# : any
174+
>this.#\u{78} = 0 : 0
175+
>this.#\u{78} : number
178176
>this : this
179-
>\u{78} = 0 : 0
180-
>\u{78} : any
181177
>0 : 0
182178
}
183179

@@ -186,7 +182,7 @@ export class PrivateIdentifierWithExtendedEscape1 {
186182

187183
this.#x = 42;
188184
>this.#x = 42 : 42
189-
>this.#x : any
185+
>this.#x : number
190186
>this : this
191187
>42 : 42
192188
}

tests/baselines/reference/privateNamesEscapeSequences01(target=es5).errors.txt

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@ tests/cases/conformance/classes/members/privateNames/IdentifierNameWithExtendedE
3030
tests/cases/conformance/classes/members/privateNames/IdentifierNameWithExtendedEscape2.ts(8,15): error TS1005: ';' expected.
3131
tests/cases/conformance/classes/members/privateNames/IdentifierNameWithExtendedEscape2.ts(9,9): error TS2532: Object is possibly 'undefined'.
3232
tests/cases/conformance/classes/members/privateNames/IdentifierNameWithExtendedEscape2.ts(11,1): error TS1128: Declaration or statement expected.
33-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(2,5): error TS1127: Invalid character.
34-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(2,6): error TS1005: ';' expected.
35-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(5,14): error TS1127: Invalid character.
36-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(5,15): error TS1005: ';' expected.
37-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(5,15): error TS2663: Cannot find name '\u0078'. Did you mean the instance member 'this.\u0078'?
38-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(9,14): error TS2339: Property '#x' does not exist on type 'PrivateIdentifierWithEscape1'.
33+
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(2,5): error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.
3934
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape2.ts(2,5): error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.
4035
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(2,5): error TS1127: Invalid character.
4136
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(2,6): error TS1127: Invalid character.
@@ -189,28 +184,18 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEx
189184
~
190185
!!! error TS1128: Declaration or statement expected.
191186

192-
==== tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts (6 errors) ====
187+
==== tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts (1 errors) ====
193188
export class PrivateIdentifierWithEscape1 {
194189
#\u0078: number;
195-
~
196-
!!! error TS1127: Invalid character.
197-
~~~~~~
198-
!!! error TS1005: ';' expected.
190+
~~~~~~~
191+
!!! error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.
199192

200193
constructor() {
201194
this.#\u0078 = 0;
202-
~
203-
!!! error TS1127: Invalid character.
204-
~~~~~~
205-
!!! error TS1005: ';' expected.
206-
~~~~~~
207-
!!! error TS2663: Cannot find name '\u0078'. Did you mean the instance member 'this.\u0078'?
208195
}
209196

210197
doThing() {
211198
this.#x = 42;
212-
~~
213-
!!! error TS2339: Property '#x' does not exist on type 'PrivateIdentifierWithEscape1'.
214199
}
215200
}
216201

tests/baselines/reference/privateNamesEscapeSequences01(target=es5).js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,27 +189,27 @@ doThing();
189189
}
190190
//// [PrivateIdentifierNameWithEscape1.js]
191191
"use strict";
192-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
193-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
194-
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");
195-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
192+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
193+
if (kind === "m") throw new TypeError("Private method is not writable");
194+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
195+
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");
196+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
196197
};
197-
var _PrivateIdentifierWithEscape1_;
198+
var _PrivateIdentifierWithEscape1_x;
198199
Object.defineProperty(exports, "__esModule", { value: true });
199200
exports.PrivateIdentifierWithEscape1 = void 0;
200201
var PrivateIdentifierWithEscape1 = /** @class */ (function () {
201202
function PrivateIdentifierWithEscape1() {
202-
_PrivateIdentifierWithEscape1_.set(this, void 0);
203-
__classPrivateFieldGet(this, _PrivateIdentifierWithEscape1_, "f");
204-
\u0078 = 0;
203+
_PrivateIdentifierWithEscape1_x.set(this, void 0);
204+
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape1_x, 0, "f");
205205
}
206206
PrivateIdentifierWithEscape1.prototype.doThing = function () {
207-
this. = 42;
207+
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape1_x, 42, "f");
208208
};
209209
return PrivateIdentifierWithEscape1;
210210
}());
211211
exports.PrivateIdentifierWithEscape1 = PrivateIdentifierWithEscape1;
212-
_PrivateIdentifierWithEscape1_ = new WeakMap();
212+
_PrivateIdentifierWithEscape1_x = new WeakMap();
213213
//// [PrivateIdentifierNameWithEscape2.js]
214214
"use strict";
215215
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {

0 commit comments

Comments
 (0)