Skip to content

Commit 092edbd

Browse files
committed
example for class fields.
1 parent deb8b78 commit 092edbd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

_data/stage3.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,17 @@
163163
tests:
164164
- https://github.com/tc39/test262/issues/1161
165165
specification: https://tc39.github.io/proposal-class-fields/
166+
example: >
167+
class Foo {
168+
instancePropertyBar = 0;
169+
static staticPropertyBar = 0;
170+
#privatePropertyBar = 0;
171+
static #privatePropertyBar = 0;
172+
173+
set foo(value) { console.log(value); }
174+
}
166175
resources:
167-
- https://github.com/tc39/proposal-numeric-separator
176+
- https://github.com/tc39/proposal-class-fields
168177

169178
- title: Static class fields and private static methods
170179
description: This proposal adds Static public fields, Static private methods and Static private fields
@@ -319,7 +328,7 @@
319328
// Unpaired surrogate code units will serialize to escape sequences.
320329
JSON.stringify('\uDF06\uD834')
321330
// → '"\\udf06\\ud834"'
322-
331+
323332
JSON.stringify('\uDEAD')
324333
// → '"\\udead"'
325334

0 commit comments

Comments
 (0)