mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-09 07:55:10 -05:00
Allow object intersection types in class implements clauses
This commit is contained in:
@@ -18411,8 +18411,7 @@ namespace ts {
|
||||
if (produceDiagnostics) {
|
||||
const t = getTypeFromTypeNode(typeRefNode);
|
||||
if (t !== unknownType) {
|
||||
const declaredType = getObjectFlags(t) & ObjectFlags.Reference ? (<TypeReference>t).target : t;
|
||||
if (getObjectFlags(declaredType) & ObjectFlags.ClassOrInterface) {
|
||||
if (isValidBaseType(t)) {
|
||||
checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(t, type.thisType), node.name || node, Diagnostics.Class_0_incorrectly_implements_interface_1);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user