Remove added type predicates

I forgot that 'f(x): x is T' implies that x is *not* T if f returns
false.
This commit is contained in:
Nathan Shively-Sanders 2017-09-05 10:39:32 -07:00
parent d4708dcab2
commit 2fc14d8ae8

View file

@ -9781,7 +9781,7 @@ namespace ts {
return type.flags & TypeFlags.TypeParameter && !getConstraintFromTypeParameter(<TypeParameter>type);
}
function isTypeReferenceWithGenericArguments(type: Type): type is TypeReference {
function isTypeReferenceWithGenericArguments(type: Type): boolean {
return getObjectFlags(type) & ObjectFlags.Reference && some((<TypeReference>type).typeArguments, t => isUnconstrainedTypeParameter(t) || isTypeReferenceWithGenericArguments(t));
}
@ -9801,7 +9801,7 @@ namespace ts {
result += "=" + index;
}
else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
result += "<" + getTypeReferenceId(t, typeParameters, depth + 1) + ">";
result += "<" + getTypeReferenceId(t as TypeReference, typeParameters, depth + 1) + ">";
}
else {
result += "-" + t.id;
@ -10052,7 +10052,7 @@ namespace ts {
getUnionType(types, /*subtypeReduction*/ true);
}
function isArrayType(type: Type): type is TypeReference {
function isArrayType(type: Type): boolean {
return getObjectFlags(type) & ObjectFlags.Reference && (<TypeReference>type).target === globalArrayType;
}