Fix class/interface merging issue + lint error
This commit is contained in:
parent
4e56fc0d27
commit
201305859f
1 changed files with 8 additions and 6 deletions
|
@ -3564,11 +3564,13 @@ namespace ts {
|
|||
if (type.flags & TypeFlags.Tuple) {
|
||||
type.resolvedBaseTypes = [createArrayType(getUnionType(type.typeParameters))];
|
||||
}
|
||||
else if (type.symbol.flags & SymbolFlags.Class) {
|
||||
resolveBaseTypesOfClass(type);
|
||||
}
|
||||
else if (type.symbol.flags & SymbolFlags.Interface) {
|
||||
resolveBaseTypesOfInterface(type);
|
||||
else if (type.symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) {
|
||||
if (type.symbol.flags & SymbolFlags.Class) {
|
||||
resolveBaseTypesOfClass(type);
|
||||
}
|
||||
if (type.symbol.flags & SymbolFlags.Interface) {
|
||||
resolveBaseTypesOfInterface(type);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Debug.fail("type must be class or interface");
|
||||
|
@ -4972,7 +4974,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
function cloneTypeReference(source: TypeReference): TypeReference {
|
||||
let type = <TypeReference>createObjectType(source.flags, source.symbol);
|
||||
const type = <TypeReference>createObjectType(source.flags, source.symbol);
|
||||
type.target = source.target;
|
||||
type.typeArguments = source.typeArguments;
|
||||
return type;
|
||||
|
|
Loading…
Reference in a new issue