ecmascript-types
ecmascript-types copied to clipboard
Create examples with private and static typed class members
See these proposals:
https://github.com/tc39/proposal-private-methods
https://github.com/tc39/proposal-static-class-features
I already have public fields in the document, and there's no conflicting syntax.
class A {
a:uint8 = 0
#b:uint8 = 0
static #c:uint8 = 0
get #d():uint8 { return #b; }
set #d(value) {
#b = value;
}
static #e(a:A, value:uint8) {
a.#b = value;
}
}