-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
TypeScript Version:
1.8.10
Code
export abstract class AbstractClass {
constructor() {
this.abstractMethod();
}
abstract abstractMethod(): void;
}
Output
"use strict";
var AbstractClass = (function () {
function AbstractClass() {
this.abstractMethod();
}
return AbstractClass;
}());
exports.AbstractClass = AbstractClass;
Question
Is there a situation where calling this.abstractMethod
inside the constructor
makes sense? I have accidentally hit this pattern and the class compiles successfully, but the resulting JavaScript obviously fails because this.abstractMethod is not a function
.
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code