The final keyword for classes

In order to protect certain public properties in a class, we need to use the Object.defineProperty method with a configurable and writable value set to false. While this is not very convenient, we would like to have a keyword that could be used for this purpose. For example, the final keyword.
It may also be a good signal to the JIT compiler that this property or method will not be overwritten or changed.

class Foo {
  final bar = 'baz'
  final static bar = 'baz'
  final method() {}
}

We also sometimes use the freeze() method for both protection and optimization purposes, which can be inconvenient for classes. The final keyword could also help us in this situation.

final class Foo {}
// just sugar for
class Foo {
  constructor() {
    return Object.freeze(this)
  }
}

Thus, the keyword is eventually introduced as syntactic sugar for Object.freeze(obj) and Object.defineProperty(obj, prop, { writable: false, configurable: false })

Related: Final classes