can’t find any difference in standard class definition in Observable
class User {
#nameValue
constructor(name) {
this.name = name
}
get name() {
return this.#nameValue
}
set name(name) {
if (name === '') {
throw new Error('Empty user name')
}
this.#nameValue = name
}
}
const user = new User('username1')
static and private fields and method not supported.
what other restrictions are there, help please
Yes, Observable does not support class fields yet. I’m sorry, I’ve run into this limitation too, it’s annoying and it’s been true for a while. I’ve just reopened this old issue for it.