-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
Potentially a bug, or just unexpected behavior. So I have this abstract class:
export abstract class Transformer {
abstract identifyViaRawStr: () => boolean;
abstract identifyViaJSObject: (v: any) => boolean;
abstract getValue: (v:any) => string;
abstract transformToBunionFormat: (v: any) => BunionJSON
}and then I implement it with another class:
const c = new (class implements Transformer{
getValue(v: any) {
return '';
}
identifyViaJSObject: (v: any) => boolean;
identifyViaRawStr: () => boolean;
transformToBunionFormat: (v: any) => BunionJSON;
});the above compiles fine, but looks funny since 3/4 methods are not implemented. It transpiles without an error to:
class Transformer {
}
exports.Transformer = Transformer;
const c = new (class {
getValue(v) {
return '';
}
});I mean maybe this is correct, but it's not expected at least for me.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code