Skip to content

Commit 63fd359

Browse files
committed
turn off error for any non-class base
1 parent af0233f commit 63fd359

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36226,10 +36226,9 @@ namespace ts {
3622636226
if (basePropertyFlags && derivedPropertyFlags) {
3622736227
// property/accessor is overridden with property/accessor
3622836228
if (baseDeclarationFlags & ModifierFlags.Abstract && !(base.valueDeclaration && isPropertyDeclaration(base.valueDeclaration) && base.valueDeclaration.initializer)
36229-
|| base.valueDeclaration && base.valueDeclaration.parent.kind === SyntaxKind.InterfaceDeclaration
36230-
|| getCheckFlags(base) & CheckFlags.Mapped
36229+
|| !base.declarations?.some(decl => isClassLike(decl.parent))
3623136230
|| derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
36232-
// when the base property is abstract or from an interface or mapped type, base/derived flags don't need to match
36231+
// when the base property is abstract or not from a class, base/derived flags don't need to match
3623336232
// same when the derived property is from an assignment
3623436233
continue;
3623536234
}

0 commit comments

Comments
 (0)