user7131571 user7131571 - 14 days ago 7
TypeScript Question

how to use abstract class with template in typescript and call it

SnapShot of code

This is not working.

It is throwing error: "Unable to parse the file"

Answer

The syntax should be something like this:

abstract class Abstract<T> {
    public name: T;

    constructor() {
    }
}


class NonAbstract<T> extends Abstract<T> {
    constructor() {
        super();
    }
}