Merge pull request #29069 from weswigham/remove-duplicate-function

Remove duplicate function from checker
This commit is contained in:
Daniel Rosenwasser
2018-12-17 16:48:14 -08:00
committed by GitHub

View File

@@ -7158,7 +7158,7 @@ namespace ts {
return list.some(property => {
const name = property.name && getTextOfPropertyName(property.name);
const expected = name === undefined ? undefined : getTypeOfPropertyOfType(contextualType, name);
return !!expected && typeIsLiteralType(expected) && !isTypeIdenticalTo(getTypeOfNode(property), expected);
return !!expected && isLiteralType(expected) && !isTypeIdenticalTo(getTypeOfNode(property), expected);
});
}
@@ -30937,8 +30937,4 @@ namespace ts {
export const LibraryManagedAttributes = "LibraryManagedAttributes" as __String;
// tslint:enable variable-name
}
function typeIsLiteralType(type: Type): type is LiteralType {
return !!(type.flags & TypeFlags.Literal);
}
}