Removing unused logic

This commit is contained in:
Anders Hejlsberg
2016-04-20 09:15:57 -07:00
parent bab8ef4b10
commit e9a7d3d98c

View File

@@ -119,7 +119,6 @@ namespace ts {
const nullType = createIntrinsicType(TypeFlags.Null | nullableWideningFlags, "null");
const emptyArrayElementType = createIntrinsicType(TypeFlags.Undefined | TypeFlags.ContainsUndefinedOrNull, "undefined");
const unknownType = createIntrinsicType(TypeFlags.Any, "unknown");
const resolvingFlowType = createIntrinsicType(TypeFlags.Void, "__resolving__");
const emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
const emptyUnionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
@@ -7603,11 +7602,7 @@ namespace ts {
}
function getTypeAtFlowCondition(flow: FlowCondition) {
const type = getTypeAtFlowNode(flow.antecedent);
if (type === resolvingFlowType) {
return type;
}
return narrowType(type, (<FlowCondition>flow).expression, (<FlowCondition>flow).assumeTrue);
return narrowType(getTypeAtFlowNode(flow.antecedent), flow.expression, flow.assumeTrue);
}
function getTypeAtFlowNodeCached(flow: FlowNode) {