@@ -166,8 +166,8 @@ namespace ts {
166
166
// in getPropagatingFlagsOfTypes, and it is checked in inferFromTypes.
167
167
anyFunctionType.flags |= TypeFlags.ContainsAnyFunctionType;
168
168
169
- const noConstraintOrDefaultType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
170
- const circularConstraintOrDefaultType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
169
+ const noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
170
+ const circularConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined);
171
171
172
172
const anySignature = createSignature(undefined, undefined, 0, undefined, emptyArray, anyType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
173
173
const unknownSignature = createSignature(undefined, undefined, 0, undefined, emptyArray, unknownType, /*typePredicate*/ undefined, 0, /*hasRestParameter*/ false, /*hasLiteralTypes*/ false);
@@ -4791,11 +4791,11 @@ namespace ts {
4791
4791
4792
4792
function getBaseConstraintOfType(type: TypeVariable | UnionOrIntersectionType): Type {
4793
4793
const constraint = getResolvedBaseConstraint(type);
4794
- return constraint !== noConstraintOrDefaultType && constraint !== circularConstraintOrDefaultType ? constraint : undefined;
4794
+ return constraint !== noConstraintType && constraint !== circularConstraintType ? constraint : undefined;
4795
4795
}
4796
4796
4797
4797
function hasNonCircularBaseConstraint(type: TypeVariable): boolean {
4798
- return getResolvedBaseConstraint(type) !== circularConstraintOrDefaultType ;
4798
+ return getResolvedBaseConstraint(type) !== circularConstraintType ;
4799
4799
}
4800
4800
4801
4801
/**
@@ -4809,7 +4809,7 @@ namespace ts {
4809
4809
if (!type.resolvedBaseConstraint) {
4810
4810
typeStack = [];
4811
4811
const constraint = getBaseConstraint(type);
4812
- type.resolvedBaseConstraint = circular ? circularConstraintOrDefaultType : getTypeWithThisArgument(constraint || noConstraintOrDefaultType , type);
4812
+ type.resolvedBaseConstraint = circular ? circularConstraintType : getTypeWithThisArgument(constraint || noConstraintType , type);
4813
4813
}
4814
4814
return type.resolvedBaseConstraint;
4815
4815
@@ -4869,14 +4869,14 @@ namespace ts {
4869
4869
if (!typeParameter.default) {
4870
4870
if (typeParameter.target) {
4871
4871
const targetDefault = getDefaultFromTypeParameter(typeParameter.target);
4872
- typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintOrDefaultType ;
4872
+ typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType ;
4873
4873
}
4874
4874
else {
4875
4875
const defaultDeclaration = typeParameter.symbol && forEach(typeParameter.symbol.declarations, decl => isTypeParameter(decl) && decl.default);
4876
- typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintOrDefaultType ;
4876
+ typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType ;
4877
4877
}
4878
4878
}
4879
- return typeParameter.default === noConstraintOrDefaultType ? undefined : typeParameter.default;
4879
+ return typeParameter.default === noConstraintType ? undefined : typeParameter.default;
4880
4880
}
4881
4881
4882
4882
/**
@@ -5497,14 +5497,14 @@ namespace ts {
5497
5497
if (!typeParameter.constraint) {
5498
5498
if (typeParameter.target) {
5499
5499
const targetConstraint = getConstraintOfTypeParameter(typeParameter.target);
5500
- typeParameter.constraint = targetConstraint ? instantiateType(targetConstraint, typeParameter.mapper) : noConstraintOrDefaultType ;
5500
+ typeParameter.constraint = targetConstraint ? instantiateType(targetConstraint, typeParameter.mapper) : noConstraintType ;
5501
5501
}
5502
5502
else {
5503
5503
const constraintDeclaration = getConstraintDeclaration(typeParameter);
5504
- typeParameter.constraint = constraintDeclaration ? getTypeFromTypeNode(constraintDeclaration) : noConstraintOrDefaultType ;
5504
+ typeParameter.constraint = constraintDeclaration ? getTypeFromTypeNode(constraintDeclaration) : noConstraintType ;
5505
5505
}
5506
5506
}
5507
- return typeParameter.constraint === noConstraintOrDefaultType ? undefined : typeParameter.constraint;
5507
+ return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint;
5508
5508
}
5509
5509
5510
5510
function getParentSymbolOfTypeParameter(typeParameter: TypeParameter): Symbol {
@@ -15846,12 +15846,12 @@ namespace ts {
15846
15846
}
15847
15847
}
15848
15848
15849
- /**
15849
+ /**
15850
15850
* Static members being set on a constructor function may conflict with built-in properties
15851
- * of Function. Esp. in ECMAScript 5 there are non-configurable and non-writable
15852
- * built-in properties. This check issues a transpile error when a class has a static
15851
+ * of Function. Esp. in ECMAScript 5 there are non-configurable and non-writable
15852
+ * built-in properties. This check issues a transpile error when a class has a static
15853
15853
* member with the same name as a non-writable built-in property.
15854
- *
15854
+ *
15855
15855
* @see http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.3
15856
15856
* @see http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.5
15857
15857
* @see http://www.ecma-international.org/ecma-262/6.0/#sec-properties-of-the-function-constructor
0 commit comments