Is there an equivalent to "sealed" or "final" in TypeScript?

Example of implementation hack of 'sealed method' as readonly property of type function which throws compiler error when attempting to override in extended class:

abstract class BaseClass {
    protected element: JQuery<HTMLElement>;
    constructor(element: JQuery<HTMLElement>) {
        this.element = element;
    }
    readonly public dispose = (): void => {
        this.element.remove();
    }
}

class MyClass extends BaseClass {
    constructor(element: JQuery<HTMLElement>) {
        super(element);
    }
    public dispose(): void { } // Compiler error: "Property 'dispose' in type 'MyClass' is not assignable to the same property in base type 'BaseClass'"
}

TypeScript 2.0 supports "final" classes through using of private constructor:

class A {
    private constructor(){}
}

class B extends A{} //Cannot extend a class 'A'. Class constructor is marked as private.ts(2675)

No, at the time of this writing there is not. There is a proposal for such a keyword which is still being considered, but may or may not ever be implemented.

See:

  • github.com/Microsoft/TypeScript/issues/9264, and
  • github.com/Microsoft/TypeScript/issues/8306