Rename isObjectLiteralPatternWithComputedProperties

This commit is contained in:
Nathan Shively-Sanders 2016-10-03 16:01:08 -07:00
parent 99cbd1ffa9
commit 663ee44e62
2 changed files with 5 additions and 5 deletions

View File

@ -3179,7 +3179,7 @@ namespace ts {
result.pattern = pattern;
}
if (hasComputedProperties) {
result.inObjectLiteralPatternWithComputedProperties = hasComputedProperties;
result.isObjectLiteralPatternWithComputedProperties = hasComputedProperties;
}
return result;
}
@ -6650,7 +6650,7 @@ namespace ts {
function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: boolean): boolean {
if (maybeTypeOfKind(target, TypeFlags.ObjectType) &&
(!(target.flags & TypeFlags.ObjectType) || !(target as ObjectType).inObjectLiteralPatternWithComputedProperties)) {
(!(target.flags & TypeFlags.ObjectType) || !(target as ObjectType).isObjectLiteralPatternWithComputedProperties)) {
for (const prop of getPropertiesOfObjectType(source)) {
if (!isKnownProperty(target, prop.name)) {
if (reportErrors) {
@ -10311,7 +10311,7 @@ namespace ts {
}
}
else if (contextualTypeHasPattern &&
!(contextualType.flags & TypeFlags.ObjectType && (contextualType as ObjectType).inObjectLiteralPatternWithComputedProperties)) {
!(contextualType.flags & TypeFlags.ObjectType && (contextualType as ObjectType).isObjectLiteralPatternWithComputedProperties)) {
// If object literal is contextually typed by the implied type of a binding pattern, and if the
// binding pattern specifies a default value for the property, make the property optional.
const impliedProp = getPropertyOfType(contextualType, member.name);
@ -10378,7 +10378,7 @@ namespace ts {
const freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : TypeFlags.FreshLiteral;
result.flags |= TypeFlags.ObjectLiteral | TypeFlags.ContainsObjectLiteral | freshObjectLiteralFlag | (typeFlags & TypeFlags.PropagatingFlags);
if (patternWithComputedProperties) {
result.inObjectLiteralPatternWithComputedProperties = patternWithComputedProperties;
result.isObjectLiteralPatternWithComputedProperties = patternWithComputedProperties;
}
if (inDestructuringPattern) {
result.pattern = node;

View File

@ -2462,7 +2462,7 @@ namespace ts {
// Object types (TypeFlags.ObjectType)
export interface ObjectType extends Type {
inObjectLiteralPatternWithComputedProperties?: boolean;
isObjectLiteralPatternWithComputedProperties?: boolean;
}
// Class and interface types (TypeFlags.Class and TypeFlags.Interface)