From cd0d3babe9d4d79b51fa75c55707901a6579d92f Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 8 Jul 2015 19:04:58 -0700 Subject: [PATCH 01/22] Object literals can only have properties that exist in contextual type --- src/compiler/checker.ts | 15 +++++++++++++++ .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1edd2a7a920c5..29922f17e3359 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6830,6 +6830,18 @@ namespace ts { return links.resolvedType; } + function isPermittedProperty(contextualType: Type, propName: string): boolean { + if (contextualType.flags & TypeFlags.ObjectType) { + let resolved = resolveStructuredTypeMembers(contextualType); + return !!(resolved.properties.length === 0 || resolved.stringIndexType || + resolved.numberIndexType || getPropertyOfObjectType(contextualType, propName)); + } + if (contextualType.flags & TypeFlags.UnionOrIntersection) { + return !forEach((contextualType).types, type => !isPermittedProperty(type, propName)); + } + return true; + } + function checkObjectLiteral(node: ObjectLiteralExpression, contextualMapper?: TypeMapper): Type { // Grammar checking checkGrammarObjectLiteralExpression(node); @@ -6879,6 +6891,9 @@ namespace ts { if (!hasDynamicName(memberDecl)) { propertiesTable[member.name] = member; + if (contextualType && !isPermittedProperty(contextualType, member.name)) { + error(memberDecl.name, Diagnostics.Property_0_does_not_exist_in_contextual_type_1, member.name, typeToString(contextualType)); + } } propertiesArray.push(member); } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index a17f885759081..33f30abc4ab3a 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -414,6 +414,7 @@ namespace ts { The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, yield_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2523, category: DiagnosticCategory.Error, key: "'yield' expressions cannot be used in a parameter initializer." }, await_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2524, category: DiagnosticCategory.Error, key: "'await' expressions cannot be used in a parameter initializer." }, + Property_0_does_not_exist_in_contextual_type_1: { code: 2525, category: DiagnosticCategory.Error, key: "Property '{0}' does not exist in contextual type '{1}'." }, JSX_element_attributes_type_0_must_be_an_object_type: { code: 2600, category: DiagnosticCategory.Error, key: "JSX element attributes type '{0}' must be an object type." }, The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: DiagnosticCategory.Error, key: "The return type of a JSX element constructor must return an object type." }, JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: DiagnosticCategory.Error, key: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 94be4f53c9717..8036009b97407 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1645,6 +1645,10 @@ "category": "Error", "code": 2524 }, + "Property '{0}' does not exist in contextual type '{1}'.": { + "category": "Error", + "code": 2525 + }, "JSX element attributes type '{0}' must be an object type.": { "category": "Error", "code": 2600 From 11aecee9a6e78a8653007b8e4a0bf05e5223f506 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 10 Jul 2015 19:16:53 -0700 Subject: [PATCH 02/22] Switch to assignability check and fix compiler bugs found by check --- src/compiler/checker.ts | 90 +++++++++++++------ .../diagnosticInformationMap.generated.ts | 1 - src/compiler/diagnosticMessages.json | 4 - src/compiler/types.ts | 14 ++- src/harness/fourslash.ts | 3 +- src/harness/loggedIO.ts | 1 + src/server/client.ts | 4 +- src/services/services.ts | 5 +- src/services/shims.ts | 4 +- 9 files changed, 81 insertions(+), 45 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 29922f17e3359..2dd7b0fc2e646 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1966,15 +1966,12 @@ namespace ts { } return _displayBuilder || (_displayBuilder = { - symbolToString: symbolToString, - typeToString: typeToString, buildSymbolDisplay: buildSymbolDisplay, buildTypeDisplay: buildTypeDisplay, buildTypeParameterDisplay: buildTypeParameterDisplay, buildParameterDisplay: buildParameterDisplay, buildDisplayForParametersAndDelimiters: buildDisplayForParametersAndDelimiters, buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters, - buildDisplayForTypeArgumentsAndDelimiters: buildDisplayForTypeArgumentsAndDelimiters, buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol, buildSignatureDisplay: buildSignatureDisplay, buildReturnTypeDisplay: buildReturnTypeDisplay @@ -4480,6 +4477,16 @@ namespace ts { errorInfo = chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); } + function reportRelationError(message: DiagnosticMessage, source: Type, target: Type) { + let sourceType = typeToString(source); + let targetType = typeToString(target); + if (sourceType === targetType) { + sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType); + targetType = typeToString(target, /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType); + } + reportError(message || Diagnostics.Type_0_is_not_assignable_to_type_1, sourceType, targetType); + } + // Compare two types and return // Ternary.True if they are related with no assumptions, // Ternary.Maybe if they are related with assumptions of other relationships, or @@ -4499,7 +4506,19 @@ namespace ts { if (source === numberType && target.flags & TypeFlags.Enum) return Ternary.True; } } + + if (relation === assignableRelation && source.flags & TypeFlags.ObjectLiteral && source.flags & TypeFlags.FreshObjectLiteral) { + if (hasExcessProperties(source, target, reportErrors)) { + if (reportErrors) { + reportRelationError(headMessage, source, target); + } + return Ternary.False; + } + source = getRegularTypeOfObjectLiteral(source); + } + let saveErrorInfo = errorInfo; + if (source.flags & TypeFlags.Reference && target.flags & TypeFlags.Reference && (source).target === (target).target) { // We have type references to same target type, see if relationship holds for all type arguments if (result = typesRelatedTo((source).typeArguments, (target).typeArguments, reportErrors)) { @@ -4576,18 +4595,28 @@ namespace ts { } if (reportErrors) { - headMessage = headMessage || Diagnostics.Type_0_is_not_assignable_to_type_1; - let sourceType = typeToString(source); - let targetType = typeToString(target); - if (sourceType === targetType) { - sourceType = typeToString(source, /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType); - targetType = typeToString(target, /*enclosingDeclaration*/ undefined, TypeFormatFlags.UseFullyQualifiedType); - } - reportError(headMessage, sourceType, targetType); + reportRelationError(headMessage, source, target); } return Ternary.False; } + function hasExcessProperties(source: ObjectType, target: Type, reportErrors: boolean): boolean { + if (target.flags & TypeFlags.ObjectType) { + var resolved = resolveStructuredTypeMembers(target); + if (resolved.properties.length > 0 && !resolved.stringIndexType && !resolved.numberIndexType) { + for (let prop of getPropertiesOfObjectType(source)) { + if (!getPropertyOfType(target, prop.name)) { + if (reportErrors) { + reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); + } + return true; + } + } + } + } + return false; + } + function eachTypeRelatedToSomeType(source: UnionOrIntersectionType, target: UnionOrIntersectionType): Ternary { let result = Ternary.True; let sourceTypes = source.types; @@ -5255,6 +5284,24 @@ namespace ts { return (type.flags & TypeFlags.Tuple) && !!(type).elementTypes; } + function getRegularTypeOfObjectLiteral(type: Type): Type { + if (type.flags & TypeFlags.FreshObjectLiteral) { + let regularType = (type).regularType; + if (!regularType) { + regularType = createType((type).flags & ~TypeFlags.FreshObjectLiteral); + regularType.symbol = (type).symbol; + regularType.members = (type).members; + regularType.properties = (type).properties; + regularType.callSignatures = (type).callSignatures; + regularType.constructSignatures = (type).constructSignatures; + regularType.stringIndexType = (type).stringIndexType; + regularType.numberIndexType = (type).numberIndexType; + } + return regularType; + } + return type; + } + function getWidenedTypeOfObjectLiteral(type: Type): Type { let properties = getPropertiesOfObjectType(type); let members: SymbolTable = {}; @@ -6830,18 +6877,6 @@ namespace ts { return links.resolvedType; } - function isPermittedProperty(contextualType: Type, propName: string): boolean { - if (contextualType.flags & TypeFlags.ObjectType) { - let resolved = resolveStructuredTypeMembers(contextualType); - return !!(resolved.properties.length === 0 || resolved.stringIndexType || - resolved.numberIndexType || getPropertyOfObjectType(contextualType, propName)); - } - if (contextualType.flags & TypeFlags.UnionOrIntersection) { - return !forEach((contextualType).types, type => !isPermittedProperty(type, propName)); - } - return true; - } - function checkObjectLiteral(node: ObjectLiteralExpression, contextualMapper?: TypeMapper): Type { // Grammar checking checkGrammarObjectLiteralExpression(node); @@ -6891,9 +6926,6 @@ namespace ts { if (!hasDynamicName(memberDecl)) { propertiesTable[member.name] = member; - if (contextualType && !isPermittedProperty(contextualType, member.name)) { - error(memberDecl.name, Diagnostics.Property_0_does_not_exist_in_contextual_type_1, member.name, typeToString(contextualType)); - } } propertiesArray.push(member); } @@ -6901,7 +6933,7 @@ namespace ts { let stringIndexType = getIndexType(IndexKind.String); let numberIndexType = getIndexType(IndexKind.Number); let result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); - result.flags |= TypeFlags.ObjectLiteral | TypeFlags.ContainsObjectLiteral | (typeFlags & TypeFlags.ContainsUndefinedOrNull); + result.flags |= TypeFlags.ObjectLiteral | TypeFlags.FreshObjectLiteral | TypeFlags.ContainsObjectLiteral | (typeFlags & TypeFlags.ContainsUndefinedOrNull); return result; function getIndexType(kind: IndexKind) { @@ -8782,7 +8814,7 @@ namespace ts { } function checkAssertion(node: AssertionExpression) { - let exprType = checkExpression(node.expression); + let exprType = getRegularTypeOfObjectLiteral(checkExpression(node.expression)); let targetType = getTypeFromTypeNode(node.type); if (produceDiagnostics && targetType !== unknownType) { let widenedType = getWidenedType(exprType); @@ -9559,7 +9591,7 @@ namespace ts { return getUnionType([leftType, rightType]); case SyntaxKind.EqualsToken: checkAssignmentOperator(rightType); - return rightType; + return getRegularTypeOfObjectLiteral(rightType); case SyntaxKind.CommaToken: return rightType; } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 33f30abc4ab3a..a17f885759081 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -414,7 +414,6 @@ namespace ts { The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." }, yield_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2523, category: DiagnosticCategory.Error, key: "'yield' expressions cannot be used in a parameter initializer." }, await_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2524, category: DiagnosticCategory.Error, key: "'await' expressions cannot be used in a parameter initializer." }, - Property_0_does_not_exist_in_contextual_type_1: { code: 2525, category: DiagnosticCategory.Error, key: "Property '{0}' does not exist in contextual type '{1}'." }, JSX_element_attributes_type_0_must_be_an_object_type: { code: 2600, category: DiagnosticCategory.Error, key: "JSX element attributes type '{0}' must be an object type." }, The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: { code: 2601, category: DiagnosticCategory.Error, key: "The return type of a JSX element constructor must return an object type." }, JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: { code: 2602, category: DiagnosticCategory.Error, key: "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 8036009b97407..94be4f53c9717 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1645,10 +1645,6 @@ "category": "Error", "code": 2524 }, - "Property '{0}' does not exist in contextual type '{1}'.": { - "category": "Error", - "code": 2525 - }, "JSX element attributes type '{0}' must be an object type.": { "category": "Error", "code": 2600 diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6c2f72a1ab794..d23f2f69bf9bc 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1743,10 +1743,12 @@ namespace ts { FromSignature = 0x00040000, // Created for signature assignment check ObjectLiteral = 0x00080000, // Originates in an object literal /* @internal */ - ContainsUndefinedOrNull = 0x00100000, // Type is or contains Undefined or Null type + FreshObjectLiteral = 0x00100000, // Fresh object literal type /* @internal */ - ContainsObjectLiteral = 0x00200000, // Type is or contains object literal type - ESSymbol = 0x00400000, // Type of symbol primitive introduced in ES6 + ContainsUndefinedOrNull = 0x00200000, // Type is or contains Undefined or Null type + /* @internal */ + ContainsObjectLiteral = 0x00400000, // Type is or contains object literal type + ESSymbol = 0x00800000, // Type of symbol primitive introduced in ES6 /* @internal */ Intrinsic = Any | String | Number | Boolean | ESSymbol | Void | Undefined | Null, @@ -1839,6 +1841,11 @@ namespace ts { numberIndexType?: Type; // Numeric index type } + /* @internal */ + export interface FreshObjectLiteralType extends ResolvedType { + regularType: ResolvedType; // Regular version of fresh type + } + // Just a place to cache element types of iterables and iterators /* @internal */ export interface IterableOrIteratorType extends ObjectType, UnionType { @@ -2189,6 +2196,7 @@ namespace ts { export interface CompilerHost { getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getCancellationToken?(): CancellationToken; getDefaultLibFileName(options: CompilerOptions): string; writeFile: WriteFileCallback; getCurrentDirectory(): string; diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 208237b8b6471..d82ec84d1ba78 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -26,9 +26,8 @@ module FourSlash { export interface FourSlashFile { // The contents of the file (with markers, etc stripped out) content: string; - fileName: string; - + version: number; // File-specific options (name/value pairs) fileOptions: { [index: string]: string; }; } diff --git a/src/harness/loggedIO.ts b/src/harness/loggedIO.ts index 8ba38043e78b2..a2a1c19cb0b1f 100644 --- a/src/harness/loggedIO.ts +++ b/src/harness/loggedIO.ts @@ -12,6 +12,7 @@ interface FindFileResult { } interface IOLog { + timestamp: string; arguments: string[]; executingPath: string; currentDirectory: string; diff --git a/src/server/client.ts b/src/server/client.ts index e4a524dd21034..3ad7230cf3360 100644 --- a/src/server/client.ts +++ b/src/server/client.ts @@ -202,9 +202,7 @@ namespace ts.server { return { isMemberCompletion: false, isNewIdentifierLocation: false, - entries: response.body, - fileName: fileName, - position: position + entries: response.body }; } diff --git a/src/services/services.ts b/src/services/services.ts index d79436bb478ef..3131cc628d082 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1102,6 +1102,7 @@ namespace ts { } export interface HighlightSpan { + fileName?: string; textSpan: TextSpan; kind: string; } @@ -1408,7 +1409,9 @@ namespace ts { * @param fileName The name of the file to be released * @param compilationSettings The compilation settings used to acquire the file */ - releaseDocument(fileName: string, compilationSettings: CompilerOptions): void + releaseDocument(fileName: string, compilationSettings: CompilerOptions): void; + + reportStats(): string; } // TODO: move these to enums diff --git a/src/services/shims.ts b/src/services/shims.ts index 6e765eff499f1..16230f539a13a 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -428,11 +428,11 @@ namespace ts { } } - export function realizeDiagnostics(diagnostics: Diagnostic[], newLine: string): { message: string; start: number; length: number; category: string; } []{ + export function realizeDiagnostics(diagnostics: Diagnostic[], newLine: string): { message: string; start: number; length: number; category: string; code: number; } []{ return diagnostics.map(d => realizeDiagnostic(d, newLine)); } - function realizeDiagnostic(diagnostic: Diagnostic, newLine: string): { message: string; start: number; length: number; category: string; } { + function realizeDiagnostic(diagnostic: Diagnostic, newLine: string): { message: string; start: number; length: number; category: string; code: number; } { return { message: flattenDiagnosticMessageText(diagnostic.messageText, newLine), start: diagnostic.start, From 3fe75914ae07e313d370735f8ad7e32e730b007a Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 10 Jul 2015 19:18:17 -0700 Subject: [PATCH 03/22] Accepting new baselines --- .../baselines/reference/arrayCast.errors.txt | 4 +- .../arrayLiteralTypeInference.errors.txt | 72 +++++++ .../arrayLiteralTypeInference.symbols | 113 ----------- .../reference/arrayLiteralTypeInference.types | 144 -------------- .../reference/arrayLiterals.errors.txt | 50 +++++ .../baselines/reference/arrayLiterals.symbols | 94 --------- tests/baselines/reference/arrayLiterals.types | 153 --------------- .../reference/assignmentCompatBug2.errors.txt | 15 +- .../reference/assignmentCompatBug5.errors.txt | 4 +- .../reference/contextualTyping17.errors.txt | 9 + .../reference/contextualTyping17.symbols | 9 - .../reference/contextualTyping17.types | 15 -- .../reference/contextualTyping2.errors.txt | 9 + .../reference/contextualTyping2.symbols | 7 - .../reference/contextualTyping2.types | 10 - .../reference/contextualTyping4.errors.txt | 9 + .../reference/contextualTyping4.symbols | 8 - .../reference/contextualTyping4.types | 11 -- ...nBaseCallViaSuperPropertyAccess.errors.txt | 25 +++ ...ddenBaseCallViaSuperPropertyAccess.symbols | 56 ------ ...HiddenBaseCallViaSuperPropertyAccess.types | 69 ------- ...structuringParameterProperties5.errors.txt | 4 +- .../reference/incompatibleTypes.errors.txt | 8 +- ...OrExpressionIsContextuallyTyped.errors.txt | 16 ++ ...calOrExpressionIsContextuallyTyped.symbols | 14 -- ...gicalOrExpressionIsContextuallyTyped.types | 21 -- ...objectLitStructuralTypeMismatch.errors.txt | 4 +- ...eralFunctionArgContextualTyping.errors.txt | 11 +- ...ralFunctionArgContextualTyping2.errors.txt | 8 +- ...rthandPropertiesAssignmentError.errors.txt | 4 +- ...nmentErrorFromMissingIdentifier.errors.txt | 4 +- .../reference/switchStatements.errors.txt | 63 ++++++ .../reference/switchStatements.symbols | 115 ----------- .../reference/switchStatements.types | 184 ------------------ .../reference/symbolProperty21.errors.txt | 24 +++ .../reference/symbolProperty21.symbols | 51 ----- .../reference/symbolProperty21.types | 56 ------ .../reference/tsxAttributeResolution9.symbols | 47 ----- .../reference/tsxAttributeResolution9.types | 49 ----- .../typeArgumentInference.errors.txt | 7 +- ...entInferenceConstructSignatures.errors.txt | 7 +- ...rgumentInferenceWithConstraints.errors.txt | 7 +- .../baselines/reference/typeInfer1.errors.txt | 4 +- .../baselines/reference/typeMatch2.errors.txt | 16 +- 44 files changed, 348 insertions(+), 1262 deletions(-) create mode 100644 tests/baselines/reference/arrayLiteralTypeInference.errors.txt delete mode 100644 tests/baselines/reference/arrayLiteralTypeInference.symbols delete mode 100644 tests/baselines/reference/arrayLiteralTypeInference.types create mode 100644 tests/baselines/reference/arrayLiterals.errors.txt delete mode 100644 tests/baselines/reference/arrayLiterals.symbols delete mode 100644 tests/baselines/reference/arrayLiterals.types create mode 100644 tests/baselines/reference/contextualTyping17.errors.txt delete mode 100644 tests/baselines/reference/contextualTyping17.symbols delete mode 100644 tests/baselines/reference/contextualTyping17.types create mode 100644 tests/baselines/reference/contextualTyping2.errors.txt delete mode 100644 tests/baselines/reference/contextualTyping2.symbols delete mode 100644 tests/baselines/reference/contextualTyping2.types create mode 100644 tests/baselines/reference/contextualTyping4.errors.txt delete mode 100644 tests/baselines/reference/contextualTyping4.symbols delete mode 100644 tests/baselines/reference/contextualTyping4.types create mode 100644 tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt delete mode 100644 tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.symbols delete mode 100644 tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types create mode 100644 tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt delete mode 100644 tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.symbols delete mode 100644 tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.types create mode 100644 tests/baselines/reference/switchStatements.errors.txt delete mode 100644 tests/baselines/reference/switchStatements.symbols delete mode 100644 tests/baselines/reference/switchStatements.types create mode 100644 tests/baselines/reference/symbolProperty21.errors.txt delete mode 100644 tests/baselines/reference/symbolProperty21.symbols delete mode 100644 tests/baselines/reference/symbolProperty21.types delete mode 100644 tests/baselines/reference/tsxAttributeResolution9.symbols delete mode 100644 tests/baselines/reference/tsxAttributeResolution9.types diff --git a/tests/baselines/reference/arrayCast.errors.txt b/tests/baselines/reference/arrayCast.errors.txt index 10562cc57e4bf..3aebf13982590 100644 --- a/tests/baselines/reference/arrayCast.errors.txt +++ b/tests/baselines/reference/arrayCast.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other. Type '{ foo: string; }' is not assignable to type '{ id: number; }'. - Property 'id' is missing in type '{ foo: string; }'. + Property 'foo' does not exist on type '{ id: number; }'. ==== tests/cases/compiler/arrayCast.ts (1 errors) ==== @@ -10,7 +10,7 @@ tests/cases/compiler/arrayCast.ts(3,1): error TS2352: Neither type '{ foo: strin ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2352: Neither type '{ foo: string; }[]' nor type '{ id: number; }[]' is assignable to the other. !!! error TS2352: Type '{ foo: string; }' is not assignable to type '{ id: number; }'. -!!! error TS2352: Property 'id' is missing in type '{ foo: string; }'. +!!! error TS2352: Property 'foo' does not exist on type '{ id: number; }'. // Should succeed, as the {} element causes the type of the array to be {}[] <{ id: number; }[]>[{ foo: "s" }, {}]; \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiteralTypeInference.errors.txt b/tests/baselines/reference/arrayLiteralTypeInference.errors.txt new file mode 100644 index 0000000000000..4d381b77af91a --- /dev/null +++ b/tests/baselines/reference/arrayLiteralTypeInference.errors.txt @@ -0,0 +1,72 @@ +tests/cases/compiler/arrayLiteralTypeInference.ts(13,5): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type 'Action[]'. + Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type 'Action'. + Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'. + Property 'trueness' does not exist on type 'Action'. +tests/cases/compiler/arrayLiteralTypeInference.ts(29,5): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. + Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. + Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'. + Property 'trueness' does not exist on type '{ id: number; }'. + + +==== tests/cases/compiler/arrayLiteralTypeInference.ts (2 errors) ==== + class Action { + id: number; + } + + class ActionA extends Action { + value: string; + } + + class ActionB extends Action { + trueNess: boolean; + } + + var x1: Action[] = [ + ~~ +!!! error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type 'Action[]'. +!!! error TS2322: Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type 'Action'. +!!! error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'. +!!! error TS2322: Property 'trueness' does not exist on type 'Action'. + { id: 2, trueness: false }, + { id: 3, name: "three" } + ] + + var x2: Action[] = [ + new ActionA(), + new ActionB() + ] + + var x3: Action[] = [ + new Action(), + new ActionA(), + new ActionB() + ] + + var z1: { id: number }[] = + ~~ +!!! error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'. +!!! error TS2322: Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'. +!!! error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'. +!!! error TS2322: Property 'trueness' does not exist on type '{ id: number; }'. + [ + { id: 2, trueness: false }, + { id: 3, name: "three" } + ] + + var z2: { id: number }[] = + [ + new ActionA(), + new ActionB() + ] + + var z3: { id: number }[] = + [ + new Action(), + new ActionA(), + new ActionB() + ] + + + + + \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiteralTypeInference.symbols b/tests/baselines/reference/arrayLiteralTypeInference.symbols deleted file mode 100644 index 005cb57f6c402..0000000000000 --- a/tests/baselines/reference/arrayLiteralTypeInference.symbols +++ /dev/null @@ -1,113 +0,0 @@ -=== tests/cases/compiler/arrayLiteralTypeInference.ts === -class Action { ->Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) - - id: number; ->id : Symbol(id, Decl(arrayLiteralTypeInference.ts, 0, 14)) -} - -class ActionA extends Action { ->ActionA : Symbol(ActionA, Decl(arrayLiteralTypeInference.ts, 2, 1)) ->Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) - - value: string; ->value : Symbol(value, Decl(arrayLiteralTypeInference.ts, 4, 30)) -} - -class ActionB extends Action { ->ActionB : Symbol(ActionB, Decl(arrayLiteralTypeInference.ts, 6, 1)) ->Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) - - trueNess: boolean; ->trueNess : Symbol(trueNess, Decl(arrayLiteralTypeInference.ts, 8, 30)) -} - -var x1: Action[] = [ ->x1 : Symbol(x1, Decl(arrayLiteralTypeInference.ts, 12, 3)) ->Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) - - { id: 2, trueness: false }, ->id : Symbol(id, Decl(arrayLiteralTypeInference.ts, 13, 5)) ->trueness : Symbol(trueness, Decl(arrayLiteralTypeInference.ts, 13, 12)) - - { id: 3, name: "three" } ->id : Symbol(id, Decl(arrayLiteralTypeInference.ts, 14, 5)) ->name : Symbol(name, Decl(arrayLiteralTypeInference.ts, 14, 12)) - -] - -var x2: Action[] = [ ->x2 : Symbol(x2, Decl(arrayLiteralTypeInference.ts, 17, 3)) ->Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) - - new ActionA(), ->ActionA : Symbol(ActionA, Decl(arrayLiteralTypeInference.ts, 2, 1)) - - new ActionB() ->ActionB : Symbol(ActionB, Decl(arrayLiteralTypeInference.ts, 6, 1)) - -] - -var x3: Action[] = [ ->x3 : Symbol(x3, Decl(arrayLiteralTypeInference.ts, 22, 3)) ->Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) - - new Action(), ->Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) - - new ActionA(), ->ActionA : Symbol(ActionA, Decl(arrayLiteralTypeInference.ts, 2, 1)) - - new ActionB() ->ActionB : Symbol(ActionB, Decl(arrayLiteralTypeInference.ts, 6, 1)) - -] - -var z1: { id: number }[] = ->z1 : Symbol(z1, Decl(arrayLiteralTypeInference.ts, 28, 3)) ->id : Symbol(id, Decl(arrayLiteralTypeInference.ts, 28, 9)) - - [ - { id: 2, trueness: false }, ->id : Symbol(id, Decl(arrayLiteralTypeInference.ts, 30, 9)) ->trueness : Symbol(trueness, Decl(arrayLiteralTypeInference.ts, 30, 16)) - - { id: 3, name: "three" } ->id : Symbol(id, Decl(arrayLiteralTypeInference.ts, 31, 9)) ->name : Symbol(name, Decl(arrayLiteralTypeInference.ts, 31, 16)) - - ] - -var z2: { id: number }[] = ->z2 : Symbol(z2, Decl(arrayLiteralTypeInference.ts, 34, 3)) ->id : Symbol(id, Decl(arrayLiteralTypeInference.ts, 34, 9)) - - [ - new ActionA(), ->ActionA : Symbol(ActionA, Decl(arrayLiteralTypeInference.ts, 2, 1)) - - new ActionB() ->ActionB : Symbol(ActionB, Decl(arrayLiteralTypeInference.ts, 6, 1)) - - ] - -var z3: { id: number }[] = ->z3 : Symbol(z3, Decl(arrayLiteralTypeInference.ts, 40, 3)) ->id : Symbol(id, Decl(arrayLiteralTypeInference.ts, 40, 9)) - - [ - new Action(), ->Action : Symbol(Action, Decl(arrayLiteralTypeInference.ts, 0, 0)) - - new ActionA(), ->ActionA : Symbol(ActionA, Decl(arrayLiteralTypeInference.ts, 2, 1)) - - new ActionB() ->ActionB : Symbol(ActionB, Decl(arrayLiteralTypeInference.ts, 6, 1)) - - ] - - - - - diff --git a/tests/baselines/reference/arrayLiteralTypeInference.types b/tests/baselines/reference/arrayLiteralTypeInference.types deleted file mode 100644 index 660592fceb896..0000000000000 --- a/tests/baselines/reference/arrayLiteralTypeInference.types +++ /dev/null @@ -1,144 +0,0 @@ -=== tests/cases/compiler/arrayLiteralTypeInference.ts === -class Action { ->Action : Action - - id: number; ->id : number -} - -class ActionA extends Action { ->ActionA : ActionA ->Action : Action - - value: string; ->value : string -} - -class ActionB extends Action { ->ActionB : ActionB ->Action : Action - - trueNess: boolean; ->trueNess : boolean -} - -var x1: Action[] = [ ->x1 : Action[] ->Action : Action ->[ { id: 2, trueness: false }, { id: 3, name: "three" }] : ({ id: number; trueness: boolean; } | { id: number; name: string; })[] - - { id: 2, trueness: false }, ->{ id: 2, trueness: false } : { id: number; trueness: boolean; } ->id : number ->2 : number ->trueness : boolean ->false : boolean - - { id: 3, name: "three" } ->{ id: 3, name: "three" } : { id: number; name: string; } ->id : number ->3 : number ->name : string ->"three" : string - -] - -var x2: Action[] = [ ->x2 : Action[] ->Action : Action ->[ new ActionA(), new ActionB()] : (ActionA | ActionB)[] - - new ActionA(), ->new ActionA() : ActionA ->ActionA : typeof ActionA - - new ActionB() ->new ActionB() : ActionB ->ActionB : typeof ActionB - -] - -var x3: Action[] = [ ->x3 : Action[] ->Action : Action ->[ new Action(), new ActionA(), new ActionB()] : Action[] - - new Action(), ->new Action() : Action ->Action : typeof Action - - new ActionA(), ->new ActionA() : ActionA ->ActionA : typeof ActionA - - new ActionB() ->new ActionB() : ActionB ->ActionB : typeof ActionB - -] - -var z1: { id: number }[] = ->z1 : { id: number; }[] ->id : number - - [ ->[ { id: 2, trueness: false }, { id: 3, name: "three" } ] : ({ id: number; trueness: boolean; } | { id: number; name: string; })[] - - { id: 2, trueness: false }, ->{ id: 2, trueness: false } : { id: number; trueness: boolean; } ->id : number ->2 : number ->trueness : boolean ->false : boolean - - { id: 3, name: "three" } ->{ id: 3, name: "three" } : { id: number; name: string; } ->id : number ->3 : number ->name : string ->"three" : string - - ] - -var z2: { id: number }[] = ->z2 : { id: number; }[] ->id : number - - [ ->[ new ActionA(), new ActionB() ] : (ActionA | ActionB)[] - - new ActionA(), ->new ActionA() : ActionA ->ActionA : typeof ActionA - - new ActionB() ->new ActionB() : ActionB ->ActionB : typeof ActionB - - ] - -var z3: { id: number }[] = ->z3 : { id: number; }[] ->id : number - - [ ->[ new Action(), new ActionA(), new ActionB() ] : Action[] - - new Action(), ->new Action() : Action ->Action : typeof Action - - new ActionA(), ->new ActionA() : ActionA ->ActionA : typeof ActionA - - new ActionB() ->new ActionB() : ActionB ->ActionB : typeof ActionB - - ] - - - - - diff --git a/tests/baselines/reference/arrayLiterals.errors.txt b/tests/baselines/reference/arrayLiterals.errors.txt new file mode 100644 index 0000000000000..9bae14e36b3a4 --- /dev/null +++ b/tests/baselines/reference/arrayLiterals.errors.txt @@ -0,0 +1,50 @@ +tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts(24,5): error TS2322: Type '({ a: string; b: number; c: string; } | { a: string; b: number; c: number; })[]' is not assignable to type '{ [n: number]: { a: string; b: number; }; }'. + Index signatures are incompatible. + Type '{ a: string; b: number; c: string; } | { a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'. + Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'. + Property 'c' does not exist on type '{ a: string; b: number; }'. + + +==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts (1 errors) ==== + // Empty array literal with no contextual type has type Undefined[] + + var arr1= [[], [1], ['']]; + + var arr2 = [[null], [1], ['']]; + + + // Array literal with elements of only EveryType E has type E[] + var stringArrArr = [[''], [""]]; + + var stringArr = ['', ""]; + + var numberArr = [0, 0.0, 0x00, 1e1]; + + var boolArr = [false, true, false, true]; + + class C { private p; } + var classArr = [new C(), new C()]; + + var classTypeArray = [C, C, C]; + var classTypeArray: Array; // Should OK, not be a parse error + + // Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[] + var context1: { [n: number]: { a: string; b: number; }; } = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; + ~~~~~~~~ +!!! error TS2322: Type '({ a: string; b: number; c: string; } | { a: string; b: number; c: number; })[]' is not assignable to type '{ [n: number]: { a: string; b: number; }; }'. +!!! error TS2322: Index signatures are incompatible. +!!! error TS2322: Type '{ a: string; b: number; c: string; } | { a: string; b: number; c: number; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Type '{ a: string; b: number; c: string; }' is not assignable to type '{ a: string; b: number; }'. +!!! error TS2322: Property 'c' does not exist on type '{ a: string; b: number; }'. + var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; + + // Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[] + class Base { private p; } + class Derived1 extends Base { private m }; + class Derived2 extends Base { private n }; + var context3: Base[] = [new Derived1(), new Derived2()]; + + // Contextual type C with numeric index signature of type Base makes array literal of Derived1 and Derived2 have type Base[] + var context4: Base[] = [new Derived1(), new Derived1()]; + + \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiterals.symbols b/tests/baselines/reference/arrayLiterals.symbols deleted file mode 100644 index b338e7ff6e6c5..0000000000000 --- a/tests/baselines/reference/arrayLiterals.symbols +++ /dev/null @@ -1,94 +0,0 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts === -// Empty array literal with no contextual type has type Undefined[] - -var arr1= [[], [1], ['']]; ->arr1 : Symbol(arr1, Decl(arrayLiterals.ts, 2, 3)) - -var arr2 = [[null], [1], ['']]; ->arr2 : Symbol(arr2, Decl(arrayLiterals.ts, 4, 3)) - - -// Array literal with elements of only EveryType E has type E[] -var stringArrArr = [[''], [""]]; ->stringArrArr : Symbol(stringArrArr, Decl(arrayLiterals.ts, 8, 3)) - -var stringArr = ['', ""]; ->stringArr : Symbol(stringArr, Decl(arrayLiterals.ts, 10, 3)) - -var numberArr = [0, 0.0, 0x00, 1e1]; ->numberArr : Symbol(numberArr, Decl(arrayLiterals.ts, 12, 3)) - -var boolArr = [false, true, false, true]; ->boolArr : Symbol(boolArr, Decl(arrayLiterals.ts, 14, 3)) - -class C { private p; } ->C : Symbol(C, Decl(arrayLiterals.ts, 14, 41)) ->p : Symbol(p, Decl(arrayLiterals.ts, 16, 9)) - -var classArr = [new C(), new C()]; ->classArr : Symbol(classArr, Decl(arrayLiterals.ts, 17, 3)) ->C : Symbol(C, Decl(arrayLiterals.ts, 14, 41)) ->C : Symbol(C, Decl(arrayLiterals.ts, 14, 41)) - -var classTypeArray = [C, C, C]; ->classTypeArray : Symbol(classTypeArray, Decl(arrayLiterals.ts, 19, 3), Decl(arrayLiterals.ts, 20, 3)) ->C : Symbol(C, Decl(arrayLiterals.ts, 14, 41)) ->C : Symbol(C, Decl(arrayLiterals.ts, 14, 41)) ->C : Symbol(C, Decl(arrayLiterals.ts, 14, 41)) - -var classTypeArray: Array; // Should OK, not be a parse error ->classTypeArray : Symbol(classTypeArray, Decl(arrayLiterals.ts, 19, 3), Decl(arrayLiterals.ts, 20, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->C : Symbol(C, Decl(arrayLiterals.ts, 14, 41)) - -// Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[] -var context1: { [n: number]: { a: string; b: number; }; } = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; ->context1 : Symbol(context1, Decl(arrayLiterals.ts, 23, 3)) ->n : Symbol(n, Decl(arrayLiterals.ts, 23, 17)) ->a : Symbol(a, Decl(arrayLiterals.ts, 23, 30)) ->b : Symbol(b, Decl(arrayLiterals.ts, 23, 41)) ->a : Symbol(a, Decl(arrayLiterals.ts, 23, 62)) ->b : Symbol(b, Decl(arrayLiterals.ts, 23, 69)) ->c : Symbol(c, Decl(arrayLiterals.ts, 23, 75)) ->a : Symbol(a, Decl(arrayLiterals.ts, 23, 86)) ->b : Symbol(b, Decl(arrayLiterals.ts, 23, 93)) ->c : Symbol(c, Decl(arrayLiterals.ts, 23, 99)) - -var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; ->context2 : Symbol(context2, Decl(arrayLiterals.ts, 24, 3)) ->a : Symbol(a, Decl(arrayLiterals.ts, 24, 17)) ->b : Symbol(b, Decl(arrayLiterals.ts, 24, 24)) ->c : Symbol(c, Decl(arrayLiterals.ts, 24, 30)) ->a : Symbol(a, Decl(arrayLiterals.ts, 24, 41)) ->b : Symbol(b, Decl(arrayLiterals.ts, 24, 48)) ->c : Symbol(c, Decl(arrayLiterals.ts, 24, 54)) - -// Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[] -class Base { private p; } ->Base : Symbol(Base, Decl(arrayLiterals.ts, 24, 63)) ->p : Symbol(p, Decl(arrayLiterals.ts, 27, 12)) - -class Derived1 extends Base { private m }; ->Derived1 : Symbol(Derived1, Decl(arrayLiterals.ts, 27, 25)) ->Base : Symbol(Base, Decl(arrayLiterals.ts, 24, 63)) ->m : Symbol(m, Decl(arrayLiterals.ts, 28, 29)) - -class Derived2 extends Base { private n }; ->Derived2 : Symbol(Derived2, Decl(arrayLiterals.ts, 28, 42)) ->Base : Symbol(Base, Decl(arrayLiterals.ts, 24, 63)) ->n : Symbol(n, Decl(arrayLiterals.ts, 29, 29)) - -var context3: Base[] = [new Derived1(), new Derived2()]; ->context3 : Symbol(context3, Decl(arrayLiterals.ts, 30, 3)) ->Base : Symbol(Base, Decl(arrayLiterals.ts, 24, 63)) ->Derived1 : Symbol(Derived1, Decl(arrayLiterals.ts, 27, 25)) ->Derived2 : Symbol(Derived2, Decl(arrayLiterals.ts, 28, 42)) - -// Contextual type C with numeric index signature of type Base makes array literal of Derived1 and Derived2 have type Base[] -var context4: Base[] = [new Derived1(), new Derived1()]; ->context4 : Symbol(context4, Decl(arrayLiterals.ts, 33, 3)) ->Base : Symbol(Base, Decl(arrayLiterals.ts, 24, 63)) ->Derived1 : Symbol(Derived1, Decl(arrayLiterals.ts, 27, 25)) ->Derived1 : Symbol(Derived1, Decl(arrayLiterals.ts, 27, 25)) - - diff --git a/tests/baselines/reference/arrayLiterals.types b/tests/baselines/reference/arrayLiterals.types deleted file mode 100644 index e103241dd0b92..0000000000000 --- a/tests/baselines/reference/arrayLiterals.types +++ /dev/null @@ -1,153 +0,0 @@ -=== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals.ts === -// Empty array literal with no contextual type has type Undefined[] - -var arr1= [[], [1], ['']]; ->arr1 : (number[] | string[])[] ->[[], [1], ['']] : (number[] | string[])[] ->[] : undefined[] ->[1] : number[] ->1 : number ->[''] : string[] ->'' : string - -var arr2 = [[null], [1], ['']]; ->arr2 : (number[] | string[])[] ->[[null], [1], ['']] : (number[] | string[])[] ->[null] : null[] ->null : null ->[1] : number[] ->1 : number ->[''] : string[] ->'' : string - - -// Array literal with elements of only EveryType E has type E[] -var stringArrArr = [[''], [""]]; ->stringArrArr : string[][] ->[[''], [""]] : string[][] ->[''] : string[] ->'' : string ->[""] : string[] ->"" : string - -var stringArr = ['', ""]; ->stringArr : string[] ->['', ""] : string[] ->'' : string ->"" : string - -var numberArr = [0, 0.0, 0x00, 1e1]; ->numberArr : number[] ->[0, 0.0, 0x00, 1e1] : number[] ->0 : number ->0.0 : number ->0x00 : number ->1e1 : number - -var boolArr = [false, true, false, true]; ->boolArr : boolean[] ->[false, true, false, true] : boolean[] ->false : boolean ->true : boolean ->false : boolean ->true : boolean - -class C { private p; } ->C : C ->p : any - -var classArr = [new C(), new C()]; ->classArr : C[] ->[new C(), new C()] : C[] ->new C() : C ->C : typeof C ->new C() : C ->C : typeof C - -var classTypeArray = [C, C, C]; ->classTypeArray : typeof C[] ->[C, C, C] : typeof C[] ->C : typeof C ->C : typeof C ->C : typeof C - -var classTypeArray: Array; // Should OK, not be a parse error ->classTypeArray : typeof C[] ->Array : T[] ->C : typeof C - -// Contextual type C with numeric index signature makes array literal of EveryType E of type BCT(E,C)[] -var context1: { [n: number]: { a: string; b: number; }; } = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; ->context1 : { [n: number]: { a: string; b: number; }; } ->n : number ->a : string ->b : number ->[{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }] : ({ a: string; b: number; c: string; } | { a: string; b: number; c: number; })[] ->{ a: '', b: 0, c: '' } : { a: string; b: number; c: string; } ->a : string ->'' : string ->b : number ->0 : number ->c : string ->'' : string ->{ a: "", b: 3, c: 0 } : { a: string; b: number; c: number; } ->a : string ->"" : string ->b : number ->3 : number ->c : number ->0 : number - -var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; ->context2 : ({ a: string; b: number; c: string; } | { a: string; b: number; c: number; })[] ->[{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }] : ({ a: string; b: number; c: string; } | { a: string; b: number; c: number; })[] ->{ a: '', b: 0, c: '' } : { a: string; b: number; c: string; } ->a : string ->'' : string ->b : number ->0 : number ->c : string ->'' : string ->{ a: "", b: 3, c: 0 } : { a: string; b: number; c: number; } ->a : string ->"" : string ->b : number ->3 : number ->c : number ->0 : number - -// Contextual type C with numeric index signature of type Base makes array literal of Derived have type Base[] -class Base { private p; } ->Base : Base ->p : any - -class Derived1 extends Base { private m }; ->Derived1 : Derived1 ->Base : Base ->m : any - -class Derived2 extends Base { private n }; ->Derived2 : Derived2 ->Base : Base ->n : any - -var context3: Base[] = [new Derived1(), new Derived2()]; ->context3 : Base[] ->Base : Base ->[new Derived1(), new Derived2()] : (Derived1 | Derived2)[] ->new Derived1() : Derived1 ->Derived1 : typeof Derived1 ->new Derived2() : Derived2 ->Derived2 : typeof Derived2 - -// Contextual type C with numeric index signature of type Base makes array literal of Derived1 and Derived2 have type Base[] -var context4: Base[] = [new Derived1(), new Derived1()]; ->context4 : Base[] ->Base : Base ->[new Derived1(), new Derived1()] : Derived1[] ->new Derived1() : Derived1 ->Derived1 : typeof Derived1 ->new Derived1() : Derived1 ->Derived1 : typeof Derived1 - - diff --git a/tests/baselines/reference/assignmentCompatBug2.errors.txt b/tests/baselines/reference/assignmentCompatBug2.errors.txt index 15bf111139158..dcccaabca18b4 100644 --- a/tests/baselines/reference/assignmentCompatBug2.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug2.errors.txt @@ -1,7 +1,9 @@ tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. - Property 'b' is missing in type '{ a: number; }'. + Property 'a' does not exist on type '{ b: number; }'. tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. - Property 'b' is missing in type '{ a: number; }'. + Property 'a' does not exist on type '{ b: number; }'. +tests/cases/compiler/assignmentCompatBug2.ts(5,1): error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'. + Property 'a' does not exist on type '{ b: number; }'. tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'. tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'. @@ -10,18 +12,21 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'. -==== tests/cases/compiler/assignmentCompatBug2.ts (5 errors) ==== +==== tests/cases/compiler/assignmentCompatBug2.ts (6 errors) ==== var b2: { b: number;} = { a: 0 }; // error ~~ !!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. -!!! error TS2322: Property 'b' is missing in type '{ a: number; }'. +!!! error TS2322: Property 'a' does not exist on type '{ b: number; }'. b2 = { a: 0 }; // error ~~ !!! error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'. -!!! error TS2322: Property 'b' is missing in type '{ a: number; }'. +!!! error TS2322: Property 'a' does not exist on type '{ b: number; }'. b2 = {b: 0, a: 0 }; + ~~ +!!! error TS2322: Type '{ b: number; a: number; }' is not assignable to type '{ b: number; }'. +!!! error TS2322: Property 'a' does not exist on type '{ b: number; }'. var b3: { f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }; diff --git a/tests/baselines/reference/assignmentCompatBug5.errors.txt b/tests/baselines/reference/assignmentCompatBug5.errors.txt index fd13a07a948c5..200829a869345 100644 --- a/tests/baselines/reference/assignmentCompatBug5.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug5.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/assignmentCompatBug5.ts(2,6): error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. - Property 'a' is missing in type '{ b: number; }'. + Property 'b' does not exist on type '{ a: number; }'. tests/cases/compiler/assignmentCompatBug5.ts(5,6): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'number[]'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/assignmentCompatBug5.ts(8,6): error TS2345: Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. @@ -14,7 +14,7 @@ tests/cases/compiler/assignmentCompatBug5.ts(9,6): error TS2345: Argument of typ foo1({ b: 5 }); ~~~~~~~~ !!! error TS2345: Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. -!!! error TS2345: Property 'a' is missing in type '{ b: number; }'. +!!! error TS2345: Property 'b' does not exist on type '{ a: number; }'. function foo2(x: number[]) { } foo2(["s", "t"]); diff --git a/tests/baselines/reference/contextualTyping17.errors.txt b/tests/baselines/reference/contextualTyping17.errors.txt new file mode 100644 index 0000000000000..e67d5958092b1 --- /dev/null +++ b/tests/baselines/reference/contextualTyping17.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/contextualTyping17.ts(1,33): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. + Property 'name' does not exist on type '{ id: number; }'. + + +==== tests/cases/compiler/contextualTyping17.ts (1 errors) ==== + var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"}; + ~~~ +!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. +!!! error TS2322: Property 'name' does not exist on type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping17.symbols b/tests/baselines/reference/contextualTyping17.symbols deleted file mode 100644 index 55631494105ad..0000000000000 --- a/tests/baselines/reference/contextualTyping17.symbols +++ /dev/null @@ -1,9 +0,0 @@ -=== tests/cases/compiler/contextualTyping17.ts === -var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"}; ->foo : Symbol(foo, Decl(contextualTyping17.ts, 0, 3)) ->id : Symbol(id, Decl(contextualTyping17.ts, 0, 10)) ->id : Symbol(id, Decl(contextualTyping17.ts, 0, 25)) ->foo : Symbol(foo, Decl(contextualTyping17.ts, 0, 3)) ->id : Symbol(id, Decl(contextualTyping17.ts, 0, 39)) ->name : Symbol(name, Decl(contextualTyping17.ts, 0, 45)) - diff --git a/tests/baselines/reference/contextualTyping17.types b/tests/baselines/reference/contextualTyping17.types deleted file mode 100644 index 649bc339ba1e3..0000000000000 --- a/tests/baselines/reference/contextualTyping17.types +++ /dev/null @@ -1,15 +0,0 @@ -=== tests/cases/compiler/contextualTyping17.ts === -var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"}; ->foo : { id: number; } ->id : number ->{id:4} : { id: number; } ->id : number ->4 : number ->foo = {id: 5, name:"foo"} : { id: number; name: string; } ->foo : { id: number; } ->{id: 5, name:"foo"} : { id: number; name: string; } ->id : number ->5 : number ->name : string ->"foo" : string - diff --git a/tests/baselines/reference/contextualTyping2.errors.txt b/tests/baselines/reference/contextualTyping2.errors.txt new file mode 100644 index 0000000000000..cc15a8bbbb1a0 --- /dev/null +++ b/tests/baselines/reference/contextualTyping2.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/contextualTyping2.ts(1,5): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. + Property 'name' does not exist on type '{ id: number; }'. + + +==== tests/cases/compiler/contextualTyping2.ts (1 errors) ==== + var foo: {id:number;} = {id:4, name:"foo"}; + ~~~ +!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. +!!! error TS2322: Property 'name' does not exist on type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping2.symbols b/tests/baselines/reference/contextualTyping2.symbols deleted file mode 100644 index 9c1020929794b..0000000000000 --- a/tests/baselines/reference/contextualTyping2.symbols +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/compiler/contextualTyping2.ts === -var foo: {id:number;} = {id:4, name:"foo"}; ->foo : Symbol(foo, Decl(contextualTyping2.ts, 0, 3)) ->id : Symbol(id, Decl(contextualTyping2.ts, 0, 10)) ->id : Symbol(id, Decl(contextualTyping2.ts, 0, 25)) ->name : Symbol(name, Decl(contextualTyping2.ts, 0, 30)) - diff --git a/tests/baselines/reference/contextualTyping2.types b/tests/baselines/reference/contextualTyping2.types deleted file mode 100644 index 0658247c089ea..0000000000000 --- a/tests/baselines/reference/contextualTyping2.types +++ /dev/null @@ -1,10 +0,0 @@ -=== tests/cases/compiler/contextualTyping2.ts === -var foo: {id:number;} = {id:4, name:"foo"}; ->foo : { id: number; } ->id : number ->{id:4, name:"foo"} : { id: number; name: string; } ->id : number ->4 : number ->name : string ->"foo" : string - diff --git a/tests/baselines/reference/contextualTyping4.errors.txt b/tests/baselines/reference/contextualTyping4.errors.txt new file mode 100644 index 0000000000000..c2079cdf004bf --- /dev/null +++ b/tests/baselines/reference/contextualTyping4.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/contextualTyping4.ts(1,13): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. + Property 'name' does not exist on type '{ id: number; }'. + + +==== tests/cases/compiler/contextualTyping4.ts (1 errors) ==== + class foo { public bar:{id:number;} = {id:5, name:"foo"}; } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'. +!!! error TS2322: Property 'name' does not exist on type '{ id: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping4.symbols b/tests/baselines/reference/contextualTyping4.symbols deleted file mode 100644 index c5dcd4f1577bc..0000000000000 --- a/tests/baselines/reference/contextualTyping4.symbols +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/compiler/contextualTyping4.ts === -class foo { public bar:{id:number;} = {id:5, name:"foo"}; } ->foo : Symbol(foo, Decl(contextualTyping4.ts, 0, 0)) ->bar : Symbol(bar, Decl(contextualTyping4.ts, 0, 11)) ->id : Symbol(id, Decl(contextualTyping4.ts, 0, 24)) ->id : Symbol(id, Decl(contextualTyping4.ts, 0, 39)) ->name : Symbol(name, Decl(contextualTyping4.ts, 0, 44)) - diff --git a/tests/baselines/reference/contextualTyping4.types b/tests/baselines/reference/contextualTyping4.types deleted file mode 100644 index 757c67745f191..0000000000000 --- a/tests/baselines/reference/contextualTyping4.types +++ /dev/null @@ -1,11 +0,0 @@ -=== tests/cases/compiler/contextualTyping4.ts === -class foo { public bar:{id:number;} = {id:5, name:"foo"}; } ->foo : foo ->bar : { id: number; } ->id : number ->{id:5, name:"foo"} : { id: number; name: string; } ->id : number ->5 : number ->name : string ->"foo" : string - diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt new file mode 100644 index 0000000000000..4a43ec56ead10 --- /dev/null +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.errors.txt @@ -0,0 +1,25 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts(14,28): error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; }'. + Property 'b' does not exist on type '{ a: number; }'. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts (1 errors) ==== + class Base { + foo(x: { a: number }): { a: number } { + return null; + } + } + + class Derived extends Base { + foo(x: { a: number; b: number }): { a: number; b: number } { + return null; + } + + bar() { + var r = super.foo({ a: 1 }); // { a: number } + var r2 = super.foo({ a: 1, b: 2 }); // { a: number } + ~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; }'. +!!! error TS2345: Property 'b' does not exist on type '{ a: number; }'. + var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.symbols b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.symbols deleted file mode 100644 index e935d7bf66aa2..0000000000000 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.symbols +++ /dev/null @@ -1,56 +0,0 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts === -class Base { ->Base : Symbol(Base, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 0)) - - foo(x: { a: number }): { a: number } { ->foo : Symbol(foo, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 12)) ->x : Symbol(x, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 1, 8)) ->a : Symbol(a, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 1, 12)) ->a : Symbol(a, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 1, 28)) - - return null; - } -} - -class Derived extends Base { ->Derived : Symbol(Derived, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 4, 1)) ->Base : Symbol(Base, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 0)) - - foo(x: { a: number; b: number }): { a: number; b: number } { ->foo : Symbol(foo, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 6, 28)) ->x : Symbol(x, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 7, 8)) ->a : Symbol(a, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 7, 12)) ->b : Symbol(b, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 7, 23)) ->a : Symbol(a, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 7, 39)) ->b : Symbol(b, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 7, 50)) - - return null; - } - - bar() { ->bar : Symbol(bar, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 9, 5)) - - var r = super.foo({ a: 1 }); // { a: number } ->r : Symbol(r, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 12, 11)) ->super.foo : Symbol(Base.foo, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 12)) ->super : Symbol(Base, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 0)) ->foo : Symbol(Base.foo, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 12)) ->a : Symbol(a, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 12, 27)) - - var r2 = super.foo({ a: 1, b: 2 }); // { a: number } ->r2 : Symbol(r2, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 13, 11)) ->super.foo : Symbol(Base.foo, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 12)) ->super : Symbol(Base, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 0)) ->foo : Symbol(Base.foo, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 0, 12)) ->a : Symbol(a, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 13, 28)) ->b : Symbol(b, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 13, 34)) - - var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } ->r3 : Symbol(r3, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 14, 11)) ->this.foo : Symbol(foo, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 6, 28)) ->this : Symbol(Derived, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 4, 1)) ->foo : Symbol(foo, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 6, 28)) ->a : Symbol(a, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 14, 27)) ->b : Symbol(b, Decl(derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts, 14, 33)) - } -} diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types deleted file mode 100644 index d8d9f657255af..0000000000000 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.types +++ /dev/null @@ -1,69 +0,0 @@ -=== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.ts === -class Base { ->Base : Base - - foo(x: { a: number }): { a: number } { ->foo : (x: { a: number; }) => { a: number; } ->x : { a: number; } ->a : number ->a : number - - return null; ->null : null - } -} - -class Derived extends Base { ->Derived : Derived ->Base : Base - - foo(x: { a: number; b: number }): { a: number; b: number } { ->foo : (x: { a: number; b: number; }) => { a: number; b: number; } ->x : { a: number; b: number; } ->a : number ->b : number ->a : number ->b : number - - return null; ->null : null - } - - bar() { ->bar : () => void - - var r = super.foo({ a: 1 }); // { a: number } ->r : { a: number; } ->super.foo({ a: 1 }) : { a: number; } ->super.foo : (x: { a: number; }) => { a: number; } ->super : Base ->foo : (x: { a: number; }) => { a: number; } ->{ a: 1 } : { a: number; } ->a : number ->1 : number - - var r2 = super.foo({ a: 1, b: 2 }); // { a: number } ->r2 : { a: number; } ->super.foo({ a: 1, b: 2 }) : { a: number; } ->super.foo : (x: { a: number; }) => { a: number; } ->super : Base ->foo : (x: { a: number; }) => { a: number; } ->{ a: 1, b: 2 } : { a: number; b: number; } ->a : number ->1 : number ->b : number ->2 : number - - var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } ->r3 : { a: number; b: number; } ->this.foo({ a: 1, b: 2 }) : { a: number; b: number; } ->this.foo : (x: { a: number; b: number; }) => { a: number; b: number; } ->this : Derived ->foo : (x: { a: number; b: number; }) => { a: number; b: number; } ->{ a: 1, b: 2 } : { a: number; b: number; } ->a : number ->1 : number ->b : number ->2 : number - } -} diff --git a/tests/baselines/reference/destructuringParameterProperties5.errors.txt b/tests/baselines/reference/destructuringParameterProperties5.errors.txt index dca02a9a84e3f..0f83063c936f4 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.errors.txt +++ b/tests/baselines/reference/destructuringParameterProperties5.errors.txt @@ -10,7 +10,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7 tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,16): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'. Types of property '0' are incompatible. Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'. - Property 'x' is missing in type '{ x1: number; x2: string; x3: boolean; }'. + Property 'x1' does not exist on type '{ x: number; y: string; z: boolean; }'. ==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts (10 errors) ==== @@ -47,5 +47,5 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1 !!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'. !!! error TS2345: Types of property '0' are incompatible. !!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'. -!!! error TS2345: Property 'x' is missing in type '{ x1: number; x2: string; x3: boolean; }'. +!!! error TS2345: Property 'x1' does not exist on type '{ x: number; y: string; z: boolean; }'. var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z]; \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index 504ff0088fa6c..9da3b9a8c89e5 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -19,9 +19,9 @@ tests/cases/compiler/incompatibleTypes.ts(42,5): error TS2345: Argument of type Type '() => string' is not assignable to type '(s: string) => number'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/incompatibleTypes.ts(49,5): error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. - Property 'c' is missing in type '{ e: number; f: number; }'. + Property 'e' does not exist on type '{ c: { b: string; }; d: string; }'. tests/cases/compiler/incompatibleTypes.ts(66,5): error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. - Property 'a' is missing in type '{ e: number; f: number; }'. + Property 'e' does not exist on type '{ a: { a: string; }; b: string; }'. tests/cases/compiler/incompatibleTypes.ts(72,5): error TS2322: Type 'number' is not assignable to type '() => string'. tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => number' is not assignable to type '() => any'. @@ -103,7 +103,7 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => of1({ e: 0, f: 0 }); ~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. -!!! error TS2345: Property 'c' is missing in type '{ e: number; f: number; }'. +!!! error TS2345: Property 'e' does not exist on type '{ c: { b: string; }; d: string; }'. interface IMap { [key:string]:string; @@ -123,7 +123,7 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => var o1: { a: { a: string; }; b: string; } = { e: 0, f: 0 }; ~~ !!! error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. -!!! error TS2322: Property 'a' is missing in type '{ e: number; f: number; }'. +!!! error TS2322: Property 'e' does not exist on type '{ a: { a: string; }; b: string; }'. var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; diff --git a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt new file mode 100644 index 0000000000000..cd0497b3bff27 --- /dev/null +++ b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.errors.txt @@ -0,0 +1,16 @@ +tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts(6,5): error TS2322: Type '{ a: string; b: number; } | { a: string; b: boolean; }' is not assignable to type '{ a: string; }'. + Type '{ a: string; b: number; }' is not assignable to type '{ a: string; }'. + Property 'b' does not exist on type '{ a: string; }'. + + +==== tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts (1 errors) ==== + // The || operator permits the operands to be of any type. + // If the || expression is contextually typed, the operands are contextually typed by the + // same type and the result is of the best common type of the contextual type and the two + // operand types. + + var r: { a: string } = { a: '', b: 123 } || { a: '', b: true }; + ~ +!!! error TS2322: Type '{ a: string; b: number; } | { a: string; b: boolean; }' is not assignable to type '{ a: string; }'. +!!! error TS2322: Type '{ a: string; b: number; }' is not assignable to type '{ a: string; }'. +!!! error TS2322: Property 'b' does not exist on type '{ a: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.symbols b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.symbols deleted file mode 100644 index 90fc4ac163ce5..0000000000000 --- a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.symbols +++ /dev/null @@ -1,14 +0,0 @@ -=== tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts === -// The || operator permits the operands to be of any type. -// If the || expression is contextually typed, the operands are contextually typed by the -// same type and the result is of the best common type of the contextual type and the two -// operand types. - -var r: { a: string } = { a: '', b: 123 } || { a: '', b: true }; ->r : Symbol(r, Decl(logicalOrExpressionIsContextuallyTyped.ts, 5, 3)) ->a : Symbol(a, Decl(logicalOrExpressionIsContextuallyTyped.ts, 5, 8)) ->a : Symbol(a, Decl(logicalOrExpressionIsContextuallyTyped.ts, 5, 24)) ->b : Symbol(b, Decl(logicalOrExpressionIsContextuallyTyped.ts, 5, 31)) ->a : Symbol(a, Decl(logicalOrExpressionIsContextuallyTyped.ts, 5, 45)) ->b : Symbol(b, Decl(logicalOrExpressionIsContextuallyTyped.ts, 5, 52)) - diff --git a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.types b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.types deleted file mode 100644 index 52315226bb64c..0000000000000 --- a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.types +++ /dev/null @@ -1,21 +0,0 @@ -=== tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrExpressionIsContextuallyTyped.ts === -// The || operator permits the operands to be of any type. -// If the || expression is contextually typed, the operands are contextually typed by the -// same type and the result is of the best common type of the contextual type and the two -// operand types. - -var r: { a: string } = { a: '', b: 123 } || { a: '', b: true }; ->r : { a: string; } ->a : string ->{ a: '', b: 123 } || { a: '', b: true } : { a: string; b: number; } | { a: string; b: boolean; } ->{ a: '', b: 123 } : { a: string; b: number; } ->a : string ->'' : string ->b : number ->123 : number ->{ a: '', b: true } : { a: string; b: boolean; } ->a : string ->'' : string ->b : boolean ->true : boolean - diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt index 0b218d3227b81..e263b971561f5 100644 --- a/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt +++ b/tests/baselines/reference/objectLitStructuralTypeMismatch.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'. - Property 'a' is missing in type '{ b: number; }'. + Property 'b' does not exist on type '{ a: number; }'. ==== tests/cases/compiler/objectLitStructuralTypeMismatch.ts (1 errors) ==== @@ -7,4 +7,4 @@ tests/cases/compiler/objectLitStructuralTypeMismatch.ts(2,5): error TS2322: Type var x: { a: number; } = { b: 5 }; ~ !!! error TS2322: Type '{ b: number; }' is not assignable to type '{ a: number; }'. -!!! error TS2322: Property 'a' is missing in type '{ b: number; }'. \ No newline at end of file +!!! error TS2322: Property 'b' does not exist on type '{ a: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt index f031031b0a8e2..c4b05fe9c49e3 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt @@ -1,5 +1,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(8,4): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. - Property 'value' is missing in type '{ hello: number; }'. + Property 'hello' does not exist on type 'I'. +tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(10,4): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I'. + Property 'what' does not exist on type 'I'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(11,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. Property 'value' is missing in type '{ toString: (s: string) => string; }'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(12,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. @@ -7,7 +9,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(12,4): error TS tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(13,36): error TS2339: Property 'uhhh' does not exist on type 'string'. -==== tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts (4 errors) ==== +==== tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts (5 errors) ==== interface I { value: string; toString: (t: string) => string; @@ -18,9 +20,12 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping.ts(13,36): error T f2({ hello: 1 }) // error ~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. -!!! error TS2345: Property 'value' is missing in type '{ hello: number; }'. +!!! error TS2345: Property 'hello' does not exist on type 'I'. f2({ value: '' }) // missing toString satisfied by Object's member f2({ value: '', what: 1 }) // missing toString satisfied by Object's member + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Property 'what' does not exist on type 'I'. f2({ toString: (s) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt index 7cb3304aa2fd8..6fdf156cadca3 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(8,4): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. - Property 'value' is missing in type '{ hello: number; }'. + Property 'hello' does not exist on type 'I2'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(9,4): error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. Property 'doStuff' is missing in type '{ value: string; }'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(10,4): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. - Property 'doStuff' is missing in type '{ value: string; what: number; }'. + Property 'what' does not exist on type 'I2'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(11,4): error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. Property 'value' is missing in type '{ toString: (s: any) => any; }'. tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(12,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'. @@ -23,7 +23,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error T f2({ hello: 1 }) ~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. -!!! error TS2345: Property 'value' is missing in type '{ hello: number; }'. +!!! error TS2345: Property 'hello' does not exist on type 'I2'. f2({ value: '' }) ~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. @@ -31,7 +31,7 @@ tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,4): error T f2({ value: '', what: 1 }) ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. -!!! error TS2345: Property 'doStuff' is missing in type '{ value: string; what: number; }'. +!!! error TS2345: Property 'what' does not exist on type 'I2'. f2({ toString: (s) => s }) ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt index f12e29f511720..36379f6e058fa 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. - Property 'b' is missing in type '{ name: string; id: number; }'. + Property 'name' does not exist on type '{ b: string; id: number; }'. tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,16): error TS1131: Property or signature expected. tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'id' must be of type 'number', but here has type 'any'. tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentError.ts(5,25): error TS1128: Declaration or statement expected. @@ -18,7 +18,7 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr var person: { b: string; id: number } = { name, id }; // error ~~~~~~ !!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. -!!! error TS2322: Property 'b' is missing in type '{ name: string; id: number; }'. +!!! error TS2322: Property 'name' does not exist on type '{ b: string; id: number; }'. var person1: { name, id }; // error: can't use short-hand property assignment in type position ~~~~ !!! error TS1131: Property or signature expected. diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt index 26b0224f2b037..32f7733a22d74 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(4,5): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. - Property 'b' is missing in type '{ name: string; id: number; }'. + Property 'name' does not exist on type '{ b: string; id: number; }'. tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.ts(5,79): error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ name: number; id: string; }'. Types of property 'name' are incompatible. Type 'string' is not assignable to type 'number'. @@ -18,7 +18,7 @@ tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPr var person: { b: string; id: number } = { name, id }; // error ~~~~~~ !!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ b: string; id: number; }'. -!!! error TS2322: Property 'b' is missing in type '{ name: string; id: number; }'. +!!! error TS2322: Property 'name' does not exist on type '{ b: string; id: number; }'. function bar(name: string, id: number): { name: number, id: string } { return { name, id }; } // error ~~~~~~~~~~~~ !!! error TS2322: Type '{ name: string; id: number; }' is not assignable to type '{ name: number; id: string; }'. diff --git a/tests/baselines/reference/switchStatements.errors.txt b/tests/baselines/reference/switchStatements.errors.txt new file mode 100644 index 0000000000000..09a799cc5cb03 --- /dev/null +++ b/tests/baselines/reference/switchStatements.errors.txt @@ -0,0 +1,63 @@ +tests/cases/conformance/statements/switchStatements/switchStatements.ts(35,10): error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'C'. + Property 'name' does not exist on type 'C'. + + +==== tests/cases/conformance/statements/switchStatements/switchStatements.ts (1 errors) ==== + module M { + export function fn(x: number) { + return ''; + } + } + + var x: any; + switch (x) { + case '': + case 12: + case true: + case null: + case undefined: + case new Date(12): + case new Object(): + case /[a-z]/: + case[]: + case {}: + case { id: 12 }: + case['a']: + case typeof x: + case typeof M: + case M.fn(1): + case (x: number) => '': + case ((x: number) => '')(2): + default: + } + + // basic assignable check, rest covered in tests for 'assignement compatibility' + class C { id: number; } + class D extends C { name: string } + + switch (new C()) { + case new D(): + case { id: 12, name: '' }: + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'C'. +!!! error TS2322: Property 'name' does not exist on type 'C'. + case new C(): + } + + switch ('') { } + switch (12) { } + switch (true) { } + switch (null) { } + switch (undefined) { } + switch (new Date(12)) { } + switch (new Object()) { } + switch (/[a-z]/) { } + switch ([]) { } + switch ({}) { } + switch ({ id: 12 }) { } + switch (['a']) { } + switch ((x: number) => '') { } + switch (((x: T) => '')(1)) { } + + + \ No newline at end of file diff --git a/tests/baselines/reference/switchStatements.symbols b/tests/baselines/reference/switchStatements.symbols deleted file mode 100644 index fc8f076a12ccc..0000000000000 --- a/tests/baselines/reference/switchStatements.symbols +++ /dev/null @@ -1,115 +0,0 @@ -=== tests/cases/conformance/statements/switchStatements/switchStatements.ts === -module M { ->M : Symbol(M, Decl(switchStatements.ts, 0, 0)) - - export function fn(x: number) { ->fn : Symbol(fn, Decl(switchStatements.ts, 0, 10)) ->x : Symbol(x, Decl(switchStatements.ts, 1, 23)) - - return ''; - } -} - -var x: any; ->x : Symbol(x, Decl(switchStatements.ts, 6, 3)) - -switch (x) { ->x : Symbol(x, Decl(switchStatements.ts, 6, 3)) - - case '': - case 12: - case true: - case null: - case undefined: ->undefined : Symbol(undefined) - - case new Date(12): ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) - - case new Object(): ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) - - case /[a-z]/: - case[]: - case {}: - case { id: 12 }: ->id : Symbol(id, Decl(switchStatements.ts, 18, 10)) - - case['a']: - case typeof x: ->x : Symbol(x, Decl(switchStatements.ts, 6, 3)) - - case typeof M: ->M : Symbol(M, Decl(switchStatements.ts, 0, 0)) - - case M.fn(1): ->M.fn : Symbol(M.fn, Decl(switchStatements.ts, 0, 10)) ->M : Symbol(M, Decl(switchStatements.ts, 0, 0)) ->fn : Symbol(M.fn, Decl(switchStatements.ts, 0, 10)) - - case (x: number) => '': ->T : Symbol(T, Decl(switchStatements.ts, 23, 10)) ->x : Symbol(x, Decl(switchStatements.ts, 23, 13)) - - case ((x: number) => '')(2): ->T : Symbol(T, Decl(switchStatements.ts, 24, 11)) ->x : Symbol(x, Decl(switchStatements.ts, 24, 14)) - - default: -} - -// basic assignable check, rest covered in tests for 'assignement compatibility' -class C { id: number; } ->C : Symbol(C, Decl(switchStatements.ts, 26, 1)) ->id : Symbol(id, Decl(switchStatements.ts, 29, 9)) - -class D extends C { name: string } ->D : Symbol(D, Decl(switchStatements.ts, 29, 23)) ->C : Symbol(C, Decl(switchStatements.ts, 26, 1)) ->name : Symbol(name, Decl(switchStatements.ts, 30, 19)) - -switch (new C()) { ->C : Symbol(C, Decl(switchStatements.ts, 26, 1)) - - case new D(): ->D : Symbol(D, Decl(switchStatements.ts, 29, 23)) - - case { id: 12, name: '' }: ->id : Symbol(id, Decl(switchStatements.ts, 34, 10)) ->name : Symbol(name, Decl(switchStatements.ts, 34, 18)) - - case new C(): ->C : Symbol(C, Decl(switchStatements.ts, 26, 1)) -} - -switch ('') { } -switch (12) { } -switch (true) { } -switch (null) { } -switch (undefined) { } ->undefined : Symbol(undefined) - -switch (new Date(12)) { } ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) - -switch (new Object()) { } ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) - -switch (/[a-z]/) { } -switch ([]) { } -switch ({}) { } -switch ({ id: 12 }) { } ->id : Symbol(id, Decl(switchStatements.ts, 48, 9)) - -switch (['a']) { } -switch ((x: number) => '') { } ->T : Symbol(T, Decl(switchStatements.ts, 50, 9)) ->x : Symbol(x, Decl(switchStatements.ts, 50, 12)) - -switch (((x: T) => '')(1)) { } ->T : Symbol(T, Decl(switchStatements.ts, 51, 10)) ->x : Symbol(x, Decl(switchStatements.ts, 51, 13)) ->T : Symbol(T, Decl(switchStatements.ts, 51, 10)) - - - diff --git a/tests/baselines/reference/switchStatements.types b/tests/baselines/reference/switchStatements.types deleted file mode 100644 index a5679547c1292..0000000000000 --- a/tests/baselines/reference/switchStatements.types +++ /dev/null @@ -1,184 +0,0 @@ -=== tests/cases/conformance/statements/switchStatements/switchStatements.ts === -module M { ->M : typeof M - - export function fn(x: number) { ->fn : (x: number) => string ->x : number - - return ''; ->'' : string - } -} - -var x: any; ->x : any - -switch (x) { ->x : any - - case '': ->'' : string - - case 12: ->12 : number - - case true: ->true : boolean - - case null: ->null : null - - case undefined: ->undefined : undefined - - case new Date(12): ->new Date(12) : Date ->Date : DateConstructor ->12 : number - - case new Object(): ->new Object() : Object ->Object : ObjectConstructor - - case /[a-z]/: ->/[a-z]/ : RegExp - - case[]: ->[] : undefined[] - - case {}: ->{} : {} - - case { id: 12 }: ->{ id: 12 } : { id: number; } ->id : number ->12 : number - - case['a']: ->['a'] : string[] ->'a' : string - - case typeof x: ->typeof x : string ->x : any - - case typeof M: ->typeof M : string ->M : typeof M - - case M.fn(1): ->M.fn(1) : string ->M.fn : (x: number) => string ->M : typeof M ->fn : (x: number) => string ->1 : number - - case (x: number) => '': ->(x: number) => '' : (x: number) => string ->T : T ->x : number ->'' : string - - case ((x: number) => '')(2): ->((x: number) => '')(2) : string ->((x: number) => '') : (x: number) => string ->(x: number) => '' : (x: number) => string ->T : T ->x : number ->'' : string ->2 : number - - default: -} - -// basic assignable check, rest covered in tests for 'assignement compatibility' -class C { id: number; } ->C : C ->id : number - -class D extends C { name: string } ->D : D ->C : C ->name : string - -switch (new C()) { ->new C() : C ->C : typeof C - - case new D(): ->new D() : D ->D : typeof D - - case { id: 12, name: '' }: ->{ id: 12, name: '' } : { id: number; name: string; } ->id : number ->12 : number ->name : string ->'' : string - - case new C(): ->new C() : C ->C : typeof C -} - -switch ('') { } ->'' : string - -switch (12) { } ->12 : number - -switch (true) { } ->true : boolean - -switch (null) { } ->null : null - -switch (undefined) { } ->undefined : undefined - -switch (new Date(12)) { } ->new Date(12) : Date ->Date : DateConstructor ->12 : number - -switch (new Object()) { } ->new Object() : Object ->Object : ObjectConstructor - -switch (/[a-z]/) { } ->/[a-z]/ : RegExp - -switch ([]) { } ->[] : undefined[] - -switch ({}) { } ->{} : {} - -switch ({ id: 12 }) { } ->{ id: 12 } : { id: number; } ->id : number ->12 : number - -switch (['a']) { } ->['a'] : string[] ->'a' : string - -switch ((x: number) => '') { } ->(x: number) => '' : (x: number) => string ->T : T ->x : number ->'' : string - -switch (((x: T) => '')(1)) { } ->((x: T) => '')(1) : string ->((x: T) => '') : (x: T) => string ->(x: T) => '' : (x: T) => string ->T : T ->x : T ->T : T ->'' : string ->1 : number - - - diff --git a/tests/baselines/reference/symbolProperty21.errors.txt b/tests/baselines/reference/symbolProperty21.errors.txt new file mode 100644 index 0000000000000..5bc0e20f75f08 --- /dev/null +++ b/tests/baselines/reference/symbolProperty21.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/es6/Symbols/symbolProperty21.ts(8,5): error TS2345: Argument of type '{ [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; }' is not assignable to parameter of type 'I'. + Property '[Symbol.toPrimitive]' does not exist on type 'I'. + + +==== tests/cases/conformance/es6/Symbols/symbolProperty21.ts (1 errors) ==== + interface I { + [Symbol.unscopables]: T; + [Symbol.isConcatSpreadable]: U; + } + + declare function foo(p: I): { t: T; u: U }; + + foo({ + ~ + [Symbol.isConcatSpreadable]: "", + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + [Symbol.toPrimitive]: 0, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + [Symbol.unscopables]: true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + }); + ~ +!!! error TS2345: Argument of type '{ [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; }' is not assignable to parameter of type 'I'. +!!! error TS2345: Property '[Symbol.toPrimitive]' does not exist on type 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/symbolProperty21.symbols b/tests/baselines/reference/symbolProperty21.symbols deleted file mode 100644 index 09997f687d53f..0000000000000 --- a/tests/baselines/reference/symbolProperty21.symbols +++ /dev/null @@ -1,51 +0,0 @@ -=== tests/cases/conformance/es6/Symbols/symbolProperty21.ts === -interface I { ->I : Symbol(I, Decl(symbolProperty21.ts, 0, 0)) ->T : Symbol(T, Decl(symbolProperty21.ts, 0, 12)) ->U : Symbol(U, Decl(symbolProperty21.ts, 0, 14)) - - [Symbol.unscopables]: T; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) ->T : Symbol(T, Decl(symbolProperty21.ts, 0, 12)) - - [Symbol.isConcatSpreadable]: U; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) ->U : Symbol(U, Decl(symbolProperty21.ts, 0, 14)) -} - -declare function foo(p: I): { t: T; u: U }; ->foo : Symbol(foo, Decl(symbolProperty21.ts, 3, 1)) ->T : Symbol(T, Decl(symbolProperty21.ts, 5, 21)) ->U : Symbol(U, Decl(symbolProperty21.ts, 5, 23)) ->p : Symbol(p, Decl(symbolProperty21.ts, 5, 27)) ->I : Symbol(I, Decl(symbolProperty21.ts, 0, 0)) ->T : Symbol(T, Decl(symbolProperty21.ts, 5, 21)) ->U : Symbol(U, Decl(symbolProperty21.ts, 5, 23)) ->t : Symbol(t, Decl(symbolProperty21.ts, 5, 41)) ->T : Symbol(T, Decl(symbolProperty21.ts, 5, 21)) ->u : Symbol(u, Decl(symbolProperty21.ts, 5, 47)) ->U : Symbol(U, Decl(symbolProperty21.ts, 5, 23)) - -foo({ ->foo : Symbol(foo, Decl(symbolProperty21.ts, 3, 1)) - - [Symbol.isConcatSpreadable]: "", ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 1243, 24)) - - [Symbol.toPrimitive]: 0, ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 1285, 18)) - - [Symbol.unscopables]: true ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 1199, 52), Decl(lib.d.ts, 1305, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 1297, 24)) - -}); diff --git a/tests/baselines/reference/symbolProperty21.types b/tests/baselines/reference/symbolProperty21.types deleted file mode 100644 index e2cda0a896f03..0000000000000 --- a/tests/baselines/reference/symbolProperty21.types +++ /dev/null @@ -1,56 +0,0 @@ -=== tests/cases/conformance/es6/Symbols/symbolProperty21.ts === -interface I { ->I : I ->T : T ->U : U - - [Symbol.unscopables]: T; ->Symbol.unscopables : symbol ->Symbol : SymbolConstructor ->unscopables : symbol ->T : T - - [Symbol.isConcatSpreadable]: U; ->Symbol.isConcatSpreadable : symbol ->Symbol : SymbolConstructor ->isConcatSpreadable : symbol ->U : U -} - -declare function foo(p: I): { t: T; u: U }; ->foo : (p: I) => { t: T; u: U; } ->T : T ->U : U ->p : I ->I : I ->T : T ->U : U ->t : T ->T : T ->u : U ->U : U - -foo({ ->foo({ [Symbol.isConcatSpreadable]: "", [Symbol.toPrimitive]: 0, [Symbol.unscopables]: true}) : { t: boolean; u: string; } ->foo : (p: I) => { t: T; u: U; } ->{ [Symbol.isConcatSpreadable]: "", [Symbol.toPrimitive]: 0, [Symbol.unscopables]: true} : { [Symbol.isConcatSpreadable]: string; [Symbol.toPrimitive]: number; [Symbol.unscopables]: boolean; } - - [Symbol.isConcatSpreadable]: "", ->Symbol.isConcatSpreadable : symbol ->Symbol : SymbolConstructor ->isConcatSpreadable : symbol ->"" : string - - [Symbol.toPrimitive]: 0, ->Symbol.toPrimitive : symbol ->Symbol : SymbolConstructor ->toPrimitive : symbol ->0 : number - - [Symbol.unscopables]: true ->Symbol.unscopables : symbol ->Symbol : SymbolConstructor ->unscopables : symbol ->true : boolean - -}); diff --git a/tests/baselines/reference/tsxAttributeResolution9.symbols b/tests/baselines/reference/tsxAttributeResolution9.symbols deleted file mode 100644 index 081482d5d47a4..0000000000000 --- a/tests/baselines/reference/tsxAttributeResolution9.symbols +++ /dev/null @@ -1,47 +0,0 @@ -=== tests/cases/conformance/jsx/react.d.ts === - -declare module JSX { ->JSX : Symbol(JSX, Decl(react.d.ts, 0, 0)) - - interface Element { } ->Element : Symbol(Element, Decl(react.d.ts, 1, 20)) - - interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(react.d.ts, 2, 22)) - } - interface ElementAttributesProperty { ->ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(react.d.ts, 4, 2)) - - props; ->props : Symbol(props, Decl(react.d.ts, 5, 38)) - } -} - -interface Props { ->Props : Symbol(Props, Decl(react.d.ts, 8, 1)) - - foo: string; ->foo : Symbol(foo, Decl(react.d.ts, 10, 17)) -} - -=== tests/cases/conformance/jsx/file.tsx === -export class MyComponent { ->MyComponent : Symbol(MyComponent, Decl(file.tsx, 0, 0)) - - render() { ->render : Symbol(render, Decl(file.tsx, 0, 26)) - } - - props: { foo: string; } ->props : Symbol(props, Decl(file.tsx, 2, 3)) ->foo : Symbol(foo, Decl(file.tsx, 4, 10)) -} - -; // ok ->MyComponent : Symbol(MyComponent, Decl(file.tsx, 0, 0)) ->foo : Symbol(unknown) - -; // should be an error ->MyComponent : Symbol(MyComponent, Decl(file.tsx, 0, 0)) ->foo : Symbol(unknown) - diff --git a/tests/baselines/reference/tsxAttributeResolution9.types b/tests/baselines/reference/tsxAttributeResolution9.types deleted file mode 100644 index 1b2c6d423896a..0000000000000 --- a/tests/baselines/reference/tsxAttributeResolution9.types +++ /dev/null @@ -1,49 +0,0 @@ -=== tests/cases/conformance/jsx/react.d.ts === - -declare module JSX { ->JSX : any - - interface Element { } ->Element : Element - - interface IntrinsicElements { ->IntrinsicElements : IntrinsicElements - } - interface ElementAttributesProperty { ->ElementAttributesProperty : ElementAttributesProperty - - props; ->props : any - } -} - -interface Props { ->Props : Props - - foo: string; ->foo : string -} - -=== tests/cases/conformance/jsx/file.tsx === -export class MyComponent { ->MyComponent : MyComponent - - render() { ->render : () => void - } - - props: { foo: string; } ->props : { foo: string; } ->foo : string -} - -; // ok -> : JSX.Element ->MyComponent : typeof MyComponent ->foo : any - -; // should be an error -> : JSX.Element ->MyComponent : typeof MyComponent ->foo : any - diff --git a/tests/baselines/reference/typeArgumentInference.errors.txt b/tests/baselines/reference/typeArgumentInference.errors.txt index 126fe3d772fe7..42b4593b7e1c3 100644 --- a/tests/baselines/reference/typeArgumentInference.errors.txt +++ b/tests/baselines/reference/typeArgumentInference.errors.txt @@ -3,9 +3,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,11 tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. Property 'z' is missing in type '{ x: number; y: string; }'. +tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,66): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. + Property 'y' does not exist on type 'A92'. -==== tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts (2 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts (3 errors) ==== // Generic call with no parameters function noParams() { } noParams(); @@ -97,6 +99,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11 !!! error TS2453: Property 'z' is missing in type '{ x: number; y: string; }'. var a9e: {}; var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); + ~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. +!!! error TS2345: Property 'y' does not exist on type 'A92'. var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index c82dab89e945e..6443b55d94b55 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -17,9 +17,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct Property 'z' is missing in type '{ x: number; y: string; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,51): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,56): error TS2304: Cannot find name 'window'. +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,66): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. + Property 'y' does not exist on type 'A92'. -==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts (10 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts (11 errors) ==== // Generic call with no parameters interface NoParams { new (); @@ -171,6 +173,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~~~~~~ !!! error TS2304: Cannot find name 'window'. + ~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. +!!! error TS2345: Property 'y' does not exist on type 'A92'. var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt index 56370ac03d58a..3a6ae294ea30b 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt @@ -22,9 +22,11 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst Property 'z' is missing in type '{ x: number; y: string; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,47): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,52): error TS2304: Cannot find name 'window'. +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,62): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. + Property 'y' does not exist on type 'A92'. -==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts (15 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts (16 errors) ==== // Generic call with no parameters function noParams() { } noParams(); @@ -153,6 +155,9 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst var a9f = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~~~~~~ !!! error TS2304: Cannot find name 'window'. + ~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. +!!! error TS2345: Property 'y' does not exist on type 'A92'. var a9f: A92; // Generic call with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeInfer1.errors.txt b/tests/baselines/reference/typeInfer1.errors.txt index cce736e253151..e7653ecd3a592 100644 --- a/tests/baselines/reference/typeInfer1.errors.txt +++ b/tests/baselines/reference/typeInfer1.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/typeInfer1.ts(11,5): error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. - Property 'Write' is missing in type '{ Moo: () => string; }'. + Property 'Moo' does not exist on type 'ITextWriter2'. ==== tests/cases/compiler/typeInfer1.ts (1 errors) ==== @@ -16,6 +16,6 @@ tests/cases/compiler/typeInfer1.ts(11,5): error TS2322: Type '{ Moo: () => strin var yyyyyyyy: ITextWriter2 = { ~~~~~~~~ !!! error TS2322: Type '{ Moo: () => string; }' is not assignable to type 'ITextWriter2'. -!!! error TS2322: Property 'Write' is missing in type '{ Moo: () => string; }'. +!!! error TS2322: Property 'Moo' does not exist on type 'ITextWriter2'. Moo: function() { return "cow"; } } \ No newline at end of file diff --git a/tests/baselines/reference/typeMatch2.errors.txt b/tests/baselines/reference/typeMatch2.errors.txt index 4db4828064e75..847cfbaf40787 100644 --- a/tests/baselines/reference/typeMatch2.errors.txt +++ b/tests/baselines/reference/typeMatch2.errors.txt @@ -2,8 +2,10 @@ tests/cases/compiler/typeMatch2.ts(3,2): error TS2322: Type '{}' is not assignab Property 'x' is missing in type '{}'. tests/cases/compiler/typeMatch2.ts(4,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. Property 'y' is missing in type '{ x: number; }'. +tests/cases/compiler/typeMatch2.ts(5,2): error TS2322: Type '{ x: number; y: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. + Property 'z' does not exist on type '{ x: number; y: number; }'. tests/cases/compiler/typeMatch2.ts(6,5): error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. - Property 'y' is missing in type '{ x: number; z: number; }'. + Property 'z' does not exist on type '{ x: number; y: number; }'. tests/cases/compiler/typeMatch2.ts(18,5): error TS2322: Type 'Animal[]' is not assignable to type 'Giraffe[]'. Type 'Animal' is not assignable to type 'Giraffe'. Property 'g' is missing in type 'Animal'. @@ -11,11 +13,13 @@ tests/cases/compiler/typeMatch2.ts(22,5): error TS2322: Type '{ f1: number; f2: Types of property 'f2' are incompatible. Type 'Animal[]' is not assignable to type 'Giraffe[]'. Type 'Animal' is not assignable to type 'Giraffe'. +tests/cases/compiler/typeMatch2.ts(34,5): error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'. + Property 'z' does not exist on type '{ x: number; y: number; }'. tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. Property 'y' is missing in type '{ x: number; }'. -==== tests/cases/compiler/typeMatch2.ts (6 errors) ==== +==== tests/cases/compiler/typeMatch2.ts (8 errors) ==== function f1() { var a = { x: 1, y: 2 }; a = {}; // error @@ -27,10 +31,13 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is !!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. !!! error TS2322: Property 'y' is missing in type '{ x: number; }'. a = { x: 1, y: 2, z: 3 }; + ~ +!!! error TS2322: Type '{ x: number; y: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Property 'z' does not exist on type '{ x: number; y: number; }'. a = { x: 1, z: 3 }; // error ~ !!! error TS2322: Type '{ x: number; z: number; }' is not assignable to type '{ x: number; y: number; }'. -!!! error TS2322: Property 'y' is missing in type '{ x: number; z: number; }'. +!!! error TS2322: Property 'z' does not exist on type '{ x: number; y: number; }'. } class Animal { private a; } @@ -68,6 +75,9 @@ tests/cases/compiler/typeMatch2.ts(35,5): error TS2322: Type '{ x: number; }' is a = { x: 1, y: undefined }; a = { x: 1, y: _any }; a = { x: 1, y: _any, z:1 }; + ~ +!!! error TS2322: Type '{ x: number; y: any; z: number; }' is not assignable to type '{ x: number; y: number; }'. +!!! error TS2322: Property 'z' does not exist on type '{ x: number; y: number; }'. a = { x: 1 }; // error ~ !!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: number; y: number; }'. From f57991ef8deb45b31c951010c85141bf8a292950 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 11 Jul 2015 09:35:36 -0700 Subject: [PATCH 04/22] Support union and intersection types in checks --- src/compiler/checker.ts | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2dd7b0fc2e646..a9b39162b812e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3352,6 +3352,25 @@ namespace ts { return undefined; } + function isKnownProperty(type: Type, name: string): boolean { + if (type.flags & TypeFlags.ObjectType) { + var resolved = resolveStructuredTypeMembers(type); + return !!(resolved.properties.length === 0 || + resolved.stringIndexType || + resolved.numberIndexType || + getPropertyOfType(type, name)); + } + if (type.flags & TypeFlags.UnionOrIntersection) { + for (let t of (type).types) { + if (isKnownProperty(t, name)) { + return true; + } + } + return false; + } + return true; + } + function getSignaturesOfStructuredType(type: Type, kind: SignatureKind): Signature[] { if (type.flags & TypeFlags.StructuredType) { let resolved = resolveStructuredTypeMembers(type); @@ -4601,20 +4620,14 @@ namespace ts { } function hasExcessProperties(source: ObjectType, target: Type, reportErrors: boolean): boolean { - if (target.flags & TypeFlags.ObjectType) { - var resolved = resolveStructuredTypeMembers(target); - if (resolved.properties.length > 0 && !resolved.stringIndexType && !resolved.numberIndexType) { - for (let prop of getPropertiesOfObjectType(source)) { - if (!getPropertyOfType(target, prop.name)) { - if (reportErrors) { - reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); - } - return true; - } + for (let prop of getPropertiesOfObjectType(source)) { + if (!isKnownProperty(target, prop.name)) { + if (reportErrors) { + reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); } + return true; } } - return false; } function eachTypeRelatedToSomeType(source: UnionOrIntersectionType, target: UnionOrIntersectionType): Ternary { From aa269800c004f1a77f5aa86a5dea8a1093a9465a Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 13 Jul 2015 10:20:16 -0700 Subject: [PATCH 05/22] Addressing CR feedback --- src/compiler/checker.ts | 14 +++++++++++--- src/compiler/types.ts | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a9b39162b812e..ca765e387687a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3352,6 +3352,10 @@ namespace ts { return undefined; } + // Check if a property with the given name is known anywhere in the given type. In an object + // type, a property is considered known if the object type is empty, if it has any index + // signatures, or if the property is actually declared in the type. In a union or intersection + // type, a property is considered known if it is known in any constituent type. function isKnownProperty(type: Type, name: string): boolean { if (type.flags & TypeFlags.ObjectType) { var resolved = resolveStructuredTypeMembers(type); @@ -4526,13 +4530,17 @@ namespace ts { } } - if (relation === assignableRelation && source.flags & TypeFlags.ObjectLiteral && source.flags & TypeFlags.FreshObjectLiteral) { - if (hasExcessProperties(source, target, reportErrors)) { + if (relation !== identityRelation && source.flags & TypeFlags.FreshObjectLiteral) { + if (hasExcessProperties(source, target, reportErrors)) { if (reportErrors) { reportRelationError(headMessage, source, target); } return Ternary.False; } + // Above we check for excess properties with respect to the entire target type. When union + // and intersection types are further deconstructed on the target side, we don't want to + // make the check again (as it might fail for a partial target type). Therefore we obtain + // the regular source type and proceed with that. source = getRegularTypeOfObjectLiteral(source); } @@ -4619,7 +4627,7 @@ namespace ts { return Ternary.False; } - function hasExcessProperties(source: ObjectType, target: Type, reportErrors: boolean): boolean { + function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: boolean): boolean { for (let prop of getPropertiesOfObjectType(source)) { if (!isKnownProperty(target, prop.name)) { if (reportErrors) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d23f2f69bf9bc..45b9699c117c9 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1842,6 +1842,9 @@ namespace ts { } /* @internal */ + // Object literals are initially marked fresh. Freshness disappears following an assignment, + // before a type assertion, or when when an object literal's type is widened. The regular + // version of a fresh type is identical except for the TypeFlags.FreshObjectLiteral flag. export interface FreshObjectLiteralType extends ResolvedType { regularType: ResolvedType; // Regular version of fresh type } From d78fa183a31c9d1462e68478a6c74e4767c66211 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 13 Jul 2015 11:15:10 -0700 Subject: [PATCH 06/22] Ignore freshness in subtype reduction / Treat Object as {} --- src/compiler/checker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ca765e387687a..593277428ecfb 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3357,7 +3357,7 @@ namespace ts { // signatures, or if the property is actually declared in the type. In a union or intersection // type, a property is considered known if it is known in any constituent type. function isKnownProperty(type: Type, name: string): boolean { - if (type.flags & TypeFlags.ObjectType) { + if (type.flags & TypeFlags.ObjectType && type !== globalObjectType) { var resolved = resolveStructuredTypeMembers(type); return !!(resolved.properties.length === 0 || resolved.stringIndexType || @@ -3977,7 +3977,7 @@ namespace ts { function isSubtypeOfAny(candidate: Type, types: Type[]): boolean { for (let type of types) { - if (candidate !== type && isTypeSubtypeOf(candidate, type)) { + if (candidate !== type && isTypeSubtypeOf(getRegularTypeOfObjectLiteral(candidate), type)) { return true; } } From 2eca3d59da1567e9ea70ae180dec4a2cb8c7d608 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 13 Jul 2015 11:17:26 -0700 Subject: [PATCH 07/22] Fixing bug in test --- tests/cases/compiler/underscoreTest1.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cases/compiler/underscoreTest1.ts b/tests/cases/compiler/underscoreTest1.ts index f3c4acc6a6262..411bcc58d5f84 100644 --- a/tests/cases/compiler/underscoreTest1.ts +++ b/tests/cases/compiler/underscoreTest1.ts @@ -383,6 +383,7 @@ module Underscore { evaluate?: RegExp; interpolate?: RegExp; escape?: RegExp; + variable?: string; } export interface Static { From c7b0732e8dd81a520be681f87f6f7ce9b353d7df Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 13 Jul 2015 11:21:00 -0700 Subject: [PATCH 08/22] Accepting new baselines --- ...attersForSignatureGroupIdentity.errors.txt | 14 +- ...ateStringsTypeArgumentInference.errors.txt | 4 +- ...StringsTypeArgumentInferenceES6.errors.txt | 4 +- .../reference/typeArgInference2.errors.txt | 4 +- .../typeArgumentInference.errors.txt | 4 +- ...entInferenceConstructSignatures.errors.txt | 4 +- ...rgumentInferenceWithConstraints.errors.txt | 4 +- tests/baselines/reference/underscoreTest1.js | 1 + .../reference/underscoreTest1.symbols | 2651 +++++++++-------- .../baselines/reference/underscoreTest1.types | 3 + 10 files changed, 1355 insertions(+), 1338 deletions(-) diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt index b7b9f43773595..a07fbaa473005 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt @@ -1,7 +1,11 @@ +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,3): error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. + Property 's' does not exist on type '{ n: number; }'. tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(22,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,3): error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. + Property 's' does not exist on type '{ n: number; }'. -==== tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts (1 errors) ==== +==== tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts (3 errors) ==== interface A { (x: { s: string }): string (x: { n: number }): number @@ -21,10 +25,16 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(22,5): error TS240 var v: B; v({ s: "", n: 0 }).toLowerCase(); + ~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. +!!! error TS2345: Property 's' does not exist on type '{ n: number; }'. var w: A; var w: C; ~ !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. - w({ s: "", n: 0 }).toLowerCase(); \ No newline at end of file + w({ s: "", n: 0 }).toLowerCase(); + ~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. +!!! error TS2345: Property 's' does not exist on type '{ n: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt index f3706ae8f17de..055cb4c756a93 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts(77,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Property 'z' is missing in type '{ x: number; y: string; }'. + Property 'y' does not exist on type '{ x: number; z: Date; }'. ==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference.ts (2 errors) ==== @@ -89,7 +89,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Property 'z' is missing in type '{ x: number; y: string; }'. +!!! error TS2453: Property 'y' does not exist on type '{ x: number; z: Date; }'. var a9e: {}; // Generic tag with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt index 1a4a1dc5aac1f..d3ef0a25425cf 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts(76,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Property 'z' is missing in type '{ x: number; y: string; }'. + Property 'y' does not exist on type '{ x: number; z: Date; }'. ==== tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInferenceES6.ts (2 errors) ==== @@ -88,7 +88,7 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsTypeArgumentInference ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Property 'z' is missing in type '{ x: number; y: string; }'. +!!! error TS2453: Property 'y' does not exist on type '{ x: number; z: Date; }'. var a9e: {}; // Generic tag with multiple parameters of generic type passed arguments with a single best common type diff --git a/tests/baselines/reference/typeArgInference2.errors.txt b/tests/baselines/reference/typeArgInference2.errors.txt index dd2e227f2ff0f..8711913e7abdc 100644 --- a/tests/baselines/reference/typeArgInference2.errors.txt +++ b/tests/baselines/reference/typeArgInference2.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. - Property 'a' is missing in type '{ name: string; b: number; }'. + Property 'b' does not exist on type '{ name: string; a: number; }'. ==== tests/cases/compiler/typeArgInference2.ts (1 errors) ==== @@ -19,4 +19,4 @@ tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argumen ~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. -!!! error TS2453: Property 'a' is missing in type '{ name: string; b: number; }'. \ No newline at end of file +!!! error TS2453: Property 'b' does not exist on type '{ name: string; a: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInference.errors.txt b/tests/baselines/reference/typeArgumentInference.errors.txt index 42b4593b7e1c3..d74ea9a28303c 100644 --- a/tests/baselines/reference/typeArgumentInference.errors.txt +++ b/tests/baselines/reference/typeArgumentInference.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,11 Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Property 'z' is missing in type '{ x: number; y: string; }'. + Property 'y' does not exist on type '{ x: number; z: Date; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,66): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. Property 'y' does not exist on type 'A92'. @@ -96,7 +96,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(84,66 ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Property 'z' is missing in type '{ x: number; y: string; }'. +!!! error TS2453: Property 'y' does not exist on type '{ x: number; z: Date; }'. var a9e: {}; var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); ~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index 6443b55d94b55..6d0cd4a6f4707 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -14,7 +14,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(118,9): error TS2304: Cannot find name 'Window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Property 'z' is missing in type '{ x: number; y: string; }'. + Property 'y' does not exist on type '{ x: number; z: any; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,51): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,56): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,66): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. @@ -166,7 +166,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Property 'z' is missing in type '{ x: number; y: string; }'. +!!! error TS2453: Property 'y' does not exist on type '{ x: number; z: any; }'. ~~~~~~ !!! error TS2304: Cannot find name 'window'. var a9e: {}; diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt index 3a6ae294ea30b..00e483ffed741 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(85,9): error TS2304: Cannot find name 'Window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. - Property 'z' is missing in type '{ x: number; y: string; }'. + Property 'y' does not exist on type '{ x: number; z: any; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,47): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,52): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,62): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type 'A92'. @@ -148,7 +148,7 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst ~~~~~~~~~~~~~ !!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. -!!! error TS2453: Property 'z' is missing in type '{ x: number; y: string; }'. +!!! error TS2453: Property 'y' does not exist on type '{ x: number; z: any; }'. ~~~~~~ !!! error TS2304: Cannot find name 'window'. var a9e: {}; diff --git a/tests/baselines/reference/underscoreTest1.js b/tests/baselines/reference/underscoreTest1.js index ddd5201b85810..687a210e6707c 100644 --- a/tests/baselines/reference/underscoreTest1.js +++ b/tests/baselines/reference/underscoreTest1.js @@ -385,6 +385,7 @@ module Underscore { evaluate?: RegExp; interpolate?: RegExp; escape?: RegExp; + variable?: string; } export interface Static { diff --git a/tests/baselines/reference/underscoreTest1.symbols b/tests/baselines/reference/underscoreTest1.symbols index 128ce83051a64..1ba7c97d3318f 100644 --- a/tests/baselines/reference/underscoreTest1.symbols +++ b/tests/baselines/reference/underscoreTest1.symbols @@ -9,9 +9,9 @@ declare function alert(x: string): void; >x : Symbol(x, Decl(underscoreTest1_underscoreTests.ts, 3, 23)) _.each([1, 2, 3], (num) => alert(num.toString())); ->_.each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 394, 43), Decl(underscoreTest1_underscore.ts, 396, 77)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 394, 43), Decl(underscoreTest1_underscore.ts, 396, 77)) +>_.each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 395, 43), Decl(underscoreTest1_underscore.ts, 397, 77)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 395, 43), Decl(underscoreTest1_underscore.ts, 397, 77)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 5, 19)) >alert : Symbol(alert, Decl(underscoreTest1_underscoreTests.ts, 2, 14)) >num.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) @@ -19,9 +19,9 @@ _.each([1, 2, 3], (num) => alert(num.toString())); >toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) _.each({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => alert(value.toString())); ->_.each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 394, 43), Decl(underscoreTest1_underscore.ts, 396, 77)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 394, 43), Decl(underscoreTest1_underscore.ts, 396, 77)) +>_.each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 395, 43), Decl(underscoreTest1_underscore.ts, 397, 77)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 395, 43), Decl(underscoreTest1_underscore.ts, 397, 77)) >one : Symbol(one, Decl(underscoreTest1_underscoreTests.ts, 6, 8)) >two : Symbol(two, Decl(underscoreTest1_underscoreTests.ts, 6, 16)) >three : Symbol(three, Decl(underscoreTest1_underscoreTests.ts, 6, 24)) @@ -33,16 +33,16 @@ _.each({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => alert(valu >toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) _.map([1, 2, 3], (num) => num * 3); ->_.map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 399, 90), Decl(underscoreTest1_underscore.ts, 401, 75)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 399, 90), Decl(underscoreTest1_underscore.ts, 401, 75)) +>_.map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 400, 90), Decl(underscoreTest1_underscore.ts, 402, 75)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 400, 90), Decl(underscoreTest1_underscore.ts, 402, 75)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 8, 18)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 8, 18)) _.map({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => value * 3); ->_.map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 399, 90), Decl(underscoreTest1_underscore.ts, 401, 75)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 399, 90), Decl(underscoreTest1_underscore.ts, 401, 75)) +>_.map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 400, 90), Decl(underscoreTest1_underscore.ts, 402, 75)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 400, 90), Decl(underscoreTest1_underscore.ts, 402, 75)) >one : Symbol(one, Decl(underscoreTest1_underscoreTests.ts, 9, 7)) >two : Symbol(two, Decl(underscoreTest1_underscoreTests.ts, 9, 15)) >three : Symbol(three, Decl(underscoreTest1_underscoreTests.ts, 9, 23)) @@ -52,9 +52,9 @@ _.map({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => value * 3); var sum = _.reduce([1, 2, 3], (memo, num) => memo + num, 0); >sum : Symbol(sum, Decl(underscoreTest1_underscoreTests.ts, 11, 3)) ->_.reduce : Symbol(Underscore.Static.reduce, Decl(underscoreTest1_underscore.ts, 404, 89), Decl(underscoreTest1_underscore.ts, 406, 90), Decl(underscoreTest1_underscore.ts, 407, 92), Decl(underscoreTest1_underscore.ts, 408, 100)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->reduce : Symbol(Underscore.Static.reduce, Decl(underscoreTest1_underscore.ts, 404, 89), Decl(underscoreTest1_underscore.ts, 406, 90), Decl(underscoreTest1_underscore.ts, 407, 92), Decl(underscoreTest1_underscore.ts, 408, 100)) +>_.reduce : Symbol(Underscore.Static.reduce, Decl(underscoreTest1_underscore.ts, 405, 89), Decl(underscoreTest1_underscore.ts, 407, 90), Decl(underscoreTest1_underscore.ts, 408, 92), Decl(underscoreTest1_underscore.ts, 409, 100)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>reduce : Symbol(Underscore.Static.reduce, Decl(underscoreTest1_underscore.ts, 405, 89), Decl(underscoreTest1_underscore.ts, 407, 90), Decl(underscoreTest1_underscore.ts, 408, 92), Decl(underscoreTest1_underscore.ts, 409, 100)) >memo : Symbol(memo, Decl(underscoreTest1_underscoreTests.ts, 11, 31)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 11, 36)) >memo : Symbol(memo, Decl(underscoreTest1_underscoreTests.ts, 11, 31)) @@ -65,9 +65,9 @@ var list = [[0, 1], [2, 3], [4, 5]]; var flat = _.reduceRight(list, (a, b) => a.concat(b), []); >flat : Symbol(flat, Decl(underscoreTest1_underscoreTests.ts, 14, 3)) ->_.reduceRight : Symbol(Underscore.Static.reduceRight, Decl(underscoreTest1_underscore.ts, 417, 102), Decl(underscoreTest1_underscore.ts, 419, 95), Decl(underscoreTest1_underscore.ts, 420, 97), Decl(underscoreTest1_underscore.ts, 421, 105)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->reduceRight : Symbol(Underscore.Static.reduceRight, Decl(underscoreTest1_underscore.ts, 417, 102), Decl(underscoreTest1_underscore.ts, 419, 95), Decl(underscoreTest1_underscore.ts, 420, 97), Decl(underscoreTest1_underscore.ts, 421, 105)) +>_.reduceRight : Symbol(Underscore.Static.reduceRight, Decl(underscoreTest1_underscore.ts, 418, 102), Decl(underscoreTest1_underscore.ts, 420, 95), Decl(underscoreTest1_underscore.ts, 421, 97), Decl(underscoreTest1_underscore.ts, 422, 105)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>reduceRight : Symbol(Underscore.Static.reduceRight, Decl(underscoreTest1_underscore.ts, 418, 102), Decl(underscoreTest1_underscore.ts, 420, 95), Decl(underscoreTest1_underscore.ts, 421, 97), Decl(underscoreTest1_underscore.ts, 422, 105)) >list : Symbol(list, Decl(underscoreTest1_underscoreTests.ts, 13, 3)) >a : Symbol(a, Decl(underscoreTest1_underscoreTests.ts, 14, 32)) >b : Symbol(b, Decl(underscoreTest1_underscoreTests.ts, 14, 34)) @@ -78,17 +78,17 @@ var flat = _.reduceRight(list, (a, b) => a.concat(b), []); var even = _.find([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); >even : Symbol(even, Decl(underscoreTest1_underscoreTests.ts, 16, 3)) ->_.find : Symbol(Underscore.Static.find, Decl(underscoreTest1_underscore.ts, 426, 101), Decl(underscoreTest1_underscore.ts, 428, 77)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->find : Symbol(Underscore.Static.find, Decl(underscoreTest1_underscore.ts, 426, 101), Decl(underscoreTest1_underscore.ts, 428, 77)) +>_.find : Symbol(Underscore.Static.find, Decl(underscoreTest1_underscore.ts, 427, 101), Decl(underscoreTest1_underscore.ts, 429, 77)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>find : Symbol(Underscore.Static.find, Decl(underscoreTest1_underscore.ts, 427, 101), Decl(underscoreTest1_underscore.ts, 429, 77)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 16, 39)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 16, 39)) var evens = _.filter([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); >evens : Symbol(evens, Decl(underscoreTest1_underscoreTests.ts, 18, 3)) ->_.filter : Symbol(Underscore.Static.filter, Decl(underscoreTest1_underscore.ts, 431, 89), Decl(underscoreTest1_underscore.ts, 433, 81)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->filter : Symbol(Underscore.Static.filter, Decl(underscoreTest1_underscore.ts, 431, 89), Decl(underscoreTest1_underscore.ts, 433, 81)) +>_.filter : Symbol(Underscore.Static.filter, Decl(underscoreTest1_underscore.ts, 432, 89), Decl(underscoreTest1_underscore.ts, 434, 81)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>filter : Symbol(Underscore.Static.filter, Decl(underscoreTest1_underscore.ts, 432, 89), Decl(underscoreTest1_underscore.ts, 434, 81)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 18, 42)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 18, 42)) @@ -105,43 +105,43 @@ var listOfPlays = [{ title: "Cymbeline", author: "Shakespeare", year: 1611 }, { >year : Symbol(year, Decl(underscoreTest1_underscoreTests.ts, 20, 183)) _.where(listOfPlays, { author: "Shakespeare", year: 1611 }); ->_.where : Symbol(Underscore.Static.where, Decl(underscoreTest1_underscore.ts, 436, 91), Decl(underscoreTest1_underscore.ts, 438, 53)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->where : Symbol(Underscore.Static.where, Decl(underscoreTest1_underscore.ts, 436, 91), Decl(underscoreTest1_underscore.ts, 438, 53)) +>_.where : Symbol(Underscore.Static.where, Decl(underscoreTest1_underscore.ts, 437, 91), Decl(underscoreTest1_underscore.ts, 439, 53)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>where : Symbol(Underscore.Static.where, Decl(underscoreTest1_underscore.ts, 437, 91), Decl(underscoreTest1_underscore.ts, 439, 53)) >listOfPlays : Symbol(listOfPlays, Decl(underscoreTest1_underscoreTests.ts, 20, 3)) >author : Symbol(author, Decl(underscoreTest1_underscoreTests.ts, 21, 22)) >year : Symbol(year, Decl(underscoreTest1_underscoreTests.ts, 21, 45)) var odds = _.reject([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); >odds : Symbol(odds, Decl(underscoreTest1_underscoreTests.ts, 23, 3)) ->_.reject : Symbol(Underscore.Static.reject, Decl(underscoreTest1_underscore.ts, 442, 65), Decl(underscoreTest1_underscore.ts, 444, 81)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->reject : Symbol(Underscore.Static.reject, Decl(underscoreTest1_underscore.ts, 442, 65), Decl(underscoreTest1_underscore.ts, 444, 81)) +>_.reject : Symbol(Underscore.Static.reject, Decl(underscoreTest1_underscore.ts, 443, 65), Decl(underscoreTest1_underscore.ts, 445, 81)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>reject : Symbol(Underscore.Static.reject, Decl(underscoreTest1_underscore.ts, 443, 65), Decl(underscoreTest1_underscore.ts, 445, 81)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 23, 41)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 23, 41)) _.all([true, 1, null, 'yes'], _.identity); ->_.all : Symbol(Underscore.Static.all, Decl(underscoreTest1_underscore.ts, 448, 95), Decl(underscoreTest1_underscore.ts, 449, 83)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->all : Symbol(Underscore.Static.all, Decl(underscoreTest1_underscore.ts, 448, 95), Decl(underscoreTest1_underscore.ts, 449, 83)) ->_.identity : Symbol(Underscore.Static.identity, Decl(underscoreTest1_underscore.ts, 617, 29)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->identity : Symbol(Underscore.Static.identity, Decl(underscoreTest1_underscore.ts, 617, 29)) +>_.all : Symbol(Underscore.Static.all, Decl(underscoreTest1_underscore.ts, 449, 95), Decl(underscoreTest1_underscore.ts, 450, 83)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>all : Symbol(Underscore.Static.all, Decl(underscoreTest1_underscore.ts, 449, 95), Decl(underscoreTest1_underscore.ts, 450, 83)) +>_.identity : Symbol(Underscore.Static.identity, Decl(underscoreTest1_underscore.ts, 618, 29)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>identity : Symbol(Underscore.Static.identity, Decl(underscoreTest1_underscore.ts, 618, 29)) _.any([null, 0, 'yes', false]); ->_.any : Symbol(Underscore.Static.any, Decl(underscoreTest1_underscore.ts, 453, 94), Decl(underscoreTest1_underscore.ts, 454, 83)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->any : Symbol(Underscore.Static.any, Decl(underscoreTest1_underscore.ts, 453, 94), Decl(underscoreTest1_underscore.ts, 454, 83)) +>_.any : Symbol(Underscore.Static.any, Decl(underscoreTest1_underscore.ts, 454, 94), Decl(underscoreTest1_underscore.ts, 455, 83)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>any : Symbol(Underscore.Static.any, Decl(underscoreTest1_underscore.ts, 454, 94), Decl(underscoreTest1_underscore.ts, 455, 83)) _.contains([1, 2, 3], 3); ->_.contains : Symbol(Underscore.Static.contains, Decl(underscoreTest1_underscore.ts, 455, 93), Decl(underscoreTest1_underscore.ts, 457, 50)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->contains : Symbol(Underscore.Static.contains, Decl(underscoreTest1_underscore.ts, 455, 93), Decl(underscoreTest1_underscore.ts, 457, 50)) +>_.contains : Symbol(Underscore.Static.contains, Decl(underscoreTest1_underscore.ts, 456, 93), Decl(underscoreTest1_underscore.ts, 458, 50)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>contains : Symbol(Underscore.Static.contains, Decl(underscoreTest1_underscore.ts, 456, 93), Decl(underscoreTest1_underscore.ts, 458, 50)) _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); ->_.invoke : Symbol(Underscore.Static.invoke, Decl(underscoreTest1_underscore.ts, 460, 59), Decl(underscoreTest1_underscore.ts, 462, 71)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->invoke : Symbol(Underscore.Static.invoke, Decl(underscoreTest1_underscore.ts, 460, 59), Decl(underscoreTest1_underscore.ts, 462, 71)) +>_.invoke : Symbol(Underscore.Static.invoke, Decl(underscoreTest1_underscore.ts, 461, 59), Decl(underscoreTest1_underscore.ts, 463, 71)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>invoke : Symbol(Underscore.Static.invoke, Decl(underscoreTest1_underscore.ts, 461, 59), Decl(underscoreTest1_underscore.ts, 463, 71)) var stooges = [{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'curly', age: 60 }]; >stooges : Symbol(stooges, Decl(underscoreTest1_underscoreTests.ts, 33, 3)) @@ -153,15 +153,15 @@ var stooges = [{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'cu >age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 33, 85)) _.pluck(stooges, 'name'); ->_.pluck : Symbol(Underscore.Static.pluck, Decl(underscoreTest1_underscore.ts, 463, 81), Decl(underscoreTest1_underscore.ts, 465, 56)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->pluck : Symbol(Underscore.Static.pluck, Decl(underscoreTest1_underscore.ts, 463, 81), Decl(underscoreTest1_underscore.ts, 465, 56)) +>_.pluck : Symbol(Underscore.Static.pluck, Decl(underscoreTest1_underscore.ts, 464, 81), Decl(underscoreTest1_underscore.ts, 466, 56)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>pluck : Symbol(Underscore.Static.pluck, Decl(underscoreTest1_underscore.ts, 464, 81), Decl(underscoreTest1_underscore.ts, 466, 56)) >stooges : Symbol(stooges, Decl(underscoreTest1_underscoreTests.ts, 33, 3)) _.max(stooges, (stooge) => stooge.age); ->_.max : Symbol(Underscore.Static.max, Decl(underscoreTest1_underscore.ts, 466, 66), Decl(underscoreTest1_underscore.ts, 468, 73)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->max : Symbol(Underscore.Static.max, Decl(underscoreTest1_underscore.ts, 466, 66), Decl(underscoreTest1_underscore.ts, 468, 73)) +>_.max : Symbol(Underscore.Static.max, Decl(underscoreTest1_underscore.ts, 467, 66), Decl(underscoreTest1_underscore.ts, 469, 73)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>max : Symbol(Underscore.Static.max, Decl(underscoreTest1_underscore.ts, 467, 66), Decl(underscoreTest1_underscore.ts, 469, 73)) >stooges : Symbol(stooges, Decl(underscoreTest1_underscoreTests.ts, 33, 3)) >stooge : Symbol(stooge, Decl(underscoreTest1_underscoreTests.ts, 36, 16)) >stooge.age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 33, 29)) @@ -172,15 +172,15 @@ var numbers = [10, 5, 100, 2, 1000]; >numbers : Symbol(numbers, Decl(underscoreTest1_underscoreTests.ts, 38, 3)) _.min(numbers); ->_.min : Symbol(Underscore.Static.min, Decl(underscoreTest1_underscore.ts, 469, 83), Decl(underscoreTest1_underscore.ts, 471, 73)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->min : Symbol(Underscore.Static.min, Decl(underscoreTest1_underscore.ts, 469, 83), Decl(underscoreTest1_underscore.ts, 471, 73)) +>_.min : Symbol(Underscore.Static.min, Decl(underscoreTest1_underscore.ts, 470, 83), Decl(underscoreTest1_underscore.ts, 472, 73)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>min : Symbol(Underscore.Static.min, Decl(underscoreTest1_underscore.ts, 470, 83), Decl(underscoreTest1_underscore.ts, 472, 73)) >numbers : Symbol(numbers, Decl(underscoreTest1_underscoreTests.ts, 38, 3)) _.sortBy([1, 2, 3, 4, 5, 6], (num) => Math.sin(num)); ->_.sortBy : Symbol(Underscore.Static.sortBy, Decl(underscoreTest1_underscore.ts, 472, 83), Decl(underscoreTest1_underscore.ts, 474, 77), Decl(underscoreTest1_underscore.ts, 475, 87), Decl(underscoreTest1_underscore.ts, 476, 56)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->sortBy : Symbol(Underscore.Static.sortBy, Decl(underscoreTest1_underscore.ts, 472, 83), Decl(underscoreTest1_underscore.ts, 474, 77), Decl(underscoreTest1_underscore.ts, 475, 87), Decl(underscoreTest1_underscore.ts, 476, 56)) +>_.sortBy : Symbol(Underscore.Static.sortBy, Decl(underscoreTest1_underscore.ts, 473, 83), Decl(underscoreTest1_underscore.ts, 475, 77), Decl(underscoreTest1_underscore.ts, 476, 87), Decl(underscoreTest1_underscore.ts, 477, 56)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>sortBy : Symbol(Underscore.Static.sortBy, Decl(underscoreTest1_underscore.ts, 473, 83), Decl(underscoreTest1_underscore.ts, 475, 77), Decl(underscoreTest1_underscore.ts, 476, 87), Decl(underscoreTest1_underscore.ts, 477, 56)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 41, 30)) >Math.sin : Symbol(Math.sin, Decl(lib.d.ts, 615, 29)) >Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) @@ -191,7 +191,7 @@ _.sortBy([1, 2, 3, 4, 5, 6], (num) => Math.sin(num)); // not sure how this is typechecking at all.. Math.floor(e) is number not string..? _([1.3, 2.1, 2.4]).groupBy((e: number, i?: number, list?: number[]) => Math.floor(e)); >_([1.3, 2.1, 2.4]).groupBy : Symbol(Underscore.WrappedArray.groupBy, Decl(underscoreTest1_underscore.ts, 112, 42), Decl(underscoreTest1_underscore.ts, 113, 77)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) >groupBy : Symbol(Underscore.WrappedArray.groupBy, Decl(underscoreTest1_underscore.ts, 112, 42), Decl(underscoreTest1_underscore.ts, 113, 77)) >e : Symbol(e, Decl(underscoreTest1_underscoreTests.ts, 45, 28)) >i : Symbol(i, Decl(underscoreTest1_underscoreTests.ts, 45, 38)) @@ -202,9 +202,9 @@ _([1.3, 2.1, 2.4]).groupBy((e: number, i?: number, list?: number[]) => Math.floo >e : Symbol(e, Decl(underscoreTest1_underscoreTests.ts, 45, 28)) _.groupBy([1.3, 2.1, 2.4], (num: number) => Math.floor(num)); ->_.groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 477, 66), Decl(underscoreTest1_underscore.ts, 479, 91), Decl(underscoreTest1_underscore.ts, 480, 101), Decl(underscoreTest1_underscore.ts, 481, 69)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 477, 66), Decl(underscoreTest1_underscore.ts, 479, 91), Decl(underscoreTest1_underscore.ts, 480, 101), Decl(underscoreTest1_underscore.ts, 481, 69)) +>_.groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 478, 66), Decl(underscoreTest1_underscore.ts, 480, 91), Decl(underscoreTest1_underscore.ts, 481, 101), Decl(underscoreTest1_underscore.ts, 482, 69)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 478, 66), Decl(underscoreTest1_underscore.ts, 480, 91), Decl(underscoreTest1_underscore.ts, 481, 101), Decl(underscoreTest1_underscore.ts, 482, 69)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 46, 28)) >Math.floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) >Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) @@ -212,28 +212,28 @@ _.groupBy([1.3, 2.1, 2.4], (num: number) => Math.floor(num)); >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 46, 28)) _.groupBy(['one', 'two', 'three'], 'length'); ->_.groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 477, 66), Decl(underscoreTest1_underscore.ts, 479, 91), Decl(underscoreTest1_underscore.ts, 480, 101), Decl(underscoreTest1_underscore.ts, 481, 69)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 477, 66), Decl(underscoreTest1_underscore.ts, 479, 91), Decl(underscoreTest1_underscore.ts, 480, 101), Decl(underscoreTest1_underscore.ts, 481, 69)) +>_.groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 478, 66), Decl(underscoreTest1_underscore.ts, 480, 91), Decl(underscoreTest1_underscore.ts, 481, 101), Decl(underscoreTest1_underscore.ts, 482, 69)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 478, 66), Decl(underscoreTest1_underscore.ts, 480, 91), Decl(underscoreTest1_underscore.ts, 481, 101), Decl(underscoreTest1_underscore.ts, 482, 69)) _.countBy([1, 2, 3, 4, 5], (num) => num % 2 == 0 ? 'even' : 'odd'); ->_.countBy : Symbol(Underscore.Static.countBy, Decl(underscoreTest1_underscore.ts, 482, 79), Decl(underscoreTest1_underscore.ts, 484, 94), Decl(underscoreTest1_underscore.ts, 485, 104), Decl(underscoreTest1_underscore.ts, 486, 72)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->countBy : Symbol(Underscore.Static.countBy, Decl(underscoreTest1_underscore.ts, 482, 79), Decl(underscoreTest1_underscore.ts, 484, 94), Decl(underscoreTest1_underscore.ts, 485, 104), Decl(underscoreTest1_underscore.ts, 486, 72)) +>_.countBy : Symbol(Underscore.Static.countBy, Decl(underscoreTest1_underscore.ts, 483, 79), Decl(underscoreTest1_underscore.ts, 485, 94), Decl(underscoreTest1_underscore.ts, 486, 104), Decl(underscoreTest1_underscore.ts, 487, 72)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>countBy : Symbol(Underscore.Static.countBy, Decl(underscoreTest1_underscore.ts, 483, 79), Decl(underscoreTest1_underscore.ts, 485, 94), Decl(underscoreTest1_underscore.ts, 486, 104), Decl(underscoreTest1_underscore.ts, 487, 72)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 49, 28)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 49, 28)) _.shuffle([1, 2, 3, 4, 5, 6]); ->_.shuffle : Symbol(Underscore.Static.shuffle, Decl(underscoreTest1_underscore.ts, 487, 82), Decl(underscoreTest1_underscore.ts, 489, 35)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->shuffle : Symbol(Underscore.Static.shuffle, Decl(underscoreTest1_underscore.ts, 487, 82), Decl(underscoreTest1_underscore.ts, 489, 35)) +>_.shuffle : Symbol(Underscore.Static.shuffle, Decl(underscoreTest1_underscore.ts, 488, 82), Decl(underscoreTest1_underscore.ts, 490, 35)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>shuffle : Symbol(Underscore.Static.shuffle, Decl(underscoreTest1_underscore.ts, 488, 82), Decl(underscoreTest1_underscore.ts, 490, 35)) // (function(){ return _.toArray(arguments).slice(1); })(1, 2, 3, 4); _.size({ one: 1, two: 2, three: 3 }); ->_.size : Symbol(Underscore.Static.size, Decl(underscoreTest1_underscore.ts, 493, 45), Decl(underscoreTest1_underscore.ts, 495, 35)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->size : Symbol(Underscore.Static.size, Decl(underscoreTest1_underscore.ts, 493, 45), Decl(underscoreTest1_underscore.ts, 495, 35)) +>_.size : Symbol(Underscore.Static.size, Decl(underscoreTest1_underscore.ts, 494, 45), Decl(underscoreTest1_underscore.ts, 496, 35)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>size : Symbol(Underscore.Static.size, Decl(underscoreTest1_underscore.ts, 494, 45), Decl(underscoreTest1_underscore.ts, 496, 35)) >one : Symbol(one, Decl(underscoreTest1_underscoreTests.ts, 55, 8)) >two : Symbol(two, Decl(underscoreTest1_underscoreTests.ts, 55, 16)) >three : Symbol(three, Decl(underscoreTest1_underscoreTests.ts, 55, 24)) @@ -241,130 +241,130 @@ _.size({ one: 1, two: 2, three: 3 }); /////////////////////////////////////////////////////////////////////////////////////// _.first([5, 4, 3, 2, 1]); ->_.first : Symbol(Underscore.Static.first, Decl(underscoreTest1_underscore.ts, 496, 45), Decl(underscoreTest1_underscore.ts, 498, 31)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->first : Symbol(Underscore.Static.first, Decl(underscoreTest1_underscore.ts, 496, 45), Decl(underscoreTest1_underscore.ts, 498, 31)) +>_.first : Symbol(Underscore.Static.first, Decl(underscoreTest1_underscore.ts, 497, 45), Decl(underscoreTest1_underscore.ts, 499, 31)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>first : Symbol(Underscore.Static.first, Decl(underscoreTest1_underscore.ts, 497, 45), Decl(underscoreTest1_underscore.ts, 499, 31)) _.initial([5, 4, 3, 2, 1]); ->_.initial : Symbol(Underscore.Static.initial, Decl(underscoreTest1_underscore.ts, 503, 47), Decl(underscoreTest1_underscore.ts, 505, 33)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->initial : Symbol(Underscore.Static.initial, Decl(underscoreTest1_underscore.ts, 503, 47), Decl(underscoreTest1_underscore.ts, 505, 33)) +>_.initial : Symbol(Underscore.Static.initial, Decl(underscoreTest1_underscore.ts, 504, 47), Decl(underscoreTest1_underscore.ts, 506, 33)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>initial : Symbol(Underscore.Static.initial, Decl(underscoreTest1_underscore.ts, 504, 47), Decl(underscoreTest1_underscore.ts, 506, 33)) _.last([5, 4, 3, 2, 1]); ->_.last : Symbol(Underscore.Static.last, Decl(underscoreTest1_underscore.ts, 506, 50), Decl(underscoreTest1_underscore.ts, 508, 30)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->last : Symbol(Underscore.Static.last, Decl(underscoreTest1_underscore.ts, 506, 50), Decl(underscoreTest1_underscore.ts, 508, 30)) +>_.last : Symbol(Underscore.Static.last, Decl(underscoreTest1_underscore.ts, 507, 50), Decl(underscoreTest1_underscore.ts, 509, 30)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>last : Symbol(Underscore.Static.last, Decl(underscoreTest1_underscore.ts, 507, 50), Decl(underscoreTest1_underscore.ts, 509, 30)) _.rest([5, 4, 3, 2, 1]); ->_.rest : Symbol(Underscore.Static.rest, Decl(underscoreTest1_underscore.ts, 509, 47)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->rest : Symbol(Underscore.Static.rest, Decl(underscoreTest1_underscore.ts, 509, 47)) +>_.rest : Symbol(Underscore.Static.rest, Decl(underscoreTest1_underscore.ts, 510, 47)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>rest : Symbol(Underscore.Static.rest, Decl(underscoreTest1_underscore.ts, 510, 47)) _.compact([0, 1, false, 2, '', 3]); ->_.compact : Symbol(Underscore.Static.compact, Decl(underscoreTest1_underscore.ts, 511, 48)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->compact : Symbol(Underscore.Static.compact, Decl(underscoreTest1_underscore.ts, 511, 48)) +>_.compact : Symbol(Underscore.Static.compact, Decl(underscoreTest1_underscore.ts, 512, 48)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>compact : Symbol(Underscore.Static.compact, Decl(underscoreTest1_underscore.ts, 512, 48)) _.flatten([1, 2, 3, 4]); ->_.flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 513, 35), Decl(underscoreTest1_underscore.ts, 515, 37)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 513, 35), Decl(underscoreTest1_underscore.ts, 515, 37)) +>_.flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 514, 35), Decl(underscoreTest1_underscore.ts, 516, 37)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 514, 35), Decl(underscoreTest1_underscore.ts, 516, 37)) _.flatten([1, [2]]); ->_.flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 513, 35), Decl(underscoreTest1_underscore.ts, 515, 37)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 513, 35), Decl(underscoreTest1_underscore.ts, 515, 37)) +>_.flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 514, 35), Decl(underscoreTest1_underscore.ts, 516, 37)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 514, 35), Decl(underscoreTest1_underscore.ts, 516, 37)) // typescript doesn't like the elements being different _.flatten([1, [2], [3, [[4]]]]); ->_.flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 513, 35), Decl(underscoreTest1_underscore.ts, 515, 37)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 513, 35), Decl(underscoreTest1_underscore.ts, 515, 37)) +>_.flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 514, 35), Decl(underscoreTest1_underscore.ts, 516, 37)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 514, 35), Decl(underscoreTest1_underscore.ts, 516, 37)) _.flatten([1, [2], [3, [[4]]]], true); ->_.flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 513, 35), Decl(underscoreTest1_underscore.ts, 515, 37)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 513, 35), Decl(underscoreTest1_underscore.ts, 515, 37)) +>_.flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 514, 35), Decl(underscoreTest1_underscore.ts, 516, 37)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>flatten : Symbol(Underscore.Static.flatten, Decl(underscoreTest1_underscore.ts, 514, 35), Decl(underscoreTest1_underscore.ts, 516, 37)) _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); ->_.without : Symbol(Underscore.Static.without, Decl(underscoreTest1_underscore.ts, 516, 57)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->without : Symbol(Underscore.Static.without, Decl(underscoreTest1_underscore.ts, 516, 57)) +>_.without : Symbol(Underscore.Static.without, Decl(underscoreTest1_underscore.ts, 517, 57)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>without : Symbol(Underscore.Static.without, Decl(underscoreTest1_underscore.ts, 517, 57)) _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); ->_.union : Symbol(Underscore.Static.union, Decl(underscoreTest1_underscore.ts, 518, 51)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->union : Symbol(Underscore.Static.union, Decl(underscoreTest1_underscore.ts, 518, 51)) +>_.union : Symbol(Underscore.Static.union, Decl(underscoreTest1_underscore.ts, 519, 51)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>union : Symbol(Underscore.Static.union, Decl(underscoreTest1_underscore.ts, 519, 51)) _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); ->_.intersection : Symbol(Underscore.Static.intersection, Decl(underscoreTest1_underscore.ts, 520, 40)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->intersection : Symbol(Underscore.Static.intersection, Decl(underscoreTest1_underscore.ts, 520, 40)) +>_.intersection : Symbol(Underscore.Static.intersection, Decl(underscoreTest1_underscore.ts, 521, 40)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>intersection : Symbol(Underscore.Static.intersection, Decl(underscoreTest1_underscore.ts, 521, 40)) _.difference([1, 2, 3, 4, 5], [5, 2, 10]); ->_.difference : Symbol(Underscore.Static.difference, Decl(underscoreTest1_underscore.ts, 522, 47)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->difference : Symbol(Underscore.Static.difference, Decl(underscoreTest1_underscore.ts, 522, 47)) +>_.difference : Symbol(Underscore.Static.difference, Decl(underscoreTest1_underscore.ts, 523, 47)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>difference : Symbol(Underscore.Static.difference, Decl(underscoreTest1_underscore.ts, 523, 47)) _.uniq([1, 2, 1, 3, 1, 4]); ->_.uniq : Symbol(Underscore.Static.uniq, Decl(underscoreTest1_underscore.ts, 524, 56), Decl(underscoreTest1_underscore.ts, 526, 52)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->uniq : Symbol(Underscore.Static.uniq, Decl(underscoreTest1_underscore.ts, 524, 56), Decl(underscoreTest1_underscore.ts, 526, 52)) +>_.uniq : Symbol(Underscore.Static.uniq, Decl(underscoreTest1_underscore.ts, 525, 56), Decl(underscoreTest1_underscore.ts, 527, 52)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>uniq : Symbol(Underscore.Static.uniq, Decl(underscoreTest1_underscore.ts, 525, 56), Decl(underscoreTest1_underscore.ts, 527, 52)) _.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); ->_.zip : Symbol(Underscore.Static.zip, Decl(underscoreTest1_underscore.ts, 529, 97), Decl(underscoreTest1_underscore.ts, 531, 58), Decl(underscoreTest1_underscore.ts, 532, 76), Decl(underscoreTest1_underscore.ts, 533, 94)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->zip : Symbol(Underscore.Static.zip, Decl(underscoreTest1_underscore.ts, 529, 97), Decl(underscoreTest1_underscore.ts, 531, 58), Decl(underscoreTest1_underscore.ts, 532, 76), Decl(underscoreTest1_underscore.ts, 533, 94)) +>_.zip : Symbol(Underscore.Static.zip, Decl(underscoreTest1_underscore.ts, 530, 97), Decl(underscoreTest1_underscore.ts, 532, 58), Decl(underscoreTest1_underscore.ts, 533, 76), Decl(underscoreTest1_underscore.ts, 534, 94)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>zip : Symbol(Underscore.Static.zip, Decl(underscoreTest1_underscore.ts, 530, 97), Decl(underscoreTest1_underscore.ts, 532, 58), Decl(underscoreTest1_underscore.ts, 533, 76), Decl(underscoreTest1_underscore.ts, 534, 94)) _.object(['moe', 'larry', 'curly'], [30, 40, 50]); ->_.object : Symbol(Underscore.Static.object, Decl(underscoreTest1_underscore.ts, 534, 41), Decl(underscoreTest1_underscore.ts, 536, 35)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->object : Symbol(Underscore.Static.object, Decl(underscoreTest1_underscore.ts, 534, 41), Decl(underscoreTest1_underscore.ts, 536, 35)) +>_.object : Symbol(Underscore.Static.object, Decl(underscoreTest1_underscore.ts, 535, 41), Decl(underscoreTest1_underscore.ts, 537, 35)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>object : Symbol(Underscore.Static.object, Decl(underscoreTest1_underscore.ts, 535, 41), Decl(underscoreTest1_underscore.ts, 537, 35)) _.object([['moe', 30], ['larry', 40], ['curly', 50]]); ->_.object : Symbol(Underscore.Static.object, Decl(underscoreTest1_underscore.ts, 534, 41), Decl(underscoreTest1_underscore.ts, 536, 35)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->object : Symbol(Underscore.Static.object, Decl(underscoreTest1_underscore.ts, 534, 41), Decl(underscoreTest1_underscore.ts, 536, 35)) +>_.object : Symbol(Underscore.Static.object, Decl(underscoreTest1_underscore.ts, 535, 41), Decl(underscoreTest1_underscore.ts, 537, 35)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>object : Symbol(Underscore.Static.object, Decl(underscoreTest1_underscore.ts, 535, 41), Decl(underscoreTest1_underscore.ts, 537, 35)) _.indexOf([1, 2, 3], 2); ->_.indexOf : Symbol(Underscore.Static.indexOf, Decl(underscoreTest1_underscore.ts, 537, 51)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->indexOf : Symbol(Underscore.Static.indexOf, Decl(underscoreTest1_underscore.ts, 537, 51)) +>_.indexOf : Symbol(Underscore.Static.indexOf, Decl(underscoreTest1_underscore.ts, 538, 51)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>indexOf : Symbol(Underscore.Static.indexOf, Decl(underscoreTest1_underscore.ts, 538, 51)) _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); ->_.lastIndexOf : Symbol(Underscore.Static.lastIndexOf, Decl(underscoreTest1_underscore.ts, 539, 68)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->lastIndexOf : Symbol(Underscore.Static.lastIndexOf, Decl(underscoreTest1_underscore.ts, 539, 68)) +>_.lastIndexOf : Symbol(Underscore.Static.lastIndexOf, Decl(underscoreTest1_underscore.ts, 540, 68)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>lastIndexOf : Symbol(Underscore.Static.lastIndexOf, Decl(underscoreTest1_underscore.ts, 540, 68)) _.sortedIndex([10, 20, 30, 40, 50], 35); ->_.sortedIndex : Symbol(Underscore.Static.sortedIndex, Decl(underscoreTest1_underscore.ts, 541, 72), Decl(underscoreTest1_underscore.ts, 543, 72)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->sortedIndex : Symbol(Underscore.Static.sortedIndex, Decl(underscoreTest1_underscore.ts, 541, 72), Decl(underscoreTest1_underscore.ts, 543, 72)) +>_.sortedIndex : Symbol(Underscore.Static.sortedIndex, Decl(underscoreTest1_underscore.ts, 542, 72), Decl(underscoreTest1_underscore.ts, 544, 72)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>sortedIndex : Symbol(Underscore.Static.sortedIndex, Decl(underscoreTest1_underscore.ts, 542, 72), Decl(underscoreTest1_underscore.ts, 544, 72)) _.range(10); ->_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) +>_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) _.range(1, 11); ->_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) +>_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) _.range(0, 30, 5); ->_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) +>_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) _.range(0, 30, 5); ->_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) +>_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) _.range(0); ->_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 544, 94), Decl(underscoreTest1_underscore.ts, 546, 38)) +>_.range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>range : Symbol(Underscore.Static.range, Decl(underscoreTest1_underscore.ts, 545, 94), Decl(underscoreTest1_underscore.ts, 547, 38)) /////////////////////////////////////////////////////////////////////////////////////// @@ -377,9 +377,9 @@ var func = function (greeting) { return greeting + ': ' + this.name }; // instead of the newly returned _bind => func type. var func2 = _.bind(func, { name: 'moe' }, 'hi'); >func2 : Symbol(func2, Decl(underscoreTest1_underscoreTests.ts, 93, 3)) ->_.bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 547, 68), Decl(underscoreTest1_underscore.ts, 549, 58)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 547, 68), Decl(underscoreTest1_underscore.ts, 549, 58)) +>_.bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 548, 68), Decl(underscoreTest1_underscore.ts, 550, 58)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 548, 68), Decl(underscoreTest1_underscore.ts, 550, 58)) >func : Symbol(func, Decl(underscoreTest1_underscoreTests.ts, 90, 3)) >name : Symbol(name, Decl(underscoreTest1_underscoreTests.ts, 93, 26)) @@ -402,9 +402,9 @@ var buttonView = { }; _.bindAll(buttonView); ->_.bindAll : Symbol(Underscore.Static.bindAll, Decl(underscoreTest1_underscore.ts, 550, 68)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->bindAll : Symbol(Underscore.Static.bindAll, Decl(underscoreTest1_underscore.ts, 550, 68)) +>_.bindAll : Symbol(Underscore.Static.bindAll, Decl(underscoreTest1_underscore.ts, 551, 68)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>bindAll : Symbol(Underscore.Static.bindAll, Decl(underscoreTest1_underscore.ts, 551, 68)) >buttonView : Symbol(buttonView, Decl(underscoreTest1_underscoreTests.ts, 96, 3)) $('#underscore_button').bind('click', buttonView.onClick); @@ -415,9 +415,9 @@ $('#underscore_button').bind('click', buttonView.onClick); var fibonacci = _.memoize(function (n) { >fibonacci : Symbol(fibonacci, Decl(underscoreTest1_underscoreTests.ts, 104, 3)) ->_.memoize : Symbol(Underscore.Static.memoize, Decl(underscoreTest1_underscore.ts, 554, 58)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->memoize : Symbol(Underscore.Static.memoize, Decl(underscoreTest1_underscore.ts, 554, 58)) +>_.memoize : Symbol(Underscore.Static.memoize, Decl(underscoreTest1_underscore.ts, 555, 58)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>memoize : Symbol(Underscore.Static.memoize, Decl(underscoreTest1_underscore.ts, 555, 58)) >n : Symbol(n, Decl(underscoreTest1_underscoreTests.ts, 104, 36)) return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); @@ -432,23 +432,23 @@ var fibonacci = _.memoize(function (n) { var log = _.bind((message?: string, ...rest: string[]) => { }, Date); >log : Symbol(log, Decl(underscoreTest1_underscoreTests.ts, 108, 3)) ->_.bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 547, 68), Decl(underscoreTest1_underscore.ts, 549, 58)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 547, 68), Decl(underscoreTest1_underscore.ts, 549, 58)) +>_.bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 548, 68), Decl(underscoreTest1_underscore.ts, 550, 58)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 548, 68), Decl(underscoreTest1_underscore.ts, 550, 58)) >message : Symbol(message, Decl(underscoreTest1_underscoreTests.ts, 108, 18)) >rest : Symbol(rest, Decl(underscoreTest1_underscoreTests.ts, 108, 35)) >Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) _.delay(log, 1000, 'logged later'); ->_.delay : Symbol(Underscore.Static.delay, Decl(underscoreTest1_underscore.ts, 556, 73)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->delay : Symbol(Underscore.Static.delay, Decl(underscoreTest1_underscore.ts, 556, 73)) +>_.delay : Symbol(Underscore.Static.delay, Decl(underscoreTest1_underscore.ts, 557, 73)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>delay : Symbol(Underscore.Static.delay, Decl(underscoreTest1_underscore.ts, 557, 73)) >log : Symbol(log, Decl(underscoreTest1_underscoreTests.ts, 108, 3)) _.defer(function () { alert('deferred'); }); ->_.defer : Symbol(Underscore.Static.defer, Decl(underscoreTest1_underscore.ts, 558, 68)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->defer : Symbol(Underscore.Static.defer, Decl(underscoreTest1_underscore.ts, 558, 68)) +>_.defer : Symbol(Underscore.Static.defer, Decl(underscoreTest1_underscore.ts, 559, 68)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>defer : Symbol(Underscore.Static.defer, Decl(underscoreTest1_underscore.ts, 559, 68)) >alert : Symbol(alert, Decl(underscoreTest1_underscoreTests.ts, 2, 14)) var updatePosition = () => alert('updating position...'); @@ -457,9 +457,9 @@ var updatePosition = () => alert('updating position...'); var throttled = _.throttle(updatePosition, 100); >throttled : Symbol(throttled, Decl(underscoreTest1_underscoreTests.ts, 114, 3)) ->_.throttle : Symbol(Underscore.Static.throttle, Decl(underscoreTest1_underscore.ts, 560, 54)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->throttle : Symbol(Underscore.Static.throttle, Decl(underscoreTest1_underscore.ts, 560, 54)) +>_.throttle : Symbol(Underscore.Static.throttle, Decl(underscoreTest1_underscore.ts, 561, 54)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>throttle : Symbol(Underscore.Static.throttle, Decl(underscoreTest1_underscore.ts, 561, 54)) >updatePosition : Symbol(updatePosition, Decl(underscoreTest1_underscoreTests.ts, 113, 3)) $(null).scroll(throttled); @@ -472,9 +472,9 @@ var calculateLayout = () => alert('calculating layout...'); var lazyLayout = _.debounce(calculateLayout, 300); >lazyLayout : Symbol(lazyLayout, Decl(underscoreTest1_underscoreTests.ts, 118, 3)) ->_.debounce : Symbol(Underscore.Static.debounce, Decl(underscoreTest1_underscore.ts, 562, 63)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->debounce : Symbol(Underscore.Static.debounce, Decl(underscoreTest1_underscore.ts, 562, 63)) +>_.debounce : Symbol(Underscore.Static.debounce, Decl(underscoreTest1_underscore.ts, 563, 63)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>debounce : Symbol(Underscore.Static.debounce, Decl(underscoreTest1_underscore.ts, 563, 63)) >calculateLayout : Symbol(calculateLayout, Decl(underscoreTest1_underscoreTests.ts, 117, 3)) $(null).resize(lazyLayout); @@ -487,9 +487,9 @@ var createApplication = () => alert('creating application...'); var initialize = _.once(createApplication); >initialize : Symbol(initialize, Decl(underscoreTest1_underscoreTests.ts, 122, 3)) ->_.once : Symbol(Underscore.Static.once, Decl(underscoreTest1_underscore.ts, 564, 84)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->once : Symbol(Underscore.Static.once, Decl(underscoreTest1_underscore.ts, 564, 84)) +>_.once : Symbol(Underscore.Static.once, Decl(underscoreTest1_underscore.ts, 565, 84)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>once : Symbol(Underscore.Static.once, Decl(underscoreTest1_underscore.ts, 565, 84)) >createApplication : Symbol(createApplication, Decl(underscoreTest1_underscoreTests.ts, 121, 3)) initialize(); @@ -507,18 +507,18 @@ var render = () => alert("rendering..."); var renderNotes = _.after(notes.length, render); >renderNotes : Symbol(renderNotes, Decl(underscoreTest1_underscoreTests.ts, 128, 3)) ->_.after : Symbol(Underscore.Static.after, Decl(underscoreTest1_underscore.ts, 566, 45)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->after : Symbol(Underscore.Static.after, Decl(underscoreTest1_underscore.ts, 566, 45)) +>_.after : Symbol(Underscore.Static.after, Decl(underscoreTest1_underscore.ts, 567, 45)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>after : Symbol(Underscore.Static.after, Decl(underscoreTest1_underscore.ts, 567, 45)) >notes.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) >notes : Symbol(notes, Decl(underscoreTest1_underscoreTests.ts, 126, 3)) >length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) >render : Symbol(render, Decl(underscoreTest1_underscoreTests.ts, 127, 3)) _.each(notes, (note) => note.asyncSave({ success: renderNotes })); ->_.each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 394, 43), Decl(underscoreTest1_underscore.ts, 396, 77)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 394, 43), Decl(underscoreTest1_underscore.ts, 396, 77)) +>_.each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 395, 43), Decl(underscoreTest1_underscore.ts, 397, 77)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 395, 43), Decl(underscoreTest1_underscore.ts, 397, 77)) >notes : Symbol(notes, Decl(underscoreTest1_underscoreTests.ts, 126, 3)) >note : Symbol(note, Decl(underscoreTest1_underscoreTests.ts, 129, 15)) >note : Symbol(note, Decl(underscoreTest1_underscoreTests.ts, 129, 15)) @@ -532,9 +532,9 @@ var hello = function (name) { return "hello: " + name; }; hello = _.wrap(hello, (func, arg) => { return "before, " + func(arg) + ", after"; }); >hello : Symbol(hello, Decl(underscoreTest1_underscoreTests.ts, 131, 3)) ->_.wrap : Symbol(Underscore.Static.wrap, Decl(underscoreTest1_underscore.ts, 568, 61)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->wrap : Symbol(Underscore.Static.wrap, Decl(underscoreTest1_underscore.ts, 568, 61)) +>_.wrap : Symbol(Underscore.Static.wrap, Decl(underscoreTest1_underscore.ts, 569, 61)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>wrap : Symbol(Underscore.Static.wrap, Decl(underscoreTest1_underscore.ts, 569, 61)) >hello : Symbol(hello, Decl(underscoreTest1_underscoreTests.ts, 131, 3)) >func : Symbol(func, Decl(underscoreTest1_underscoreTests.ts, 132, 23)) >arg : Symbol(arg, Decl(underscoreTest1_underscoreTests.ts, 132, 28)) @@ -556,9 +556,9 @@ var exclaim = function (statement) { return statement + "!"; }; var welcome = _.compose(exclaim, greet); >welcome : Symbol(welcome, Decl(underscoreTest1_underscoreTests.ts, 137, 3)) ->_.compose : Symbol(Underscore.Static.compose, Decl(underscoreTest1_underscore.ts, 570, 88)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->compose : Symbol(Underscore.Static.compose, Decl(underscoreTest1_underscore.ts, 570, 88)) +>_.compose : Symbol(Underscore.Static.compose, Decl(underscoreTest1_underscore.ts, 571, 88)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>compose : Symbol(Underscore.Static.compose, Decl(underscoreTest1_underscore.ts, 571, 88)) >exclaim : Symbol(exclaim, Decl(underscoreTest1_underscoreTests.ts, 136, 3)) >greet : Symbol(greet, Decl(underscoreTest1_underscoreTests.ts, 135, 3)) @@ -568,62 +568,62 @@ welcome('moe'); /////////////////////////////////////////////////////////////////////////////////////// _.keys({ one: 1, two: 2, three: 3 }); ->_.keys : Symbol(Underscore.Static.keys, Decl(underscoreTest1_underscore.ts, 572, 48)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->keys : Symbol(Underscore.Static.keys, Decl(underscoreTest1_underscore.ts, 572, 48)) +>_.keys : Symbol(Underscore.Static.keys, Decl(underscoreTest1_underscore.ts, 573, 48)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>keys : Symbol(Underscore.Static.keys, Decl(underscoreTest1_underscore.ts, 573, 48)) >one : Symbol(one, Decl(underscoreTest1_underscoreTests.ts, 142, 8)) >two : Symbol(two, Decl(underscoreTest1_underscoreTests.ts, 142, 16)) >three : Symbol(three, Decl(underscoreTest1_underscoreTests.ts, 142, 24)) _.values({ one: 1, two: 2, three: 3 }); ->_.values : Symbol(Underscore.Static.values, Decl(underscoreTest1_underscore.ts, 574, 36)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->values : Symbol(Underscore.Static.values, Decl(underscoreTest1_underscore.ts, 574, 36)) +>_.values : Symbol(Underscore.Static.values, Decl(underscoreTest1_underscore.ts, 575, 36)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>values : Symbol(Underscore.Static.values, Decl(underscoreTest1_underscore.ts, 575, 36)) >one : Symbol(one, Decl(underscoreTest1_underscoreTests.ts, 143, 10)) >two : Symbol(two, Decl(underscoreTest1_underscoreTests.ts, 143, 18)) >three : Symbol(three, Decl(underscoreTest1_underscoreTests.ts, 143, 26)) _.pairs({ one: 1, two: 2, three: 3 }); ->_.pairs : Symbol(Underscore.Static.pairs, Decl(underscoreTest1_underscore.ts, 576, 35)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->pairs : Symbol(Underscore.Static.pairs, Decl(underscoreTest1_underscore.ts, 576, 35)) +>_.pairs : Symbol(Underscore.Static.pairs, Decl(underscoreTest1_underscore.ts, 577, 35)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>pairs : Symbol(Underscore.Static.pairs, Decl(underscoreTest1_underscore.ts, 577, 35)) >one : Symbol(one, Decl(underscoreTest1_underscoreTests.ts, 144, 9)) >two : Symbol(two, Decl(underscoreTest1_underscoreTests.ts, 144, 17)) >three : Symbol(three, Decl(underscoreTest1_underscoreTests.ts, 144, 25)) _.invert({ Moe: "Moses", Larry: "Louis", Curly: "Jerome" }); ->_.invert : Symbol(Underscore.Static.invert, Decl(underscoreTest1_underscore.ts, 578, 36)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->invert : Symbol(Underscore.Static.invert, Decl(underscoreTest1_underscore.ts, 578, 36)) +>_.invert : Symbol(Underscore.Static.invert, Decl(underscoreTest1_underscore.ts, 579, 36)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>invert : Symbol(Underscore.Static.invert, Decl(underscoreTest1_underscore.ts, 579, 36)) >Moe : Symbol(Moe, Decl(underscoreTest1_underscoreTests.ts, 145, 10)) >Larry : Symbol(Larry, Decl(underscoreTest1_underscoreTests.ts, 145, 24)) >Curly : Symbol(Curly, Decl(underscoreTest1_underscoreTests.ts, 145, 40)) _.functions(_); ->_.functions : Symbol(Underscore.Static.functions, Decl(underscoreTest1_underscore.ts, 580, 33)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->functions : Symbol(Underscore.Static.functions, Decl(underscoreTest1_underscore.ts, 580, 33)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) +>_.functions : Symbol(Underscore.Static.functions, Decl(underscoreTest1_underscore.ts, 581, 33)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>functions : Symbol(Underscore.Static.functions, Decl(underscoreTest1_underscore.ts, 581, 33)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) _.extend({ name: 'moe' }, { age: 50 }); ->_.extend : Symbol(Underscore.Static.extend, Decl(underscoreTest1_underscore.ts, 583, 39)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->extend : Symbol(Underscore.Static.extend, Decl(underscoreTest1_underscore.ts, 583, 39)) +>_.extend : Symbol(Underscore.Static.extend, Decl(underscoreTest1_underscore.ts, 584, 39)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>extend : Symbol(Underscore.Static.extend, Decl(underscoreTest1_underscore.ts, 584, 39)) >name : Symbol(name, Decl(underscoreTest1_underscoreTests.ts, 147, 10)) >age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 147, 27)) _.pick({ name: 'moe', age: 50, userid: 'moe1' }, 'name', 'age'); ->_.pick : Symbol(Underscore.Static.pick, Decl(underscoreTest1_underscore.ts, 585, 56)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->pick : Symbol(Underscore.Static.pick, Decl(underscoreTest1_underscore.ts, 585, 56)) +>_.pick : Symbol(Underscore.Static.pick, Decl(underscoreTest1_underscore.ts, 586, 56)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>pick : Symbol(Underscore.Static.pick, Decl(underscoreTest1_underscore.ts, 586, 56)) >name : Symbol(name, Decl(underscoreTest1_underscoreTests.ts, 148, 8)) >age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 148, 21)) >userid : Symbol(userid, Decl(underscoreTest1_underscoreTests.ts, 148, 30)) _.omit({ name: 'moe', age: 50, userid: 'moe1' }, 'userid'); ->_.omit : Symbol(Underscore.Static.omit, Decl(underscoreTest1_underscore.ts, 587, 49)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->omit : Symbol(Underscore.Static.omit, Decl(underscoreTest1_underscore.ts, 587, 49)) +>_.omit : Symbol(Underscore.Static.omit, Decl(underscoreTest1_underscore.ts, 588, 49)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>omit : Symbol(Underscore.Static.omit, Decl(underscoreTest1_underscore.ts, 588, 49)) >name : Symbol(name, Decl(underscoreTest1_underscoreTests.ts, 149, 8)) >age : Symbol(age, Decl(underscoreTest1_underscoreTests.ts, 149, 21)) >userid : Symbol(userid, Decl(underscoreTest1_underscoreTests.ts, 149, 30)) @@ -633,17 +633,17 @@ var iceCream = { flavor: "chocolate" }; >flavor : Symbol(flavor, Decl(underscoreTest1_underscoreTests.ts, 151, 16)) _.defaults(iceCream, { flavor: "vanilla", sprinkles: "lots" }); ->_.defaults : Symbol(Underscore.Static.defaults, Decl(underscoreTest1_underscore.ts, 589, 49)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->defaults : Symbol(Underscore.Static.defaults, Decl(underscoreTest1_underscore.ts, 589, 49)) +>_.defaults : Symbol(Underscore.Static.defaults, Decl(underscoreTest1_underscore.ts, 590, 49)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>defaults : Symbol(Underscore.Static.defaults, Decl(underscoreTest1_underscore.ts, 590, 49)) >iceCream : Symbol(iceCream, Decl(underscoreTest1_underscoreTests.ts, 151, 3)) >flavor : Symbol(flavor, Decl(underscoreTest1_underscoreTests.ts, 152, 22)) >sprinkles : Symbol(sprinkles, Decl(underscoreTest1_underscoreTests.ts, 152, 41)) _.clone({ name: 'moe' }); ->_.clone : Symbol(Underscore.Static.clone, Decl(underscoreTest1_underscore.ts, 591, 54)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->clone : Symbol(Underscore.Static.clone, Decl(underscoreTest1_underscore.ts, 591, 54)) +>_.clone : Symbol(Underscore.Static.clone, Decl(underscoreTest1_underscore.ts, 592, 54)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>clone : Symbol(Underscore.Static.clone, Decl(underscoreTest1_underscore.ts, 592, 54)) >name : Symbol(name, Decl(underscoreTest1_underscoreTests.ts, 154, 9)) _.chain([1, 2, 3, 200]) @@ -651,9 +651,9 @@ _.chain([1, 2, 3, 200]) >_.chain([1, 2, 3, 200]) .filter(function (num) { return num % 2 == 0; }) .tap(alert) .map : Symbol(Underscore.ChainedArray.map, Decl(underscoreTest1_underscore.ts, 240, 81)) >_.chain([1, 2, 3, 200]) .filter(function (num) { return num % 2 == 0; }) .tap : Symbol(Underscore.ChainedArray.tap, Decl(underscoreTest1_underscore.ts, 325, 33)) >_.chain([1, 2, 3, 200]) .filter : Symbol(Underscore.ChainedArray.filter, Decl(underscoreTest1_underscore.ts, 254, 80)) ->_.chain : Symbol(Underscore.Static.chain, Decl(underscoreTest1_underscore.ts, 390, 38), Decl(underscoreTest1_underscore.ts, 392, 45), Decl(underscoreTest1_underscore.ts, 393, 60)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->chain : Symbol(Underscore.Static.chain, Decl(underscoreTest1_underscore.ts, 390, 38), Decl(underscoreTest1_underscore.ts, 392, 45), Decl(underscoreTest1_underscore.ts, 393, 60)) +>_.chain : Symbol(Underscore.Static.chain, Decl(underscoreTest1_underscore.ts, 391, 38), Decl(underscoreTest1_underscore.ts, 393, 45), Decl(underscoreTest1_underscore.ts, 394, 60)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>chain : Symbol(Underscore.Static.chain, Decl(underscoreTest1_underscore.ts, 391, 38), Decl(underscoreTest1_underscore.ts, 393, 45), Decl(underscoreTest1_underscore.ts, 394, 60)) .filter(function (num) { return num % 2 == 0; }) >filter : Symbol(Underscore.ChainedArray.filter, Decl(underscoreTest1_underscore.ts, 254, 80)) @@ -674,9 +674,9 @@ _.chain([1, 2, 3, 200]) >value : Symbol(Underscore.ChainedObject.value, Decl(underscoreTest1_underscore.ts, 234, 46)) _.has({ a: 1, b: 2, c: 3 }, "b"); ->_.has : Symbol(Underscore.Static.has, Decl(underscoreTest1_underscore.ts, 595, 63)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->has : Symbol(Underscore.Static.has, Decl(underscoreTest1_underscore.ts, 595, 63)) +>_.has : Symbol(Underscore.Static.has, Decl(underscoreTest1_underscore.ts, 596, 63)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>has : Symbol(Underscore.Static.has, Decl(underscoreTest1_underscore.ts, 596, 63)) >a : Symbol(a, Decl(underscoreTest1_underscoreTests.ts, 162, 7)) >b : Symbol(b, Decl(underscoreTest1_underscoreTests.ts, 162, 13)) >c : Symbol(c, Decl(underscoreTest1_underscoreTests.ts, 162, 19)) @@ -696,103 +696,103 @@ moe == clone; >clone : Symbol(clone, Decl(underscoreTest1_underscoreTests.ts, 165, 3)) _.isEqual(moe, clone); ->_.isEqual : Symbol(Underscore.Static.isEqual, Decl(underscoreTest1_underscore.ts, 597, 47)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isEqual : Symbol(Underscore.Static.isEqual, Decl(underscoreTest1_underscore.ts, 597, 47)) +>_.isEqual : Symbol(Underscore.Static.isEqual, Decl(underscoreTest1_underscore.ts, 598, 47)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isEqual : Symbol(Underscore.Static.isEqual, Decl(underscoreTest1_underscore.ts, 598, 47)) >moe : Symbol(moe, Decl(underscoreTest1_underscoreTests.ts, 164, 3)) >clone : Symbol(clone, Decl(underscoreTest1_underscoreTests.ts, 165, 3)) _.isEmpty([1, 2, 3]); ->_.isEmpty : Symbol(Underscore.Static.isEmpty, Decl(underscoreTest1_underscore.ts, 599, 49)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isEmpty : Symbol(Underscore.Static.isEmpty, Decl(underscoreTest1_underscore.ts, 599, 49)) +>_.isEmpty : Symbol(Underscore.Static.isEmpty, Decl(underscoreTest1_underscore.ts, 600, 49)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isEmpty : Symbol(Underscore.Static.isEmpty, Decl(underscoreTest1_underscore.ts, 600, 49)) _.isEmpty({}); ->_.isEmpty : Symbol(Underscore.Static.isEmpty, Decl(underscoreTest1_underscore.ts, 599, 49)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isEmpty : Symbol(Underscore.Static.isEmpty, Decl(underscoreTest1_underscore.ts, 599, 49)) +>_.isEmpty : Symbol(Underscore.Static.isEmpty, Decl(underscoreTest1_underscore.ts, 600, 49)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isEmpty : Symbol(Underscore.Static.isEmpty, Decl(underscoreTest1_underscore.ts, 600, 49)) _.isElement($('body')[0]); ->_.isElement : Symbol(Underscore.Static.isElement, Decl(underscoreTest1_underscore.ts, 601, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isElement : Symbol(Underscore.Static.isElement, Decl(underscoreTest1_underscore.ts, 601, 38)) +>_.isElement : Symbol(Underscore.Static.isElement, Decl(underscoreTest1_underscore.ts, 602, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isElement : Symbol(Underscore.Static.isElement, Decl(underscoreTest1_underscore.ts, 602, 38)) >$ : Symbol($, Decl(underscoreTest1_underscoreTests.ts, 2, 11)) (function () { return _.isArray(arguments); })(); ->_.isArray : Symbol(Underscore.Static.isArray, Decl(underscoreTest1_underscore.ts, 602, 40)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isArray : Symbol(Underscore.Static.isArray, Decl(underscoreTest1_underscore.ts, 602, 40)) +>_.isArray : Symbol(Underscore.Static.isArray, Decl(underscoreTest1_underscore.ts, 603, 40)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isArray : Symbol(Underscore.Static.isArray, Decl(underscoreTest1_underscore.ts, 603, 40)) >arguments : Symbol(arguments) _.isArray([1, 2, 3]); ->_.isArray : Symbol(Underscore.Static.isArray, Decl(underscoreTest1_underscore.ts, 602, 40)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isArray : Symbol(Underscore.Static.isArray, Decl(underscoreTest1_underscore.ts, 602, 40)) +>_.isArray : Symbol(Underscore.Static.isArray, Decl(underscoreTest1_underscore.ts, 603, 40)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isArray : Symbol(Underscore.Static.isArray, Decl(underscoreTest1_underscore.ts, 603, 40)) _.isObject({}); ->_.isObject : Symbol(Underscore.Static.isObject, Decl(underscoreTest1_underscore.ts, 603, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isObject : Symbol(Underscore.Static.isObject, Decl(underscoreTest1_underscore.ts, 603, 38)) +>_.isObject : Symbol(Underscore.Static.isObject, Decl(underscoreTest1_underscore.ts, 604, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isObject : Symbol(Underscore.Static.isObject, Decl(underscoreTest1_underscore.ts, 604, 38)) _.isObject(1); ->_.isObject : Symbol(Underscore.Static.isObject, Decl(underscoreTest1_underscore.ts, 603, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isObject : Symbol(Underscore.Static.isObject, Decl(underscoreTest1_underscore.ts, 603, 38)) +>_.isObject : Symbol(Underscore.Static.isObject, Decl(underscoreTest1_underscore.ts, 604, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isObject : Symbol(Underscore.Static.isObject, Decl(underscoreTest1_underscore.ts, 604, 38)) // (() => { return _.isArguments(arguments); })(1, 2, 3); _.isArguments([1, 2, 3]); ->_.isArguments : Symbol(Underscore.Static.isArguments, Decl(underscoreTest1_underscore.ts, 604, 38)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isArguments : Symbol(Underscore.Static.isArguments, Decl(underscoreTest1_underscore.ts, 604, 38)) +>_.isArguments : Symbol(Underscore.Static.isArguments, Decl(underscoreTest1_underscore.ts, 605, 38)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isArguments : Symbol(Underscore.Static.isArguments, Decl(underscoreTest1_underscore.ts, 605, 38)) _.isFunction(alert); ->_.isFunction : Symbol(Underscore.Static.isFunction, Decl(underscoreTest1_underscore.ts, 605, 42)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isFunction : Symbol(Underscore.Static.isFunction, Decl(underscoreTest1_underscore.ts, 605, 42)) +>_.isFunction : Symbol(Underscore.Static.isFunction, Decl(underscoreTest1_underscore.ts, 606, 42)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isFunction : Symbol(Underscore.Static.isFunction, Decl(underscoreTest1_underscore.ts, 606, 42)) >alert : Symbol(alert, Decl(underscoreTest1_underscoreTests.ts, 2, 14)) _.isString("moe"); ->_.isString : Symbol(Underscore.Static.isString, Decl(underscoreTest1_underscore.ts, 606, 41)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isString : Symbol(Underscore.Static.isString, Decl(underscoreTest1_underscore.ts, 606, 41)) +>_.isString : Symbol(Underscore.Static.isString, Decl(underscoreTest1_underscore.ts, 607, 41)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isString : Symbol(Underscore.Static.isString, Decl(underscoreTest1_underscore.ts, 607, 41)) _.isNumber(8.4 * 5); ->_.isNumber : Symbol(Underscore.Static.isNumber, Decl(underscoreTest1_underscore.ts, 607, 39)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isNumber : Symbol(Underscore.Static.isNumber, Decl(underscoreTest1_underscore.ts, 607, 39)) +>_.isNumber : Symbol(Underscore.Static.isNumber, Decl(underscoreTest1_underscore.ts, 608, 39)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isNumber : Symbol(Underscore.Static.isNumber, Decl(underscoreTest1_underscore.ts, 608, 39)) _.isFinite(-101); ->_.isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 608, 39)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 608, 39)) +>_.isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 609, 39)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 609, 39)) _.isFinite(-Infinity); ->_.isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 608, 39)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 608, 39)) +>_.isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 609, 39)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 609, 39)) >Infinity : Symbol(Infinity, Decl(lib.d.ts, 22, 11)) _.isBoolean(null); ->_.isBoolean : Symbol(Underscore.Static.isBoolean, Decl(underscoreTest1_underscore.ts, 609, 39)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isBoolean : Symbol(Underscore.Static.isBoolean, Decl(underscoreTest1_underscore.ts, 609, 39)) +>_.isBoolean : Symbol(Underscore.Static.isBoolean, Decl(underscoreTest1_underscore.ts, 610, 39)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isBoolean : Symbol(Underscore.Static.isBoolean, Decl(underscoreTest1_underscore.ts, 610, 39)) _.isDate(new Date()); ->_.isDate : Symbol(Underscore.Static.isDate, Decl(underscoreTest1_underscore.ts, 610, 40)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isDate : Symbol(Underscore.Static.isDate, Decl(underscoreTest1_underscore.ts, 610, 40)) +>_.isDate : Symbol(Underscore.Static.isDate, Decl(underscoreTest1_underscore.ts, 611, 40)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isDate : Symbol(Underscore.Static.isDate, Decl(underscoreTest1_underscore.ts, 611, 40)) >Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) _.isRegExp(/moe/); ->_.isRegExp : Symbol(Underscore.Static.isRegExp, Decl(underscoreTest1_underscore.ts, 611, 37)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isRegExp : Symbol(Underscore.Static.isRegExp, Decl(underscoreTest1_underscore.ts, 611, 37)) +>_.isRegExp : Symbol(Underscore.Static.isRegExp, Decl(underscoreTest1_underscore.ts, 612, 37)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isRegExp : Symbol(Underscore.Static.isRegExp, Decl(underscoreTest1_underscore.ts, 612, 37)) _.isNaN(NaN); ->_.isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 612, 39)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 612, 39)) +>_.isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 613, 39)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 613, 39)) >NaN : Symbol(NaN, Decl(lib.d.ts, 21, 11)) isNaN(undefined); @@ -800,34 +800,34 @@ isNaN(undefined); >undefined : Symbol(undefined) _.isNaN(undefined); ->_.isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 612, 39)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 612, 39)) +>_.isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 613, 39)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 613, 39)) >undefined : Symbol(undefined) _.isNull(null); ->_.isNull : Symbol(Underscore.Static.isNull, Decl(underscoreTest1_underscore.ts, 613, 36)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isNull : Symbol(Underscore.Static.isNull, Decl(underscoreTest1_underscore.ts, 613, 36)) +>_.isNull : Symbol(Underscore.Static.isNull, Decl(underscoreTest1_underscore.ts, 614, 36)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isNull : Symbol(Underscore.Static.isNull, Decl(underscoreTest1_underscore.ts, 614, 36)) _.isNull(undefined); ->_.isNull : Symbol(Underscore.Static.isNull, Decl(underscoreTest1_underscore.ts, 613, 36)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isNull : Symbol(Underscore.Static.isNull, Decl(underscoreTest1_underscore.ts, 613, 36)) +>_.isNull : Symbol(Underscore.Static.isNull, Decl(underscoreTest1_underscore.ts, 614, 36)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isNull : Symbol(Underscore.Static.isNull, Decl(underscoreTest1_underscore.ts, 614, 36)) >undefined : Symbol(undefined) _.isUndefined((null).missingVariable); ->_.isUndefined : Symbol(Underscore.Static.isUndefined, Decl(underscoreTest1_underscore.ts, 614, 37)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->isUndefined : Symbol(Underscore.Static.isUndefined, Decl(underscoreTest1_underscore.ts, 614, 37)) +>_.isUndefined : Symbol(Underscore.Static.isUndefined, Decl(underscoreTest1_underscore.ts, 615, 37)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>isUndefined : Symbol(Underscore.Static.isUndefined, Decl(underscoreTest1_underscore.ts, 615, 37)) /////////////////////////////////////////////////////////////////////////////////////// var underscore = _.noConflict(); >underscore : Symbol(underscore, Decl(underscoreTest1_underscoreTests.ts, 211, 3)) ->_.noConflict : Symbol(Underscore.Static.noConflict, Decl(underscoreTest1_underscore.ts, 615, 41)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->noConflict : Symbol(Underscore.Static.noConflict, Decl(underscoreTest1_underscore.ts, 615, 41)) +>_.noConflict : Symbol(Underscore.Static.noConflict, Decl(underscoreTest1_underscore.ts, 616, 41)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>noConflict : Symbol(Underscore.Static.noConflict, Decl(underscoreTest1_underscore.ts, 616, 41)) var moe2 = { name: 'moe' }; >moe2 : Symbol(moe2, Decl(underscoreTest1_underscoreTests.ts, 213, 3)) @@ -835,31 +835,31 @@ var moe2 = { name: 'moe' }; moe2 === _.identity(moe); >moe2 : Symbol(moe2, Decl(underscoreTest1_underscoreTests.ts, 213, 3)) ->_.identity : Symbol(Underscore.Static.identity, Decl(underscoreTest1_underscore.ts, 617, 29)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->identity : Symbol(Underscore.Static.identity, Decl(underscoreTest1_underscore.ts, 617, 29)) +>_.identity : Symbol(Underscore.Static.identity, Decl(underscoreTest1_underscore.ts, 618, 29)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>identity : Symbol(Underscore.Static.identity, Decl(underscoreTest1_underscore.ts, 618, 29)) >moe : Symbol(moe, Decl(underscoreTest1_underscoreTests.ts, 164, 3)) var genie; >genie : Symbol(genie, Decl(underscoreTest1_underscoreTests.ts, 216, 3)) _.times(3, function (n) { genie.grantWishNumber(n); }); ->_.times : Symbol(Underscore.Static.times, Decl(underscoreTest1_underscore.ts, 619, 33)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->times : Symbol(Underscore.Static.times, Decl(underscoreTest1_underscore.ts, 619, 33)) +>_.times : Symbol(Underscore.Static.times, Decl(underscoreTest1_underscore.ts, 620, 33)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>times : Symbol(Underscore.Static.times, Decl(underscoreTest1_underscore.ts, 620, 33)) >n : Symbol(n, Decl(underscoreTest1_underscoreTests.ts, 218, 21)) >genie : Symbol(genie, Decl(underscoreTest1_underscoreTests.ts, 216, 3)) >n : Symbol(n, Decl(underscoreTest1_underscoreTests.ts, 218, 21)) _.random(0, 100); ->_.random : Symbol(Underscore.Static.random, Decl(underscoreTest1_underscore.ts, 621, 79), Decl(underscoreTest1_underscore.ts, 623, 36)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->random : Symbol(Underscore.Static.random, Decl(underscoreTest1_underscore.ts, 621, 79), Decl(underscoreTest1_underscore.ts, 623, 36)) +>_.random : Symbol(Underscore.Static.random, Decl(underscoreTest1_underscore.ts, 622, 79), Decl(underscoreTest1_underscore.ts, 624, 36)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>random : Symbol(Underscore.Static.random, Decl(underscoreTest1_underscore.ts, 622, 79), Decl(underscoreTest1_underscore.ts, 624, 36)) _.mixin({ ->_.mixin : Symbol(Underscore.Static.mixin, Decl(underscoreTest1_underscore.ts, 624, 49)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->mixin : Symbol(Underscore.Static.mixin, Decl(underscoreTest1_underscore.ts, 624, 49)) +>_.mixin : Symbol(Underscore.Static.mixin, Decl(underscoreTest1_underscore.ts, 625, 49)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>mixin : Symbol(Underscore.Static.mixin, Decl(underscoreTest1_underscore.ts, 625, 49)) capitalize: function (string) { >capitalize : Symbol(capitalize, Decl(underscoreTest1_underscoreTests.ts, 222, 9)) @@ -871,17 +871,17 @@ _.mixin({ } }); (_("fabio")).capitalize(); ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) _.uniqueId('contact_'); ->_.uniqueId : Symbol(Underscore.Static.uniqueId, Decl(underscoreTest1_underscore.ts, 626, 33), Decl(underscoreTest1_underscore.ts, 628, 27)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->uniqueId : Symbol(Underscore.Static.uniqueId, Decl(underscoreTest1_underscore.ts, 626, 33), Decl(underscoreTest1_underscore.ts, 628, 27)) +>_.uniqueId : Symbol(Underscore.Static.uniqueId, Decl(underscoreTest1_underscore.ts, 627, 33), Decl(underscoreTest1_underscore.ts, 629, 27)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>uniqueId : Symbol(Underscore.Static.uniqueId, Decl(underscoreTest1_underscore.ts, 627, 33), Decl(underscoreTest1_underscore.ts, 629, 27)) _.escape('Curly, Larry & Moe'); ->_.escape : Symbol(Underscore.Static.escape, Decl(underscoreTest1_underscore.ts, 629, 41)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->escape : Symbol(Underscore.Static.escape, Decl(underscoreTest1_underscore.ts, 629, 41)) +>_.escape : Symbol(Underscore.Static.escape, Decl(underscoreTest1_underscore.ts, 630, 41)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>escape : Symbol(Underscore.Static.escape, Decl(underscoreTest1_underscore.ts, 630, 41)) var object = { cheese: 'crumpets', stuff: function () { return 'nonsense'; } }; >object : Symbol(object, Decl(underscoreTest1_underscoreTests.ts, 233, 3)) @@ -889,22 +889,22 @@ var object = { cheese: 'crumpets', stuff: function () { return 'nonsense'; } }; >stuff : Symbol(stuff, Decl(underscoreTest1_underscoreTests.ts, 233, 34)) _.result(object, 'cheese'); ->_.result : Symbol(Underscore.Static.result, Decl(underscoreTest1_underscore.ts, 633, 36)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->result : Symbol(Underscore.Static.result, Decl(underscoreTest1_underscore.ts, 633, 36)) +>_.result : Symbol(Underscore.Static.result, Decl(underscoreTest1_underscore.ts, 634, 36)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>result : Symbol(Underscore.Static.result, Decl(underscoreTest1_underscore.ts, 634, 36)) >object : Symbol(object, Decl(underscoreTest1_underscoreTests.ts, 233, 3)) _.result(object, 'stuff'); ->_.result : Symbol(Underscore.Static.result, Decl(underscoreTest1_underscore.ts, 633, 36)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->result : Symbol(Underscore.Static.result, Decl(underscoreTest1_underscore.ts, 633, 36)) +>_.result : Symbol(Underscore.Static.result, Decl(underscoreTest1_underscore.ts, 634, 36)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>result : Symbol(Underscore.Static.result, Decl(underscoreTest1_underscore.ts, 634, 36)) >object : Symbol(object, Decl(underscoreTest1_underscoreTests.ts, 233, 3)) var compiled = _.template("hello: <%= name %>"); >compiled : Symbol(compiled, Decl(underscoreTest1_underscoreTests.ts, 238, 3)) ->_.template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 637, 43), Decl(underscoreTest1_underscore.ts, 639, 64)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 637, 43), Decl(underscoreTest1_underscore.ts, 639, 64)) +>_.template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 638, 43), Decl(underscoreTest1_underscore.ts, 640, 64)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 638, 43), Decl(underscoreTest1_underscore.ts, 640, 64)) compiled({ name: 'moe' }); >compiled : Symbol(compiled, Decl(underscoreTest1_underscoreTests.ts, 238, 3)) @@ -914,17 +914,17 @@ var list2 = "<% _.each(people, function(name) { %>
  • <%= name %>
  • <% }); % >list2 : Symbol(list2, Decl(underscoreTest1_underscoreTests.ts, 240, 3)) _.template(list2, { people: ['moe', 'curly', 'larry'] }); ->_.template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 637, 43), Decl(underscoreTest1_underscore.ts, 639, 64)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 637, 43), Decl(underscoreTest1_underscore.ts, 639, 64)) +>_.template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 638, 43), Decl(underscoreTest1_underscore.ts, 640, 64)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 638, 43), Decl(underscoreTest1_underscore.ts, 640, 64)) >list2 : Symbol(list2, Decl(underscoreTest1_underscoreTests.ts, 240, 3)) >people : Symbol(people, Decl(underscoreTest1_underscoreTests.ts, 241, 19)) var template = _.template("<%- value %>"); >template : Symbol(template, Decl(underscoreTest1_underscoreTests.ts, 242, 3)) ->_.template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 637, 43), Decl(underscoreTest1_underscore.ts, 639, 64)) ->_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 644, 11)) ->template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 637, 43), Decl(underscoreTest1_underscore.ts, 639, 64)) +>_.template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 638, 43), Decl(underscoreTest1_underscore.ts, 640, 64)) +>_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) +>template : Symbol(Underscore.Static.template, Decl(underscoreTest1_underscore.ts, 638, 43), Decl(underscoreTest1_underscore.ts, 640, 64)) template({ value: '