@@ -862,7 +862,7 @@ namespace ts {
862862 if (name.kind === SyntaxKind.Identifier) {
863863 let message = meaning === SymbolFlags.Namespace ? Diagnostics.Cannot_find_namespace_0 : Diagnostics.Cannot_find_name_0;
864864
865- symbol = resolveName(name, (<Identifier>name).text, meaning, ! ignoreErrors ? message : undefined , <Identifier>name);
865+ symbol = resolveName(name, (<Identifier>name).text, meaning, ignoreErrors ? undefined : message , <Identifier>name);
866866 if (!symbol) {
867867 return undefined;
868868 }
@@ -13221,47 +13221,47 @@ namespace ts {
1322113221 return type.flags & TypeFlags.ObjectType && getSignaturesOfType(type, SignatureKind.Call).length > 0;
1322213222 }
1322313223
13224- function isTypeWithValue (node: TypeReferenceNode): TypeWithValueResolutionResult {
13224+ function getTypeReferenceSerializationKind (node: TypeReferenceNode): TypeReferenceSerializationKind {
1322513225 // Resolve the symbol as a value to ensure the type can be reached at runtime during emit.
1322613226 let symbol = resolveEntityName(node.typeName, SymbolFlags.Value, /*ignoreErrors*/ true);
1322713227 let constructorType = symbol ? getTypeOfSymbol(symbol) : undefined;
1322813228 if (constructorType && isConstructorType(constructorType)) {
13229- return TypeWithValueResolutionResult.ConstructorTypeWithValue ;
13229+ return TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue ;
1323013230 }
1323113231
1323213232 let type = getTypeFromTypeNode(node);
1323313233 if (type === unknownType) {
13234- return TypeWithValueResolutionResult .Unknown;
13234+ return TypeReferenceSerializationKind .Unknown;
1323513235 }
1323613236 else if (type.flags & TypeFlags.Any) {
13237- return TypeWithValueResolutionResult .ObjectType;
13237+ return TypeReferenceSerializationKind .ObjectType;
1323813238 }
1323913239 else if (allConstituentTypesHaveKind(type, TypeFlags.Void)) {
13240- return TypeWithValueResolutionResult .VoidType;
13240+ return TypeReferenceSerializationKind .VoidType;
1324113241 }
1324213242 else if (allConstituentTypesHaveKind(type, TypeFlags.Boolean)) {
13243- return TypeWithValueResolutionResult .BooleanType;
13243+ return TypeReferenceSerializationKind .BooleanType;
1324413244 }
1324513245 else if (allConstituentTypesHaveKind(type, TypeFlags.NumberLike)) {
13246- return TypeWithValueResolutionResult.NumberType ;
13246+ return TypeReferenceSerializationKind.NumberLikeType ;
1324713247 }
1324813248 else if (allConstituentTypesHaveKind(type, TypeFlags.StringLike)) {
13249- return TypeWithValueResolutionResult.StringType ;
13249+ return TypeReferenceSerializationKind.StringLikeType ;
1325013250 }
1325113251 else if (allConstituentTypesHaveKind(type, TypeFlags.Tuple)) {
13252- return TypeWithValueResolutionResult.ArrayType ;
13252+ return TypeReferenceSerializationKind.ArrayLikeType ;
1325313253 }
1325413254 else if (allConstituentTypesHaveKind(type, TypeFlags.ESSymbol)) {
13255- return TypeWithValueResolutionResult .ESSymbolType;
13255+ return TypeReferenceSerializationKind .ESSymbolType;
1325613256 }
1325713257 else if (isFunctionType(type)) {
13258- return TypeWithValueResolutionResult.FunctionType ;
13258+ return TypeReferenceSerializationKind.TypeWithCallSignature ;
1325913259 }
1326013260 else if (isArrayType(type)) {
13261- return TypeWithValueResolutionResult.ArrayType ;
13261+ return TypeReferenceSerializationKind.ArrayLikeType ;
1326213262 }
1326313263 else {
13264- return TypeWithValueResolutionResult .ObjectType;
13264+ return TypeReferenceSerializationKind .ObjectType;
1326513265 }
1326613266 }
1326713267
@@ -13362,7 +13362,7 @@ namespace ts {
1336213362 collectLinkedAliases,
1336313363 getBlockScopedVariableId,
1336413364 getReferencedValueDeclaration,
13365- isTypeWithValue ,
13365+ getTypeReferenceSerializationKind ,
1336613366 };
1336713367 }
1336813368
0 commit comments