From c371f1e521eb9cf580bba6e502418a60a542da2c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 8 Mar 2015 18:23:23 -0700 Subject: [PATCH] Make the preservation of formatting an optional experimental compiler flag. --- src/compiler/commandLineParser.ts | 6 + .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 4 + src/compiler/emitter.ts | 24 +- src/compiler/types.ts | 1 + src/harness/harness.ts | 4 + tests/baselines/reference/2dArrays.js | 4 +- .../baselines/reference/APISample_compile.js | 7 +- .../reference/APISample_compile.types | 3 + tests/baselines/reference/APISample_linter.js | 4 +- .../reference/APISample_linter.types | 3 + .../reference/APISample_transform.js | 37 +- .../reference/APISample_transform.types | 3 + .../baselines/reference/APISample_watcher.js | 43 +- .../reference/APISample_watcher.types | 3 + ...entFunctionWithTheSameNameAndCommonRoot.js | 5 +- .../reference/ArrowFunctionExpression1.js | 3 +- ...hModuleMemberThatUsesClassTypeParameter.js | 7 +- ...GenericClassStaticFunctionOfTheSameName.js | 3 +- ...GenericClassStaticFunctionOfTheSameName.js | 3 +- ...dStaticFunctionUsingClassPrivateStatics.js | 4 +- ...nctionAndExportedFunctionThatShareAName.js | 22 +- ...ionAndNonExportedFunctionThatShareAName.js | 22 +- ...ticVariableAndExportedVarThatShareAName.js | 10 +- ...VariableAndNonExportedVarThatShareAName.js | 10 +- .../baselines/reference/ClassDeclaration11.js | 3 +- .../baselines/reference/ClassDeclaration13.js | 3 +- .../baselines/reference/ClassDeclaration21.js | 3 +- .../baselines/reference/ClassDeclaration22.js | 3 +- .../baselines/reference/ES5SymbolProperty2.js | 3 +- .../baselines/reference/ES5SymbolProperty3.js | 3 +- .../baselines/reference/ES5SymbolProperty4.js | 3 +- .../baselines/reference/ES5SymbolProperty5.js | 3 +- .../baselines/reference/ES5SymbolProperty6.js | 3 +- .../baselines/reference/ES5SymbolProperty7.js | 3 +- ...sClassHeritageListMemberTypeAnnotations.js | 11 +- ...accessibleTypeInTypeParameterConstraint.js | 11 +- ...TypesInParameterAndReturnTypeAnnotation.js | 5 +- ...ccessibleTypesInParameterTypeAnnotation.js | 5 +- ...InaccessibleTypesInReturnTypeAnnotation.js | 5 +- ...sClassHeritageListMemberTypeAnnotations.js | 11 +- ...accessibleTypeInTypeParameterConstraint.js | 11 +- ...WithAccessibleTypesOnItsExportedMembers.js | 5 +- ...hAccessibleTypesInMemberTypeAnnotations.js | 10 +- ...iableWithAccessibleTypeInTypeAnnotation.js | 5 +- ...bleWithInaccessibleTypeInTypeAnnotation.js | 11 +- ...ctionAndModuleWithSameNameAndCommonRoot.js | 20 +- ...oduleWithSameNameAndDifferentCommonRoot.js | 10 +- .../reference/FunctionDeclaration10_es6.js | 4 +- .../reference/FunctionDeclaration12_es6.js | 3 +- .../reference/FunctionDeclaration4.js | 3 +- .../reference/FunctionDeclaration6.js | 3 +- .../reference/FunctionExpression1_es6.js | 3 +- .../reference/FunctionExpression2_es6.js | 3 +- .../FunctionPropertyAssignments1_es6.js | 5 +- .../FunctionPropertyAssignments2_es6.js | 5 +- .../FunctionPropertyAssignments3_es6.js | 5 +- .../FunctionPropertyAssignments4_es6.js | 4 +- .../FunctionPropertyAssignments5_es6.js | 3 +- .../FunctionPropertyAssignments6_es6.js | 5 +- .../reference/MemberAccessorDeclaration15.js | 3 +- .../MemberFunctionDeclaration1_es6.js | 3 +- .../MemberFunctionDeclaration2_es6.js | 3 +- .../MemberFunctionDeclaration3_es6.js | 3 +- .../MemberFunctionDeclaration4_es6.js | 3 +- .../MemberFunctionDeclaration7_es6.js | 3 +- ...uleAndFunctionWithSameNameAndCommonRoot.js | 20 +- ...leWithExportedAndNonExportedImportAlias.js | 10 +- tests/baselines/reference/Protected4.js | 3 +- tests/baselines/reference/Protected5.js | 3 +- tests/baselines/reference/Protected6.js | 3 +- tests/baselines/reference/Protected7.js | 3 +- ...ortedAndNonExportedClassesOfTheSameName.js | 5 +- ...tedAndNonExportedLocalVarsOfTheSameName.js | 15 +- ...eEachWithExportedLocalVarsOfTheSameName.js | 15 +- ...esWithTheSameNameAndDifferentCommonRoot.js | 10 +- ...ModulesWithTheSameNameAndSameCommonRoot.js | 15 +- .../reference/YieldExpression10_es6.js | 3 +- .../reference/YieldExpression13_es6.js | 4 +- .../reference/YieldExpression17_es6.js | 6 +- .../reference/accessibilityModifiers.js | 70 +- .../accessorParameterAccessibilityModifier.js | 6 +- tests/baselines/reference/accessorWithES3.js | 7 +- tests/baselines/reference/accessorWithES5.js | 7 +- .../reference/accessorWithoutBody1.js | 4 +- .../reference/accessorWithoutBody2.js | 4 +- .../accessorsAreNotContextuallyTyped.js | 4 +- .../reference/accessorsNotAllowedInES3.js | 10 +- .../accessors_spec_section-4.5_error-cases.js | 30 +- .../accessors_spec_section-4.5_inference.js | 42 +- .../additionOperatorWithAnyAndEveryType.js | 14 +- .../additionOperatorWithInvalidOperands.js | 6 +- ...OperatorWithNullValueAndInvalidOperator.js | 11 +- .../additionOperatorWithStringAndEveryType.js | 4 +- .../additionOperatorWithTypeParameter.js | 3 +- ...torWithUndefinedValueAndInvalidOperands.js | 11 +- .../baselines/reference/aliasUsageInArray.js | 8 +- .../aliasUsageInFunctionExpression.js | 8 +- .../reference/aliasUsageInGenericFunction.js | 8 +- .../reference/aliasUsageInObjectLiteral.js | 14 +- .../reference/aliasUsageInOrExpression.js | 8 +- .../reference/aliasUsedAsNameValue.js | 4 +- .../ambientClassOverloadForFunction.js | 4 +- .../reference/ambiguousGenericAssertion1.js | 8 +- .../baselines/reference/ambiguousOverload.js | 8 +- tests/baselines/reference/anonterface.js | 4 +- .../anyAssignabilityInInheritance.js | 3 +- .../reference/anyAssignableToEveryType2.js | 3 +- tests/baselines/reference/anyDeclare.js | 3 +- .../reference/anyIdenticalToItself.js | 3 +- .../anyInferenceAnonymousFunctions.js | 12 +- .../reference/arrayAssignmentTest1.js | 24 +- .../reference/arrayAssignmentTest2.js | 28 +- .../reference/arrayAssignmentTest4.js | 12 +- tests/baselines/reference/arrayAugment.js | 4 +- .../reference/arrayBestCommonTypes.js | 364 +- tests/baselines/reference/arrayCast.js | 13 +- tests/baselines/reference/arrayConcatMap.js | 13 +- tests/baselines/reference/arrayLiteral.js | 18 +- tests/baselines/reference/arrayLiteral1.js | 5 +- tests/baselines/reference/arrayLiteral2.js | 5 +- .../reference/arrayLiteralContextualType.js | 11 +- .../baselines/reference/arrayLiteralSpread.js | 16 +- .../reference/arrayLiteralTypeInference.js | 20 +- .../reference/arrayLiteralWidened.js | 47 +- ...arrayLiteralWithMultipleBestCommonTypes.js | 52 +- tests/baselines/reference/arrayLiterals.js | 97 +- .../arrayLiteralsWithRecursiveGenerics.js | 20 +- .../reference/arrayOfFunctionTypes3.js | 25 +- .../arrayReferenceWithoutTypeArgs.js | 3 +- tests/baselines/reference/arraySigChecking.js | 15 +- .../reference/arrowFunctionContexts.js | 98 +- .../reference/arrowFunctionExpressions.js | 83 +- .../arrowFunctionInConstructorArgument1.js | 4 +- .../arrowFunctionInExpressionStatement1.js | 4 +- .../arrowFunctionInExpressionStatement2.js | 4 +- .../arrowFunctionMissingCurlyWithSemicolon.js | 4 +- .../arrowFunctionWithObjectLiteralBody1.js | 4 +- .../arrowFunctionWithObjectLiteralBody2.js | 4 +- .../arrowFunctionWithObjectLiteralBody5.js | 28 +- .../arrowFunctionWithObjectLiteralBody6.js | 20 +- .../reference/arrowFunctionsMissingTokens.js | 54 +- tests/baselines/reference/asiArith.js | 6 +- tests/baselines/reference/assign1.js | 5 +- .../reference/assignEveryTypeToAny.js | 12 +- .../assignLambdaToNominalSubtypeOfFunction.js | 11 +- .../reference/assignToExistingClass.js | 4 +- tests/baselines/reference/assignToFn.js | 6 +- .../baselines/reference/assignmentCompat1.js | 4 +- .../reference/assignmentCompatBug2.js | 57 +- .../reference/assignmentCompatBug3.js | 11 +- .../reference/assignmentCompatBug5.js | 25 +- .../reference/assignmentCompatForEnums.js | 4 +- ...signmentCompatFunctionsWithOptionalArgs.js | 18 +- ...CompatInterfaceWithStringIndexSignature.js | 6 +- .../reference/assignmentCompatOnNew.js | 3 +- .../assignmentCompatWithCallSignatures.js | 40 +- .../assignmentCompatWithCallSignatures2.js | 74 +- ...ithCallSignaturesWithOptionalParameters.js | 72 +- ...patWithCallSignaturesWithRestParameters.js | 84 +- ...assignmentCompatWithConstructSignatures.js | 16 +- ...ssignmentCompatWithConstructSignatures2.js | 32 +- ...ricCallSignaturesWithOptionalParameters.js | 144 +- .../assignmentCompatWithObjectMembers.js | 16 +- .../assignmentCompatWithObjectMembers2.js | 8 +- .../assignmentCompatWithObjectMembers3.js | 8 +- .../assignmentCompatWithObjectMembers4.js | 16 +- ...mentCompatWithObjectMembersNumericNames.js | 8 +- ...nmentCompatWithObjectMembersOptionality.js | 8 +- ...mentCompatWithObjectMembersOptionality2.js | 8 +- ...mpatWithObjectMembersStringNumericNames.js | 16 +- .../assignmentCompatWithOverloads.js | 16 +- .../reference/assignmentCompatability1.js | 4 +- .../reference/assignmentCompatability10.js | 4 +- .../reference/assignmentCompatability11.js | 8 +- .../reference/assignmentCompatability12.js | 8 +- .../reference/assignmentCompatability13.js | 8 +- .../reference/assignmentCompatability14.js | 8 +- .../reference/assignmentCompatability15.js | 8 +- .../reference/assignmentCompatability16.js | 10 +- .../reference/assignmentCompatability17.js | 10 +- .../reference/assignmentCompatability18.js | 10 +- .../reference/assignmentCompatability19.js | 10 +- .../reference/assignmentCompatability2.js | 4 +- .../reference/assignmentCompatability20.js | 10 +- .../reference/assignmentCompatability21.js | 10 +- .../reference/assignmentCompatability22.js | 10 +- .../reference/assignmentCompatability23.js | 10 +- .../reference/assignmentCompatability24.js | 8 +- .../reference/assignmentCompatability25.js | 4 +- .../reference/assignmentCompatability26.js | 4 +- .../reference/assignmentCompatability27.js | 4 +- .../reference/assignmentCompatability28.js | 4 +- .../reference/assignmentCompatability29.js | 4 +- .../reference/assignmentCompatability3.js | 8 +- .../reference/assignmentCompatability30.js | 4 +- .../reference/assignmentCompatability31.js | 4 +- .../reference/assignmentCompatability32.js | 4 +- .../reference/assignmentCompatability33.js | 4 +- .../reference/assignmentCompatability34.js | 4 +- .../reference/assignmentCompatability35.js | 4 +- .../reference/assignmentCompatability36.js | 4 +- .../reference/assignmentCompatability37.js | 4 +- .../reference/assignmentCompatability38.js | 4 +- .../reference/assignmentCompatability39.js | 4 +- .../reference/assignmentCompatability4.js | 4 +- .../reference/assignmentCompatability40.js | 4 +- .../reference/assignmentCompatability41.js | 4 +- .../reference/assignmentCompatability42.js | 4 +- .../reference/assignmentCompatability43.js | 9 +- .../reference/assignmentCompatability5.js | 8 +- .../reference/assignmentCompatability6.js | 4 +- .../reference/assignmentCompatability7.js | 8 +- .../reference/assignmentCompatability8.js | 4 +- .../reference/assignmentCompatability9.js | 4 +- ...-apply-member-off-of-function-interface.js | 17 +- ...g-call-member-off-of-function-interface.js | 17 +- .../reference/assignmentLHSIsValue.js | 29 +- .../assignmentStricterConstraints.js | 3 +- .../reference/assignmentToFunction.js | 7 +- .../baselines/reference/assignmentToObject.js | 4 +- .../assignmentToObjectAndFunction.js | 16 +- .../assignmentToParenthesizedIdentifiers.js | 47 +- .../reference/assignmentToReferenceTypes.js | 3 +- tests/baselines/reference/assignments.js | 3 +- ...entedTypeAssignmentCompatIndexSignature.js | 3 +- ...ugmentedTypeBracketAccessIndexSignature.js | 3 +- ...augmentedTypeBracketNamedPropertyAccess.js | 3 +- .../reference/augmentedTypesClass.js | 6 +- .../reference/augmentedTypesClass2a.js | 9 +- .../reference/augmentedTypesClass3.js | 12 +- .../reference/augmentedTypesClass4.js | 6 +- .../baselines/reference/augmentedTypesEnum.js | 9 +- .../augmentedTypesExternalModule1.js | 3 +- .../reference/augmentedTypesFunction.js | 39 +- .../reference/augmentedTypesModules.js | 39 +- .../reference/augmentedTypesModules2.js | 24 +- .../reference/augmentedTypesModules3.js | 3 +- .../reference/augmentedTypesModules3b.js | 9 +- .../reference/augmentedTypesModules4.js | 3 +- .../baselines/reference/augmentedTypesVar.js | 9 +- tests/baselines/reference/autoLift2.js | 14 +- tests/baselines/reference/autolift3.js | 3 +- .../bestCommonTypeOfConditionalExpressions.js | 12 +- .../reference/bestCommonTypeOfTuple.js | 33 +- .../bestCommonTypeReturnStatement.js | 8 +- .../bestCommonTypeWithContextualTyping.js | 8 +- .../bestCommonTypeWithOptionalProperties.js | 36 +- .../bitwiseNotOperatorInvalidOperations.js | 6 +- .../bitwiseNotOperatorWithAnyOtherType.js | 11 +- .../bitwiseNotOperatorWithBooleanType.js | 13 +- .../bitwiseNotOperatorWithNumberType.js | 25 +- .../bitwiseNotOperatorWithStringType.js | 25 +- ...ctionWithIncorrectNumberOfTypeArguments.js | 8 +- ...allGenericFunctionWithZeroTypeArguments.js | 8 +- ...callNonGenericFunctionWithTypeArguments.js | 8 +- tests/baselines/reference/callOverloads1.js | 7 +- tests/baselines/reference/callOverloads2.js | 11 +- tests/baselines/reference/callOverloads3.js | 3 +- tests/baselines/reference/callOverloads4.js | 3 +- tests/baselines/reference/callOverloads5.js | 3 +- .../callSignatureWithoutAnnotationsOrBody.js | 3 +- ...ureWithoutReturnTypeAnnotationInference.js | 8 +- ...sWithAccessibilityModifiersOnParameters.js | 48 +- .../callSignaturesWithDuplicateParameters.js | 48 +- .../callSignaturesWithOptionalParameters.js | 21 +- .../callSignaturesWithOptionalParameters2.js | 12 +- tests/baselines/reference/callWithSpread.js | 6 +- .../baselines/reference/callWithSpreadES6.js | 6 +- .../callWithWrongNumberOfTypeArguments.js | 3 +- .../reference/callbacksDontShareTypes.js | 12 +- .../reference/captureThisInSuperCall.js | 9 +- .../reference/castExpressionParentheses.js | 15 +- tests/baselines/reference/castTest.js | 4 +- tests/baselines/reference/castingTuple.js | 31 +- tests/baselines/reference/catch.js | 12 +- ...arameterConstrainedToOtherTypeParameter.js | 10 +- ...rameterConstrainedToOtherTypeParameter2.js | 52 +- .../baselines/reference/chainedImportAlias.js | 3 +- ...hainedSpecializationToObjectTypeLiteral.js | 8 +- .../reference/classBodyWithStatements.js | 3 +- tests/baselines/reference/classExpression.js | 4 +- .../reference/classExtendingClass.js | 12 +- .../reference/classExtendingPrimitive.js | 3 +- .../reference/classExtendingPrimitive2.js | 3 +- .../reference/classExtendsEveryObjectType.js | 9 +- .../reference/classExtendsEveryObjectType2.js | 6 +- ...sInterfaceThatExtendsClassWithPrivates1.js | 12 +- .../classExtendsValidConstructorFunction.js | 3 +- .../reference/classImplementsClass2.js | 4 +- .../reference/classImplementsClass3.js | 4 +- .../reference/classImplementsClass4.js | 4 +- .../reference/classImplementsClass5.js | 4 +- .../reference/classImplementsClass6.js | 4 +- .../classImplementsImportedInterface.js | 3 +- .../reference/classMethodWithKeywordName1.js | 3 +- tests/baselines/reference/classOrder2.js | 7 +- .../reference/classOverloadForFunction.js | 3 +- .../reference/classPropertyAsPrivate.js | 20 +- .../reference/classPropertyAsProtected.js | 20 +- .../classPropertyIsPublicByDefault.js | 20 +- .../reference/classSideInheritance1.js | 4 +- .../baselines/reference/classWithEmptyBody.js | 14 +- .../reference/classWithMultipleBaseClasses.js | 12 +- ...hOnlyPublicMembersEquivalentToInterface.js | 11 +- ...OnlyPublicMembersEquivalentToInterface2.js | 11 +- .../reference/classWithOptionalParameter.js | 6 +- ...ssWithOverloadImplementationOfWrongName.js | 3 +- ...sWithOverloadImplementationOfWrongName2.js | 3 +- .../reference/classWithPrivateProperty.js | 16 +- .../reference/classWithProtectedProperty.js | 16 +- .../reference/classWithPublicProperty.js | 16 +- .../reference/classWithStaticMembers.js | 11 +- tests/baselines/reference/classdecl.js | 8 +- .../cloduleAcrossModuleDefinitions.js | 6 +- tests/baselines/reference/cloduleTest1.js | 3 +- .../reference/cloduleWithDuplicateMember1.js | 13 +- .../reference/cloduleWithDuplicateMember2.js | 9 +- .../reference/clodulesDerivedClasses.js | 4 +- .../reference/collisionSuperAndParameter.js | 20 +- ...collisionThisExpressionAndAliasInGlobal.js | 4 +- ...onThisExpressionAndAmbientClassInGlobal.js | 4 +- ...sionThisExpressionAndAmbientVarInGlobal.js | 4 +- ...collisionThisExpressionAndClassInGlobal.js | 4 +- .../collisionThisExpressionAndEnumInGlobal.js | 4 +- ...lisionThisExpressionAndFunctionInGlobal.js | 4 +- ...ionThisExpressionAndLocalVarInAccessors.js | 36 +- ...nThisExpressionAndLocalVarInConstructor.js | 18 +- ...sionThisExpressionAndLocalVarInFunction.js | 4 +- ...lisionThisExpressionAndLocalVarInLambda.js | 14 +- ...lisionThisExpressionAndLocalVarInMethod.js | 18 +- ...sionThisExpressionAndLocalVarInProperty.js | 18 +- ...xpressionAndLocalVarWithSuperExperssion.js | 4 +- ...ollisionThisExpressionAndModuleInGlobal.js | 4 +- ...ollisionThisExpressionAndNameResolution.js | 4 +- .../collisionThisExpressionAndParameter.js | 40 +- ...ionAndPropertyNameAsConstuctorParameter.js | 16 +- .../collisionThisExpressionAndVarInGlobal.js | 4 +- .../commaOperatorWithSecondOperandAnyType.js | 10 +- ...mmaOperatorWithSecondOperandBooleanType.js | 24 +- ...ommaOperatorWithSecondOperandObjectType.js | 5 +- ...ommaOperatorWithSecondOperandStringType.js | 10 +- .../reference/commentEmitAtEndOfFile1.js | 3 +- .../reference/commentInMethodCall.js | 3 +- tests/baselines/reference/commentOnBlock1.js | 3 +- .../reference/commentOnClassAccessor1.js | 4 +- .../reference/commentOnClassAccessor2.js | 7 +- .../commentsBeforeFunctionExpression1.js | 4 +- tests/baselines/reference/commentsFunction.js | 20 +- .../baselines/reference/commentsInterface.js | 4 +- .../reference/commentsOnObjectLiteral3.js | 3 +- tests/baselines/reference/commentsVarDecl.js | 4 +- .../reference/complexClassRelationships.js | 10 +- .../reference/compositeGenericFunction.js | 8 +- .../reference/compoundAssignmentLHSIsValue.js | 28 +- .../reference/computedPropertyNames10_ES5.js | 33 +- .../reference/computedPropertyNames10_ES6.js | 33 +- .../reference/computedPropertyNames11_ES5.js | 83 +- .../reference/computedPropertyNames11_ES6.js | 39 +- .../reference/computedPropertyNames13_ES5.js | 33 +- .../reference/computedPropertyNames13_ES6.js | 33 +- .../reference/computedPropertyNames14_ES5.js | 18 +- .../reference/computedPropertyNames14_ES6.js | 18 +- .../reference/computedPropertyNames15_ES5.js | 9 +- .../reference/computedPropertyNames15_ES6.js | 9 +- .../reference/computedPropertyNames16_ES5.js | 39 +- .../reference/computedPropertyNames16_ES6.js | 39 +- .../reference/computedPropertyNames17_ES5.js | 21 +- .../reference/computedPropertyNames17_ES6.js | 21 +- .../reference/computedPropertyNames1_ES5.js | 15 +- .../reference/computedPropertyNames1_ES6.js | 7 +- .../reference/computedPropertyNames21_ES5.js | 3 +- .../reference/computedPropertyNames21_ES6.js | 3 +- .../reference/computedPropertyNames22_ES5.js | 3 +- .../reference/computedPropertyNames22_ES6.js | 3 +- .../reference/computedPropertyNames23_ES5.js | 3 +- .../reference/computedPropertyNames23_ES6.js | 5 +- .../reference/computedPropertyNames24_ES5.js | 3 +- .../reference/computedPropertyNames24_ES6.js | 3 +- .../reference/computedPropertyNames25_ES5.js | 3 +- .../reference/computedPropertyNames25_ES6.js | 3 +- .../reference/computedPropertyNames26_ES5.js | 3 +- .../reference/computedPropertyNames26_ES6.js | 5 +- .../reference/computedPropertyNames27_ES5.js | 3 +- .../reference/computedPropertyNames27_ES6.js | 3 +- .../reference/computedPropertyNames28_ES5.js | 3 +- .../reference/computedPropertyNames28_ES6.js | 3 +- .../reference/computedPropertyNames29_ES5.js | 3 +- .../reference/computedPropertyNames29_ES6.js | 3 +- .../reference/computedPropertyNames2_ES5.js | 18 +- .../reference/computedPropertyNames2_ES6.js | 18 +- .../reference/computedPropertyNames30_ES5.js | 3 +- .../reference/computedPropertyNames30_ES6.js | 3 +- .../reference/computedPropertyNames31_ES5.js | 3 +- .../reference/computedPropertyNames31_ES6.js | 3 +- .../reference/computedPropertyNames32_ES5.js | 7 +- .../reference/computedPropertyNames32_ES6.js | 7 +- .../reference/computedPropertyNames33_ES5.js | 7 +- .../reference/computedPropertyNames33_ES6.js | 7 +- .../reference/computedPropertyNames34_ES5.js | 7 +- .../reference/computedPropertyNames34_ES6.js | 7 +- .../reference/computedPropertyNames35_ES5.js | 4 +- .../reference/computedPropertyNames35_ES6.js | 4 +- .../reference/computedPropertyNames36_ES5.js | 7 +- .../reference/computedPropertyNames36_ES6.js | 7 +- .../reference/computedPropertyNames37_ES5.js | 7 +- .../reference/computedPropertyNames37_ES6.js | 7 +- .../reference/computedPropertyNames38_ES5.js | 7 +- .../reference/computedPropertyNames38_ES6.js | 7 +- .../reference/computedPropertyNames39_ES5.js | 7 +- .../reference/computedPropertyNames39_ES6.js | 7 +- .../reference/computedPropertyNames3_ES5.js | 24 +- .../reference/computedPropertyNames3_ES6.js | 24 +- .../reference/computedPropertyNames40_ES5.js | 8 +- .../reference/computedPropertyNames40_ES6.js | 8 +- .../reference/computedPropertyNames41_ES5.js | 4 +- .../reference/computedPropertyNames41_ES6.js | 4 +- .../reference/computedPropertyNames43_ES5.js | 7 +- .../reference/computedPropertyNames43_ES6.js | 7 +- .../reference/computedPropertyNames44_ES5.js | 7 +- .../reference/computedPropertyNames44_ES6.js | 7 +- .../reference/computedPropertyNames45_ES5.js | 7 +- .../reference/computedPropertyNames45_ES6.js | 7 +- .../reference/computedPropertyNames49_ES5.js | 32 +- .../reference/computedPropertyNames50_ES5.js | 32 +- .../reference/computedPropertyNames9_ES5.js | 3 +- .../reference/computedPropertyNames9_ES6.js | 3 +- ...omputedPropertyNamesContextualType1_ES5.js | 8 +- ...omputedPropertyNamesContextualType1_ES6.js | 4 +- ...omputedPropertyNamesContextualType2_ES5.js | 8 +- ...omputedPropertyNamesContextualType2_ES6.js | 4 +- ...omputedPropertyNamesContextualType3_ES5.js | 8 +- ...omputedPropertyNamesContextualType3_ES6.js | 4 +- ...omputedPropertyNamesContextualType6_ES5.js | 10 +- ...omputedPropertyNamesContextualType6_ES6.js | 7 +- ...omputedPropertyNamesContextualType7_ES5.js | 10 +- ...omputedPropertyNamesContextualType7_ES6.js | 7 +- ...mputedPropertyNamesDeclarationEmit1_ES5.js | 10 +- ...mputedPropertyNamesDeclarationEmit1_ES6.js | 10 +- ...mputedPropertyNamesDeclarationEmit2_ES5.js | 10 +- ...mputedPropertyNamesDeclarationEmit2_ES6.js | 10 +- ...mputedPropertyNamesDeclarationEmit5_ES5.js | 18 +- ...mputedPropertyNamesDeclarationEmit5_ES6.js | 10 +- .../computedPropertyNamesOnOverloads_ES5.js | 3 +- .../computedPropertyNamesOnOverloads_ES6.js | 3 +- tests/baselines/reference/concatError.js | 4 +- .../conditionalExpressionNewLine10.js | 8 +- .../conditionalExpressionNewLine2.js | 3 +- .../conditionalExpressionNewLine3.js | 3 +- .../conditionalExpressionNewLine4.js | 3 +- .../conditionalExpressionNewLine5.js | 3 +- .../conditionalExpressionNewLine6.js | 4 +- .../conditionalExpressionNewLine7.js | 4 +- .../conditionalExpressionNewLine8.js | 4 +- .../conditionalExpressionNewLine9.js | 6 +- .../reference/conditionalExpressions2.js | 25 +- ...onditionalOperatorConditionIsNumberType.js | 10 +- ...onditionalOperatorConditionIsObjectType.js | 49 +- .../conditionalOperatorConditoinIsAnyType.js | 25 +- ...onditionalOperatorConditoinIsStringType.js | 10 +- .../conditionalOperatorWithIdenticalBCT.js | 46 +- .../conditionalOperatorWithoutIdenticalBCT.js | 24 +- ...cateOverloadsCausedByOverloadResolution.js | 3 +- .../reference/conflictMarkerTrivia2.js | 3 +- .../reference/conflictingTypeAnnotatedVar.js | 6 +- .../reference/constDeclarations-access2.js | 6 +- .../reference/constDeclarations-access3.js | 6 +- .../reference/constDeclarations-access4.js | 6 +- .../reference/constDeclarations-access5.js | 6 +- .../reference/constDeclarations-errors.js | 12 +- tests/baselines/reference/constEnumErrors.js | 4 +- tests/baselines/reference/constEnums.js | 9 +- .../reference/constantOverloadFunction.js | 12 +- .../constantOverloadFunctionNoSubtypeError.js | 12 +- ...nstraintCheckInGenericBaseTypeReference.js | 3 +- .../baselines/reference/constraintErrors1.js | 3 +- .../constraintSatisfactionWithAny.js | 12 +- .../constraintSatisfactionWithEmptyObject.js | 6 +- .../constructorArgWithGenericCallSignature.js | 3 +- .../baselines/reference/constructorAsType.js | 6 +- .../reference/constructorOverloads1.js | 12 +- .../reference/constructorOverloads2.js | 12 +- .../reference/constructorOverloads3.js | 9 +- .../reference/constructorOverloads6.js | 6 +- .../reference/constructorOverloads7.js | 4 +- ...tructorParametersInVariableDeclarations.js | 16 +- .../constructorReturnsInvalidType.js | 3 +- ...nstructorWithAssignableReturnExpression.js | 12 +- ...constructorWithIncompleteTypeAnnotation.js | 81 +- .../contextualSignatureInstantiation1.js | 8 +- .../contextualSignatureInstantiation2.js | 8 +- .../contextualSignatureInstantiation3.js | 10 +- ...arameterConstrainedToOuterTypeParameter.js | 4 +- .../baselines/reference/contextualTypeAny.js | 10 +- .../contextualTypeAppliedToVarArgs.js | 3 +- .../contextualTypeArrayReturnType.js | 4 +- .../reference/contextualTypeWithTuple.js | 67 +- ...ntextualTypeWithUnionTypeCallSignatures.js | 20 +- ...textualTypeWithUnionTypeIndexSignatures.js | 56 +- .../contextualTypeWithUnionTypeMembers.js | 103 +- ...ontextualTypeWithUnionTypeObjectLiteral.js | 8 +- tests/baselines/reference/contextualTyping.js | 157 +- .../reference/contextualTyping.js.map | 2 +- .../reference/contextualTyping.sourcemap.txt | 3717 +++++++++-------- .../baselines/reference/contextualTyping1.js | 2 +- .../baselines/reference/contextualTyping10.js | 9 +- .../baselines/reference/contextualTyping11.js | 4 +- .../baselines/reference/contextualTyping12.js | 10 +- .../baselines/reference/contextualTyping13.js | 4 +- .../baselines/reference/contextualTyping14.js | 4 +- .../baselines/reference/contextualTyping15.js | 4 +- .../baselines/reference/contextualTyping16.js | 8 +- .../baselines/reference/contextualTyping17.js | 9 +- .../baselines/reference/contextualTyping18.js | 4 +- .../baselines/reference/contextualTyping19.js | 15 +- .../baselines/reference/contextualTyping2.js | 5 +- .../baselines/reference/contextualTyping20.js | 16 +- .../baselines/reference/contextualTyping21.js | 13 +- .../baselines/reference/contextualTyping22.js | 8 +- .../baselines/reference/contextualTyping23.js | 4 +- .../baselines/reference/contextualTyping24.js | 4 +- .../baselines/reference/contextualTyping25.js | 3 +- .../baselines/reference/contextualTyping26.js | 3 +- .../baselines/reference/contextualTyping27.js | 3 +- .../baselines/reference/contextualTyping28.js | 7 +- .../baselines/reference/contextualTyping29.js | 8 +- .../baselines/reference/contextualTyping3.js | 4 +- .../baselines/reference/contextualTyping30.js | 8 +- .../baselines/reference/contextualTyping31.js | 7 +- .../baselines/reference/contextualTyping32.js | 12 +- .../baselines/reference/contextualTyping33.js | 12 +- .../baselines/reference/contextualTyping34.js | 4 +- .../baselines/reference/contextualTyping35.js | 5 +- .../baselines/reference/contextualTyping36.js | 7 +- .../baselines/reference/contextualTyping37.js | 7 +- .../baselines/reference/contextualTyping38.js | 4 +- .../baselines/reference/contextualTyping39.js | 4 +- .../baselines/reference/contextualTyping4.js | 5 +- .../baselines/reference/contextualTyping40.js | 4 +- .../baselines/reference/contextualTyping41.js | 4 +- .../baselines/reference/contextualTyping6.js | 9 +- .../baselines/reference/contextualTyping7.js | 4 +- .../baselines/reference/contextualTyping8.js | 4 +- .../baselines/reference/contextualTyping9.js | 10 +- .../contextualTypingArrayOfLambdas.js | 9 +- .../reference/contextualTypingOfAccessors.js | 7 +- .../contextualTypingOfArrayLiterals1.js | 5 +- ...contextualTypingOfConditionalExpression.js | 12 +- ...ontextualTypingOfConditionalExpression2.js | 5 +- ...lTypingOfGenericFunctionTypedArguments1.js | 8 +- ...ontextualTypingOfLambdaReturnExpression.js | 11 +- ...ualTypingOfLambdaWithMultipleSignatures.js | 3 +- ...alTypingOfLambdaWithMultipleSignatures2.js | 4 +- .../contextualTypingOfObjectLiterals.js | 7 +- .../contextualTypingOfObjectLiterals2.js | 9 +- ...alTypingTwoInstancesOfSameTypeParameter.js | 6 +- ...ontextualTypingWithFixedTypeParameters1.js | 12 +- ...TypingWithGenericAndNonGenericSignature.js | 8 +- .../contextualTypingWithGenericSignature.js | 4 +- .../reference/contextuallyTypingOrOperator.js | 28 +- .../contextuallyTypingOrOperator2.js | 16 +- .../baselines/reference/convertKeywordsYes.js | 3 +- .../couldNotSelectGenericOverload.js | 13 +- tests/baselines/reference/covariance1.js | 11 +- .../reference/crashInResolveInterface.js | 4 +- .../baselines/reference/customEventDetail.js | 5 +- tests/baselines/reference/debuggerEmit.js | 4 +- .../declFileAliasUseBeforeDeclaration.js | 3 +- ...declFileForClassWithMultipleBaseClasses.js | 18 +- ...leForClassWithPrivateOverloadedFunction.js | 3 +- .../reference/declFileGenericType.js | 27 +- ...ModuleAssignmentInObjectLiteralProperty.js | 8 +- .../declFileObjectLiteralWithAccessors.js | 8 +- .../declFileObjectLiteralWithOnlyGetter.js | 4 +- .../declFileObjectLiteralWithOnlySetter.js | 4 +- .../reference/declFilePrivateStatic.js | 20 +- .../reference/declFileRegressionTests.js | 8 +- ...RestParametersOfFunctionAndFunctionType.js | 18 +- .../declFileTypeAnnotationArrayType.js | 40 +- .../declFileTypeAnnotationParenType.js | 20 +- .../declFileTypeAnnotationTupleType.js | 13 +- .../declFileTypeAnnotationUnionType.js | 8 +- .../reference/declFileTypeofFunction.js | 8 +- .../declFileTypeofInAnonymousType.js | 16 +- tests/baselines/reference/declInput-2.js | 22 +- tests/baselines/reference/declInput.js | 12 +- tests/baselines/reference/declInput3.js | 12 +- tests/baselines/reference/declInput4.js | 11 +- .../declarationEmit_nameConflicts.js | 18 +- .../declarationEmit_nameConflicts2.js | 3 +- .../declarationEmit_nameConflicts3.js | 12 +- .../declarationEmit_protectedMembers.js | 18 +- .../reference/declarationsAndAssignments.js | 364 +- .../decrementOperatorWithAnyOtherType.js | 10 +- ...eratorWithAnyOtherTypeInvalidOperations.js | 11 +- .../decrementOperatorWithNumberType.js | 5 +- ...OperatorWithNumberTypeInvalidOperations.js | 37 +- ...ementOperatorWithUnsupportedBooleanType.js | 32 +- ...rementOperatorWithUnsupportedStringType.js | 37 +- .../defaultArgsInFunctionExpressions.js | 8 +- .../defaultBestCommonTypesHaveDecls.js | 8 +- .../baselines/reference/defaultIndexProps1.js | 4 +- .../baselines/reference/defaultIndexProps2.js | 4 +- .../deleteOperatorWithAnyOtherType.js | 11 +- .../deleteOperatorWithBooleanType.js | 13 +- .../reference/deleteOperatorWithNumberType.js | 25 +- .../reference/deleteOperatorWithStringType.js | 25 +- ...derivedClassConstructorWithoutSuperCall.js | 8 +- .../derivedClassIncludesInheritedMembers.js | 20 +- .../derivedClassOverridesProtectedMembers.js | 40 +- .../derivedClassOverridesProtectedMembers2.js | 40 +- .../derivedClassOverridesProtectedMembers3.js | 40 +- .../derivedClassOverridesPublicMembers.js | 40 +- .../derivedClassSuperCallsWithThisArg.js | 8 +- .../reference/derivedClassTransitivity.js | 9 +- .../reference/derivedClassTransitivity2.js | 9 +- .../reference/derivedClassTransitivity3.js | 9 +- .../reference/derivedClassTransitivity4.js | 9 +- .../reference/derivedClassWithAny.js | 8 +- ...ivateInstanceShadowingProtectedInstance.js | 14 +- ...hPrivateInstanceShadowingPublicInstance.js | 14 +- ...thPrivateStaticShadowingProtectedStatic.js | 14 +- ...sWithPrivateStaticShadowingPublicStatic.js | 14 +- tests/baselines/reference/derivedClasses.js | 16 +- .../reference/derivedGenericClassWithAny.js | 8 +- ...sesHiddenBaseCallViaSuperPropertyAccess.js | 14 +- .../derivedTypeDoesNotRequireExtendsClause.js | 5 +- .../destructuringParameterProperties1.js | 36 +- .../destructuringParameterProperties2.js | 36 +- .../destructuringParameterProperties3.js | 48 +- .../destructuringParameterProperties5.js | 18 +- .../detachedCommentAtStartOfConstructor1.js | 4 +- .../detachedCommentAtStartOfConstructor2.js | 4 +- .../detachedCommentAtStartOfFunctionBody1.js | 4 +- .../detachedCommentAtStartOfFunctionBody2.js | 4 +- ...tWidenAtObjectLiteralPropertyAssignment.js | 9 +- .../reference/doWhileBreakStatements.js | 3 +- .../reference/doWhileContinueStatements.js | 3 +- tests/baselines/reference/doWhileLoop.js | 3 +- .../reference/dottedSymbolResolution1.js | 3 +- .../reference/downlevelLetConst12.js | 8 +- .../reference/downlevelLetConst13.js | 32 +- .../reference/downlevelLetConst14.js | 32 +- .../reference/downlevelLetConst15.js | 36 +- .../reference/downlevelLetConst16.js | 104 +- .../reference/downlevelLetConst18.js | 34 +- .../duplicateIdentifierInCatchBlock.js | 23 +- ...ateIdentifiersAcrossContainerBoundaries.js | 9 +- .../reference/duplicateLocalVariable1.js | 202 +- .../reference/duplicateLocalVariable2.js | 8 +- .../duplicateObjectLiteralProperty.js | 11 +- .../duplicateOverloadInTypeAugmentation1.js | 4 +- .../reference/duplicatePropertyNames.js | 18 +- .../duplicateSymbolsExportMatching.js | 3 +- .../reference/duplicateTypeParameters1.js | 3 +- .../reference/duplicateTypeParameters2.js | 6 +- tests/baselines/reference/elaboratedErrors.js | 3 +- .../baselines/reference/emitArrowFunction.js | 17 +- .../reference/emitArrowFunctionAsIs.js | 9 +- .../reference/emitArrowFunctionAsIsES6.js | 9 +- .../reference/emitArrowFunctionES6.js | 19 +- .../emitArrowFunctionThisCapturing.js | 3 +- .../emitArrowFunctionThisCapturingES6.js | 3 +- .../emitArrowFunctionWhenUsingArguments.js | 3 +- .../emitArrowFunctionWhenUsingArgumentsES6.js | 3 +- .../reference/emitArrowFunctionsAsIs.js | 9 +- .../reference/emitArrowFunctionsAsIsES6.js | 9 +- .../emitDefaultParametersFunctionES6.js | 12 +- ...tDefaultParametersFunctionExpressionES6.js | 21 +- ...mitDefaultParametersFunctionPropertyES6.js | 12 +- .../emitDefaultParametersMethodES6.js | 12 +- .../emitRestParametersFunctionES6.js | 6 +- ...emitRestParametersFunctionExpressionES6.js | 12 +- .../emitRestParametersFunctionPropertyES6.js | 3 +- .../reference/emitRestParametersMethodES6.js | 12 +- tests/baselines/reference/emptyExpr.js | 4 +- .../reference/emptyTypeArgumentList.js | 3 +- .../enumAssignabilityInInheritance.js | 3 +- tests/baselines/reference/enumBasics.js | 16 +- .../enumConflictsWithGlobalIdentifier.js | 3 +- tests/baselines/reference/enumIndexer.js | 13 +- .../enumIsNotASubtypeOfAnythingButNumber.js | 3 +- .../reference/enumMemberResolution.js | 3 +- tests/baselines/reference/enumMerging.js | 18 +- .../errorOnContextuallyTypedReturnType.js | 6 +- .../reference/errorSuperPropertyAccess.js | 21 +- tests/baselines/reference/errorSupression1.js | 4 +- .../reference/errorsInGenericTypeReference.js | 24 +- tests/baselines/reference/es6ClassTest.js | 8 +- tests/baselines/reference/es6ClassTest2.js | 10 +- tests/baselines/reference/es6ClassTest3.js | 6 +- tests/baselines/reference/es6ClassTest8.js | 24 +- tests/baselines/reference/es6ClassTest9.js | 3 +- tests/baselines/reference/es6MemberScoping.js | 4 +- .../baselines/reference/escapedIdentifiers.js | 16 +- .../everyTypeWithAnnotationAndInitializer.js | 20 +- ...TypeWithAnnotationAndInvalidInitializer.js | 24 +- .../reference/everyTypeWithInitializer.js | 16 +- .../baselines/reference/exportAlreadySeen.js | 3 +- .../baselines/reference/exportAssignTypes.js | 10 +- .../exportAssignmentConstrainedGenericType.js | 5 +- .../reference/exportAssignmentFunction.js | 4 +- .../exportAssignmentMergedInterface.js | 8 +- tests/baselines/reference/exportCodeGen.js | 6 +- .../reference/exportImportMultipleFiles.js | 4 +- .../exportImportNonInstantiatedModule.js | 4 +- .../exportImportNonInstantiatedModule2.js | 4 +- .../reference/exportNonVisibleType.js | 5 +- .../baselines/reference/exportPrivateType.js | 4 +- .../baselines/reference/exportedVariable1.js | 4 +- .../extendAndImplementTheSameBaseType.js | 6 +- .../extendAndImplementTheSameBaseType2.js | 3 +- tests/baselines/reference/extendArray.js | 8 +- .../reference/extendNonClassSymbol1.js | 3 +- .../reference/extendsClauseAlreadySeen.js | 3 +- .../reference/extendsClauseAlreadySeen2.js | 3 +- tests/baselines/reference/externModule.js | 3 +- ...ceOfImportDeclarationWithExportModifier.js | 3 +- ...ernceResolutionOrderInImportDeclaration.js | 3 +- .../reference/fatArrowfunctionAsType.js | 4 +- .../baselines/reference/fatarrowfunctions.js | 78 +- .../reference/fatarrowfunctionsErrors.js | 21 +- ...rowfunctionsInFunctionParameterDefaults.js | 4 +- .../fatarrowfunctionsOptionalArgs.js | 222 +- .../fatarrowfunctionsOptionalArgsErrors1.js | 4 +- .../fatarrowfunctionsOptionalArgsErrors4.js | 26 +- .../reference/fieldAndGetterWithSameName.js | 4 +- ...eParameterInSignatureWithRestParameters.js | 3 +- tests/baselines/reference/for-inStatements.js | 109 +- .../for-inStatementsDestructuring.js | 3 +- .../for-inStatementsDestructuring2.js | 3 +- .../for-inStatementsDestructuring3.js | 6 +- .../for-inStatementsDestructuring4.js | 6 +- .../reference/for-inStatementsInvalid.js | 82 +- tests/baselines/reference/for-of1.js | 3 +- tests/baselines/reference/for-of10.js | 5 +- tests/baselines/reference/for-of11.js | 6 +- tests/baselines/reference/for-of12.js | 6 +- tests/baselines/reference/for-of13.js | 5 +- tests/baselines/reference/for-of14.js | 3 +- tests/baselines/reference/for-of15.js | 3 +- tests/baselines/reference/for-of16.js | 3 +- tests/baselines/reference/for-of17.js | 3 +- tests/baselines/reference/for-of18.js | 3 +- tests/baselines/reference/for-of2.js | 3 +- tests/baselines/reference/for-of24.js | 3 +- tests/baselines/reference/for-of25.js | 3 +- tests/baselines/reference/for-of26.js | 3 +- tests/baselines/reference/for-of27.js | 3 +- tests/baselines/reference/for-of28.js | 3 +- tests/baselines/reference/for-of29.js | 3 +- tests/baselines/reference/for-of3.js | 3 +- tests/baselines/reference/for-of30.js | 3 +- tests/baselines/reference/for-of31.js | 3 +- tests/baselines/reference/for-of32.js | 3 +- tests/baselines/reference/for-of33.js | 3 +- tests/baselines/reference/for-of34.js | 3 +- tests/baselines/reference/for-of35.js | 3 +- tests/baselines/reference/for-of36.js | 5 +- tests/baselines/reference/for-of37.js | 7 +- tests/baselines/reference/for-of38.js | 7 +- tests/baselines/reference/for-of39.js | 11 +- tests/baselines/reference/for-of4.js | 4 +- tests/baselines/reference/for-of40.js | 7 +- tests/baselines/reference/for-of41.js | 11 +- tests/baselines/reference/for-of42.js | 7 +- tests/baselines/reference/for-of43.js | 7 +- tests/baselines/reference/for-of44.js | 15 +- tests/baselines/reference/for-of45.js | 12 +- tests/baselines/reference/for-of46.js | 12 +- tests/baselines/reference/for-of47.js | 12 +- tests/baselines/reference/for-of48.js | 12 +- tests/baselines/reference/for-of49.js | 14 +- tests/baselines/reference/for-of5.js | 4 +- tests/baselines/reference/for-of50.js | 7 +- tests/baselines/reference/for-of51.js | 3 +- tests/baselines/reference/for-of52.js | 5 +- tests/baselines/reference/for-of55.js | 4 +- tests/baselines/reference/for-of56.js | 3 +- tests/baselines/reference/for-of6.js | 4 +- tests/baselines/reference/for-of7.js | 5 +- tests/baselines/reference/for-of8.js | 5 +- tests/baselines/reference/for-of9.js | 8 +- .../baselines/reference/forBreakStatements.js | 3 +- .../reference/forContinueStatements.js | 3 +- .../reference/forInBreakStatements.js | 3 +- .../reference/forInContinueStatements.js | 3 +- tests/baselines/reference/forStatements.js | 68 +- .../forStatementsMultipleInvalidDecl.js | 75 +- .../forStatementsMultipleValidDecl.js | 91 +- tests/baselines/reference/funClodule.js | 6 +- tests/baselines/reference/funcdecl.js | 3 +- .../functionAndInterfaceWithSeparateErrors.js | 3 +- .../functionAndPropertyNameConflict.js | 3 +- .../reference/functionArgShadowing.js | 6 +- .../baselines/reference/functionAssignment.js | 27 +- .../reference/functionAssignmentError.js | 8 +- tests/baselines/reference/functionCall1.js | 4 +- tests/baselines/reference/functionCall11.js | 3 +- tests/baselines/reference/functionCall12.js | 3 +- tests/baselines/reference/functionCall2.js | 4 +- tests/baselines/reference/functionCall3.js | 6 +- tests/baselines/reference/functionCall4.js | 8 +- tests/baselines/reference/functionCall5.js | 4 +- tests/baselines/reference/functionCall6.js | 3 +- tests/baselines/reference/functionCall7.js | 4 +- tests/baselines/reference/functionCall8.js | 3 +- tests/baselines/reference/functionCall9.js | 3 +- .../functionConstraintSatisfaction.js | 36 +- .../functionConstraintSatisfaction2.js | 26 +- .../functionConstraintSatisfaction3.js | 28 +- ...ctionExpressionAndLambdaMatchesFunction.js | 7 +- .../functionExpressionInWithBlock.js | 4 +- .../functionExpressionReturningItself.js | 4 +- .../reference/functionImplementationErrors.js | 8 +- .../reference/functionImplementations.js | 8 +- tests/baselines/reference/functionLiteral.js | 8 +- .../reference/functionLiteralForOverloads.js | 16 +- .../reference/functionNameConflicts.js | 15 +- .../reference/functionOverloadAmbiguity1.js | 14 +- .../reference/functionOverloadErrors.js | 48 +- .../reference/functionOverloadErrorsSyntax.js | 9 +- ...nctionOverloadImplementationOfWrongName.js | 3 +- ...ctionOverloadImplementationOfWrongName2.js | 3 +- .../baselines/reference/functionOverloads.js | 4 +- .../baselines/reference/functionOverloads1.js | 4 +- .../reference/functionOverloads10.js | 3 +- .../reference/functionOverloads11.js | 4 +- .../reference/functionOverloads12.js | 10 +- .../reference/functionOverloads13.js | 4 +- .../reference/functionOverloads14.js | 6 +- .../reference/functionOverloads15.js | 4 +- .../reference/functionOverloads16.js | 4 +- .../reference/functionOverloads17.js | 6 +- .../reference/functionOverloads18.js | 6 +- .../reference/functionOverloads19.js | 6 +- .../baselines/reference/functionOverloads2.js | 4 +- .../reference/functionOverloads20.js | 4 +- .../reference/functionOverloads21.js | 4 +- .../reference/functionOverloads22.js | 8 +- .../reference/functionOverloads23.js | 4 +- .../reference/functionOverloads24.js | 5 +- .../reference/functionOverloads25.js | 4 +- .../reference/functionOverloads26.js | 4 +- .../reference/functionOverloads27.js | 4 +- .../reference/functionOverloads28.js | 4 +- .../reference/functionOverloads29.js | 4 +- .../reference/functionOverloads30.js | 4 +- .../reference/functionOverloads31.js | 4 +- .../reference/functionOverloads32.js | 4 +- .../reference/functionOverloads33.js | 4 +- .../reference/functionOverloads34.js | 4 +- .../reference/functionOverloads35.js | 8 +- .../reference/functionOverloads36.js | 8 +- .../reference/functionOverloads37.js | 4 +- .../reference/functionOverloads38.js | 10 +- .../reference/functionOverloads39.js | 10 +- .../baselines/reference/functionOverloads4.js | 4 +- .../reference/functionOverloads40.js | 10 +- .../reference/functionOverloads41.js | 8 +- .../reference/functionOverloads42.js | 10 +- .../baselines/reference/functionOverloads5.js | 3 +- .../baselines/reference/functionOverloads6.js | 3 +- .../baselines/reference/functionOverloads7.js | 4 +- .../baselines/reference/functionOverloads8.js | 4 +- .../baselines/reference/functionOverloads9.js | 4 +- tests/baselines/reference/functionReturn.js | 10 +- tests/baselines/reference/functionType.js | 3 +- .../functionTypeArgumentAssignmentCompat.js | 4 +- ...nWithAnyReturnTypeAndNoReturnExpression.js | 9 +- ...nWithDefaultParameterWithNoStatements10.js | 8 +- ...nWithDefaultParameterWithNoStatements13.js | 8 +- .../functionWithMultipleReturnStatements2.js | 12 +- ...nsMissingReturnStatementsAndExpressions.js | 3 +- .../functionsWithModifiersInBlocks1.js | 3 +- .../reference/funduleSplitAcrossFiles.js | 3 +- tests/baselines/reference/fuzzy.js | 13 +- .../reference/generatedContextualTyping.js | 2671 ++++++++++-- .../generativeRecursionWithTypeOf.js | 3 +- .../genericArgumentCallSigAssignmentCompat.js | 11 +- tests/baselines/reference/genericArray1.js | 8 +- .../reference/genericArrayMethods1.js | 5 +- ...icAssignmentCompatOfFunctionSignatures1.js | 6 +- .../genericAssignmentCompatWithInterfaces1.js | 16 +- .../genericCallWithArrayLiteralArgs.js | 30 +- .../genericCallWithFixedArguments.js | 9 +- .../genericCallWithFunctionTypedArguments.js | 56 +- .../genericCallWithFunctionTypedArguments5.js | 36 +- ...enericCallWithGenericSignatureArguments.js | 66 +- ...nericCallWithGenericSignatureArguments2.js | 60 +- ...nericCallWithGenericSignatureArguments3.js | 76 +- .../genericCallWithNonGenericArgs1.js | 3 +- .../genericCallWithObjectLiteralArgs.js | 20 +- .../genericCallWithObjectLiteralArguments1.js | 29 +- .../genericCallWithObjectTypeArgs2.js | 24 +- ...icCallWithObjectTypeArgsAndConstraints2.js | 22 +- ...icCallWithObjectTypeArgsAndConstraints3.js | 27 +- ...icCallWithObjectTypeArgsAndConstraints4.js | 18 +- ...icCallWithObjectTypeArgsAndConstraints5.js | 9 +- ...allWithOverloadedFunctionTypedArguments.js | 32 +- ...llWithOverloadedFunctionTypedArguments2.js | 17 +- .../reference/genericCallWithTupleType.js | 50 +- .../genericCallbacksAndClassHierarchy.js | 6 +- .../reference/genericCallsWithoutParens.js | 3 +- .../reference/genericChainedCalls.js | 23 +- ...cClassPropertyInheritanceSpecialization.js | 7 +- ...icClassWithFunctionTypedMemberArguments.js | 60 +- ...nericClassWithStaticsUsingTypeArguments.js | 11 +- .../reference/genericCloduleInModule.js | 6 +- .../reference/genericCloduleInModule2.js | 6 +- .../reference/genericCombinators2.js | 8 +- .../reference/genericConstraintDeclaration.js | 4 +- .../genericConstraintSatisfaction1.js | 4 +- .../genericContextualTypingSpecialization.js | 4 +- .../genericFunctionHasFreshTypeArgs.js | 9 +- .../genericFunctionSpecializations1.js | 6 +- .../genericFunctionTypedArgumentsAreFixed.js | 6 +- .../baselines/reference/genericFunctions0.js | 4 +- .../baselines/reference/genericFunctions1.js | 4 +- .../baselines/reference/genericFunctions2.js | 4 +- ...genericFunctionsWithOptionalParameters3.js | 23 +- .../reference/genericFunduleInModule.js | 4 +- .../reference/genericFunduleInModule2.js | 4 +- .../baselines/reference/genericImplements.js | 12 +- .../baselines/reference/genericInference1.js | 8 +- .../reference/genericInterfaceTypeCall.js | 8 +- .../genericLambaArgWithoutTypeArguments.js | 4 +- ...ericMergedDeclarationUsingTypeParameter.js | 4 +- .../genericMethodOverspecialization.js | 8 +- .../reference/genericObjectLitReturnType.js | 6 +- .../reference/genericOfACloduleType1.js | 7 +- .../reference/genericOfACloduleType2.js | 7 +- .../reference/genericOverloadSignatures.js | 3 +- .../genericParameterAssignability1.js | 8 +- .../reference/genericPrototypeProperty.js | 4 +- ...ericRecursiveImplicitConstructorErrors3.js | 5 +- tests/baselines/reference/genericReduce.js | 23 +- tests/baselines/reference/genericRestArgs.js | 6 +- .../reference/genericReturnTypeFromGetter1.js | 4 +- .../genericReversingTypeParameters.js | 8 +- .../genericReversingTypeParameters2.js | 8 +- .../reference/genericSpecializations1.js | 12 +- .../reference/genericSpecializations2.js | 12 +- .../reference/genericSpecializations3.js | 16 +- .../reference/genericStaticAnyTypeFunction.js | 4 +- .../genericTypeArgumentInference1.js | 15 +- .../reference/genericTypeAssertions1.js | 3 +- .../reference/genericTypeAssertions2.js | 3 +- .../reference/genericTypeAssertions3.js | 8 +- .../reference/genericTypeAssertions4.js | 12 +- ...genericTypeReferenceWithoutTypeArgument.js | 21 +- ...enericTypeReferenceWithoutTypeArgument2.js | 21 +- .../genericTypeReferencesRequireTypeArgs.js | 4 +- .../genericTypeWithNonGenericBaseMisMatch.js | 3 +- .../genericWithIndexerOfTypeParameterType2.js | 3 +- .../genericWithOpenTypeParameters1.js | 20 +- .../genericsAndHigherOrderFunctions.js | 8 +- .../reference/genericsManyTypeParameters.js | 128 +- .../genericsWithDuplicateTypeParameters1.js | 21 +- .../genericsWithoutTypeParameters1.js | 22 +- .../reference/getAndSetAsMemberNames.js | 11 +- .../reference/getAndSetNotIdenticalType.js | 3 +- .../baselines/reference/getsetReturnTypes.js | 4 +- .../reference/getterSetterNonAccessor.js | 7 +- .../baselines/reference/gettersAndSetters.js | 35 +- .../gettersAndSettersAccessibility.js | 7 +- .../reference/gettersAndSettersErrors.js | 21 +- .../reference/gettersAndSettersTypesAgree.js | 30 +- tests/baselines/reference/giant.js | 204 +- .../baselines/reference/globalThisCapture.js | 4 +- .../baselines/reference/grammarAmbiguities.js | 8 +- .../reference/grammarAmbiguities1.js | 14 +- .../heterogeneousArrayAndOverloads.js | 21 +- .../reference/heterogeneousArrayLiterals.js | 457 +- .../reference/ifDoWhileStatements.js | 297 +- .../illegalSuperCallsInConstructor.js | 12 +- .../reference/implementsClauseAlreadySeen.js | 3 +- .../reference/implicitAnyCastedValue.js | 5 +- ...AnyDeclareFunctionExprWithoutFormalType.js | 37 +- ...icitAnyDeclareFunctionWithoutFormalType.js | 12 +- .../implicitAnyDeclareMemberWithoutType2.js | 3 +- ...itAnyDeclareVariablesWithoutTypeAndInit.js | 3 +- .../implicitAnyFromCircularInference.js | 16 +- ...tAnyFunctionInvocationWithAnyArguements.js | 32 +- ...mplicitAnyFunctionReturnNullOrUndefined.js | 24 +- .../implicitAnyGenericTypeInference.js | 6 +- .../reference/implicitAnyGenerics.js | 4 +- .../baselines/reference/implicitAnyInCatch.js | 11 +- ...licitAnyNewExprLackConstructorSignature.js | 4 +- .../reference/implicitAnyWidenToAny.js | 32 +- ...sAnExternalModuleInsideAnInternalModule.js | 3 +- .../reference/importAliasIdentifiers.js | 15 +- .../baselines/reference/importAsBaseClass.js | 4 +- tests/baselines/reference/importDecl.js | 20 +- .../reference/importInTypePosition.js | 5 +- tests/baselines/reference/importStatements.js | 5 +- .../reference/importStatementsInterfaces.js | 6 +- .../reference/importedModuleAddToGlobal.js | 4 +- tests/baselines/reference/inOperator.js | 9 +- .../reference/inOperatorWithFunction.js | 8 +- .../baselines/reference/incompatibleTypes.js | 36 +- .../reference/incompleteObjectLiteral1.js | 4 +- .../incrementOperatorWithAnyOtherType.js | 10 +- ...eratorWithAnyOtherTypeInvalidOperations.js | 11 +- .../incrementOperatorWithNumberType.js | 5 +- ...OperatorWithNumberTypeInvalidOperations.js | 37 +- ...ementOperatorWithUnsupportedBooleanType.js | 32 +- ...rementOperatorWithUnsupportedStringType.js | 37 +- .../indexSignaturesInferentialTyping.js | 28 +- tests/baselines/reference/indexer.js | 9 +- tests/baselines/reference/indexerA.js | 9 +- tests/baselines/reference/indexerWithTuple.js | 23 +- .../reference/inferSecondaryParameter.js | 5 +- ...eArgumentsInSignatureWithRestParameters.js | 11 +- .../inferenceFromParameterlessLambda.js | 9 +- .../inferentialTypingWithFunctionType2.js | 6 +- ...inferentialTypingWithFunctionTypeNested.js | 6 +- ...ypingWithFunctionTypeSyntacticScenarios.js | 8 +- .../inferentialTypingWithFunctionTypeZip.js | 8 +- ...entialTypingWithObjectLiteralProperties.js | 20 +- tests/baselines/reference/inheritance.js | 16 +- tests/baselines/reference/inheritance1.js | 12 +- ...itanceGrandParentPrivateMemberCollision.js | 6 +- ...tPrivateMemberCollisionWithPublicMember.js | 6 +- ...tPublicMemberCollisionWithPrivateMember.js | 6 +- ...nheritedFunctionAssignmentCompatibility.js | 11 +- .../reference/innerBoundLambdaEmit.js | 3 +- tests/baselines/reference/innerFunc.js | 8 +- tests/baselines/reference/innerModExport1.js | 12 +- tests/baselines/reference/innerModExport2.js | 12 +- tests/baselines/reference/innerOverloads.js | 4 +- .../instanceAndStaticDeclarations1.js | 4 +- .../instanceMemberAssignsToClassPrototype.js | 14 +- ...nstancePropertiesInheritedIntoClassType.js | 14 +- .../reference/instancePropertyInClassType.js | 14 +- .../instanceofOperatorWithInvalidOperands.js | 3 +- ...tantiateNonGenericTypeWithTypeArguments.js | 3 +- .../baselines/reference/instantiatedModule.js | 5 +- tests/baselines/reference/intTypeCheck.js | 40 +- tests/baselines/reference/interface0.js | 4 +- .../reference/interfaceAssignmentCompat.js | 12 +- .../reference/interfaceContextualType.js | 8 +- .../reference/interfaceDeclaration2.js | 3 +- .../reference/interfaceDeclaration4.js | 3 +- .../reference/interfaceExtendingClass.js | 3 +- .../reference/interfaceExtendingClass2.js | 3 +- .../reference/interfaceExtendsClass1.js | 9 +- .../interfaceExtendsClassWithPrivate1.js | 15 +- .../interfaceExtendsClassWithPrivate2.js | 26 +- .../reference/interfaceImplementation1.js | 3 +- .../reference/interfaceImplementation3.js | 3 +- .../reference/interfaceImplementation4.js | 3 +- .../reference/interfaceImplementation5.js | 30 +- .../reference/interfaceImplementation6.js | 4 +- .../reference/interfaceImplementation7.js | 4 +- tests/baselines/reference/interfaceNaming1.js | 3 +- .../baselines/reference/interfaceSubtyping.js | 4 +- .../interfaceWithPropertyOfEveryType.js | 15 +- ...aceWithPropertyThatIsPrivateInBaseType2.js | 6 +- .../invalidDoWhileBreakStatements.js | 3 +- .../invalidDoWhileContinueStatements.js | 3 +- .../reference/invalidForBreakStatements.js | 3 +- .../reference/invalidForContinueStatements.js | 3 +- .../reference/invalidForInBreakStatements.js | 3 +- .../invalidForInContinueStatements.js | 3 +- .../invalidModuleWithVarStatements.js | 9 +- .../invalidMultipleVariableDeclarations.js | 29 +- .../reference/invalidReturnStatements.js | 28 +- .../baselines/reference/invalidStaticField.js | 4 +- .../reference/invalidTryStatements.js | 18 +- .../reference/invalidTryStatements2.js | 12 +- .../reference/invalidTypeOfTarget.js | 3 +- .../reference/invalidUndefinedAssignments.js | 3 +- .../reference/invalidUndefinedValues.js | 5 +- .../reference/invalidVoidAssignments.js | 5 +- .../baselines/reference/invalidVoidValues.js | 5 +- .../reference/invalidWhileBreakStatements.js | 3 +- .../invalidWhileContinueStatements.js | 3 +- tests/baselines/reference/ipromise4.js | 9 +- .../reference/iterableContextualTyping1.js | 4 +- tests/baselines/reference/keywordField.js | 4 +- tests/baselines/reference/lambdaExpression.js | 8 +- tests/baselines/reference/lambdaParamTypes.js | 51 +- tests/baselines/reference/lambdaPropSelf.js | 4 +- .../reference/lastPropertyInLiteralWins.js | 12 +- .../reference/letAndVarRedeclaration.js | 15 +- .../reference/letDeclarations-access.js | 6 +- .../reference/letDeclarations-es5.js | 6 +- tests/baselines/reference/letDeclarations.js | 6 +- .../reference/letInLetOrConstDeclarations.js | 3 +- tests/baselines/reference/lift.js | 8 +- .../baselines/reference/literals-negative.js | 6 +- .../reference/localImportNameVsGlobalName.js | 3 +- .../logicalNotOperatorWithAnyOtherType.js | 11 +- .../logicalNotOperatorWithBooleanType.js | 13 +- .../logicalNotOperatorWithNumberType.js | 25 +- .../logicalNotOperatorWithStringType.js | 25 +- .../logicalOrExpressionIsContextuallyTyped.js | 8 +- ...gicalOrExpressionIsNotContextuallyTyped.js | 4 +- .../logicalOrOperatorWithTypeParameters.js | 4 +- .../matchingOfObjectLiteralConstraints.js | 7 +- tests/baselines/reference/maxConstraints.js | 4 +- .../memberFunctionsWithPrivateOverloads.js | 24 +- .../memberFunctionsWithPublicOverloads.js | 24 +- ...mberFunctionsWithPublicPrivateOverloads.js | 36 +- .../reference/mergedDeclarations1.js | 5 +- .../reference/mergedDeclarations4.js | 3 +- .../mergedModuleDeclarationCodeGen2.js | 3 +- .../mergedModuleDeclarationCodeGen3.js | 3 +- .../mergedModuleDeclarationCodeGen4.js | 3 +- .../mergedModuleDeclarationCodeGen5.js | 12 +- .../methodContainingLocalFunction.js | 18 +- ...hedExplicitTypeParameterAndArgumentType.js | 46 +- tests/baselines/reference/missingSelf.js | 14 +- .../reference/missingTypeArguments2.js | 7 +- .../mixingFunctionAndAmbientModule1.js | 6 +- .../mixingStaticAndInstanceOverloads.js | 18 +- tests/baselines/reference/modFunctionCrash.js | 4 +- .../baselines/reference/moduleCodeGenTest5.js | 12 +- .../reference/moduleInTypePosition1.js | 3 +- .../reference/moduleKeywordRepeatError.js | 3 +- .../moduleMemberWithoutTypeAnnotation1.js | 3 +- .../baselines/reference/moduleNewExportBug.js | 3 +- .../reference/moduleReopenedTypeOtherBlock.js | 4 +- .../reference/moduleReopenedTypeSameBlock.js | 4 +- tests/baselines/reference/moduleScoping.js | 15 +- .../reference/moduleSymbolMerging.js | 4 +- .../reference/moduleUnassignedVariable.js | 8 +- .../reference/moduleVisibilityTest1.js | 36 +- .../reference/moduleVisibilityTest2.js | 36 +- .../moduleWithStatementsOfEveryKind.js | 12 +- .../baselines/reference/multiCallOverloads.js | 15 +- ...tyAccessAndArrowFunctionIndent1.errors.txt | 17 + ...nePropertyAccessAndArrowFunctionIndent1.js | 14 + .../reference/multiModuleClodule1.js | 16 +- .../reference/multiModuleFundule1.js | 6 +- .../reference/multipleInheritance.js | 16 +- .../reference/multipleNumericIndexers.js | 5 +- .../reference/multipleStringIndexers.js | 4 +- tests/baselines/reference/mutrec.js | 8 +- .../mutuallyRecursiveGenericBaseTypes2.js | 4 +- tests/baselines/reference/nameCollisions.js | 15 +- .../nameCollisionsInPropertyAssignments.js | 6 +- .../negateOperatorWithAnyOtherType.js | 11 +- .../negateOperatorWithBooleanType.js | 13 +- .../reference/negateOperatorWithNumberType.js | 25 +- .../reference/negateOperatorWithStringType.js | 25 +- .../reference/nestedClassDeclaration.js | 6 +- tests/baselines/reference/nestedModules.js | 5 +- .../reference/nestedRecursiveLambda.js | 26 +- tests/baselines/reference/nestedSelf.js | 8 +- .../reference/newExpressionWithCast.js | 9 +- .../reference/newFunctionImplicitAny.js | 3 +- .../reference/newOperatorConformance.js | 3 +- .../reference/newOperatorErrorCases.js | 4 +- ...CollisionThisExpressionAndClassInGlobal.js | 4 +- ...ionThisExpressionAndLocalVarInAccessors.js | 36 +- ...nThisExpressionAndLocalVarInConstructor.js | 18 +- ...sionThisExpressionAndLocalVarInFunction.js | 4 +- ...lisionThisExpressionAndLocalVarInLambda.js | 14 +- ...lisionThisExpressionAndLocalVarInMethod.js | 18 +- ...sionThisExpressionAndLocalVarInProperty.js | 18 +- ...noCollisionThisExpressionAndVarInGlobal.js | 4 +- ...nThisExpressionInFunctionAndVarInGlobal.js | 4 +- .../reference/noConstraintInReturnType1.js | 4 +- .../baselines/reference/noImplicitAnyForIn.js | 23 +- .../noImplicitAnyForMethodParameters.js | 6 +- .../noImplicitAnyInCastExpression.js | 13 +- ...tAnyInContextuallyTypesFunctionParamter.js | 9 +- .../noImplicitAnyParametersInBareFunctions.js | 34 +- .../noImplicitAnyParametersInClass.js | 68 +- .../noImplicitAnyParametersInModule.js | 34 +- .../reference/noImplicitAnyWithOverloads.js | 7 +- tests/baselines/reference/noSelfOnVars.js | 3 +- .../reference/nonInstantiatedModule.js | 5 +- tests/baselines/reference/null.js | 5 +- .../nullIsSubtypeOfEverythingButUndefined.js | 25 +- tests/baselines/reference/numberAsInLHS.js | 5 +- ...icIndexerConstrainsPropertyDeclarations.js | 12 +- ...cIndexerConstrainsPropertyDeclarations2.js | 8 +- .../reference/numericIndexerConstraint1.js | 3 +- .../reference/numericIndexerConstraint2.js | 3 +- .../reference/numericIndexerConstraint4.js | 4 +- .../reference/numericIndexerConstraint5.js | 5 +- .../reference/numericIndexingResults.js | 10 +- .../objectLitIndexerContextualType.js | 16 +- .../objectLitStructuralTypeMismatch.js | 4 +- .../reference/objectLitTargetTypeCallSite.js | 5 +- tests/baselines/reference/objectLiteral1.js | 5 +- tests/baselines/reference/objectLiteral2.js | 5 +- .../objectLiteralArraySpecialization.js | 15 +- .../objectLiteralContextualTyping.js | 18 +- .../reference/objectLiteralErrors.js | 244 +- .../reference/objectLiteralErrorsES3.js | 19 +- ...bjectLiteralFunctionArgContextualTyping.js | 35 +- ...jectLiteralFunctionArgContextualTyping2.js | 35 +- .../objectLiteralGettersAndSetters.js | 150 +- .../reference/objectLiteralIndexerErrors.js | 10 +- .../reference/objectLiteralIndexers.js | 15 +- .../objectLiteralMemberWithModifiers1.js | 5 +- .../objectLiteralMemberWithModifiers2.js | 5 +- .../objectLiteralMemberWithQuestionMark1.js | 5 +- .../objectLiteralMemberWithoutBlock1.js | 4 +- .../objectLiteralParameterResolution.js | 4 +- ...ectLiteralReferencingInternalProperties.js | 5 +- .../objectLiteralShorthandProperties.js | 3 +- ...ectLiteralShorthandPropertiesAssignment.js | 28 +- ...LiteralShorthandPropertiesAssignmentES6.js | 28 +- ...teralShorthandPropertiesAssignmentError.js | 20 +- ...iesAssignmentErrorFromMissingIdentifier.js | 19 +- .../objectLiteralShorthandPropertiesES6.js | 3 +- ...ndPropertiesErrorFromNotUsingIdentifier.js | 18 +- ...eralShorthandPropertiesFunctionArgument.js | 13 +- ...ralShorthandPropertiesFunctionArgument2.js | 8 +- .../reference/objectLiteralWithSemicolons1.js | 6 +- .../reference/objectLiteralWithSemicolons4.js | 3 +- .../reference/objectLiteralWithSemicolons5.js | 8 +- ...objectTypeHidingMembersOfExtendedObject.js | 6 +- .../objectTypeHidingMembersOfObject.js | 6 +- ...peHidingMembersOfObjectAssignmentCompat.js | 6 +- ...eHidingMembersOfObjectAssignmentCompat2.js | 7 +- .../reference/objectTypesIdentity.js | 55 +- .../reference/objectTypesIdentity2.js | 37 +- .../objectTypesIdentityWithCallSignatures.js | 75 +- .../objectTypesIdentityWithCallSignatures2.js | 75 +- .../objectTypesIdentityWithCallSignatures3.js | 21 +- ...yWithCallSignaturesDifferingParamCounts.js | 75 +- ...WithCallSignaturesDifferingParamCounts2.js | 24 +- ...IdentityWithCallSignaturesWithOverloads.js | 73 +- ...jectTypesIdentityWithComplexConstraints.js | 3 +- ...ectTypesIdentityWithConstructSignatures.js | 48 +- ...ctTypesIdentityWithConstructSignatures2.js | 48 +- ...ConstructSignaturesDifferingParamCounts.js | 48 +- ...tTypesIdentityWithGenericCallSignatures.js | 75 +- ...TypesIdentityWithGenericCallSignatures2.js | 75 +- ...ricCallSignaturesDifferingByConstraints.js | 75 +- ...icCallSignaturesDifferingByConstraints2.js | 85 +- ...icCallSignaturesDifferingByConstraints3.js | 85 +- ...ericCallSignaturesDifferingByReturnType.js | 75 +- ...ricCallSignaturesDifferingByReturnType2.js | 75 +- ...lSignaturesDifferingTypeParameterCounts.js | 75 +- ...SignaturesDifferingTypeParameterCounts2.js | 21 +- ...llSignaturesDifferingTypeParameterNames.js | 75 +- ...WithGenericCallSignaturesOptionalParams.js | 75 +- ...ithGenericCallSignaturesOptionalParams2.js | 75 +- ...ithGenericCallSignaturesOptionalParams3.js | 75 +- ...nstructSignaturesDifferingByConstraints.js | 45 +- ...structSignaturesDifferingByConstraints2.js | 51 +- ...structSignaturesDifferingByConstraints3.js | 51 +- ...onstructSignaturesDifferingByReturnType.js | 51 +- ...nstructSignaturesDifferingByReturnType2.js | 48 +- ...tSignaturesDifferingTypeParameterCounts.js | 45 +- ...ctSignaturesDifferingTypeParameterNames.js | 45 +- ...enericConstructSignaturesOptionalParams.js | 45 +- ...nericConstructSignaturesOptionalParams2.js | 45 +- ...nericConstructSignaturesOptionalParams3.js | 45 +- ...objectTypesIdentityWithNumericIndexers1.js | 73 +- ...objectTypesIdentityWithNumericIndexers2.js | 73 +- ...objectTypesIdentityWithNumericIndexers3.js | 73 +- .../objectTypesIdentityWithOptionality.js | 31 +- .../objectTypesIdentityWithPrivates.js | 73 +- .../objectTypesIdentityWithPrivates2.js | 18 +- .../objectTypesIdentityWithPublics.js | 55 +- .../objectTypesIdentityWithStringIndexers.js | 73 +- .../objectTypesIdentityWithStringIndexers2.js | 73 +- .../objectTypesWithOptionalProperties2.js | 4 +- .../optionalAccessorsInInterface1.js | 12 +- .../reference/optionalBindingParameters1.js | 12 +- .../reference/optionalBindingParameters2.js | 12 +- .../optionalBindingParametersInOverloads1.js | 12 +- .../optionalBindingParametersInOverloads2.js | 12 +- .../optionalConstructorArgInSuper.js | 3 +- .../optionalFunctionArgAssignability.js | 8 +- .../reference/optionalParamArgsTest.js | 53 +- .../reference/optionalParamInOverride.js | 6 +- .../reference/optionalPropertiesTest.js | 37 +- .../reference/optionalSetterParam.js | 3 +- .../orderMattersForSignatureGroupIdentity.js | 10 +- .../overEagerReturnTypeSpecialization.js | 16 +- .../reference/overloadAssignmentCompat.js | 4 +- tests/baselines/reference/overloadCallTest.js | 4 +- .../reference/overloadModifiersMustAgree.js | 6 +- .../overloadOnConstConstraintChecks1.js | 12 +- .../overloadOnConstConstraintChecks2.js | 3 +- .../overloadOnConstConstraintChecks3.js | 3 +- .../overloadOnConstConstraintChecks4.js | 3 +- ...tInObjectLiteralImplementingAnInterface.js | 5 +- .../overloadOnConstNoAnyImplementation.js | 12 +- .../overloadOnConstNoAnyImplementation2.js | 16 +- ...verloadOnConstNoNonSpecializedSignature.js | 3 +- .../overloadOnConstNoStringImplementation.js | 12 +- .../overloadOnConstNoStringImplementation2.js | 16 +- .../overloadOnConstantsInvalidOverload1.js | 12 +- .../baselines/reference/overloadResolution.js | 27 +- .../overloadResolutionClassConstructors.js | 12 +- .../overloadResolutionConstructors.js | 8 +- .../overloadResolutionOverCTLambda.js | 7 +- .../overloadResolutionOverNonCTLambdas.js | 16 +- .../overloadResolutionOverNonCTObjectLit.js | 14 +- .../reference/overloadResolutionTest1.js | 52 +- ...CallbacksWithDifferingOptionalityOnArgs.js | 11 +- .../reference/overloadingOnConstants1.js | 12 +- .../overloadingStaticFunctionsInFunctions.js | 3 +- ...esolutionWithConstraintCheckingDeferred.js | 8 +- ...sInDifferentContainersDisagreeOnAmbient.js | 3 +- .../overloadsWithProvisionalErrors.js | 17 +- .../reference/overloadsWithinClasses.js | 9 +- ...parameterInitializersForwardReferencing.js | 14 +- .../parametersWithNoAnnotationAreAny.js | 20 +- .../parenthesizedContexualTyping1.js | 94 +- .../parenthesizedContexualTyping2.js | 114 +- tests/baselines/reference/parse1.js | 3 +- tests/baselines/reference/parseTypes.js | 8 +- .../reference/parser15.4.4.14-9-2.js | 11 +- tests/baselines/reference/parser509667.js | 3 +- tests/baselines/reference/parser509669.js | 3 +- tests/baselines/reference/parser512097.js | 4 +- tests/baselines/reference/parser521128.js | 3 +- tests/baselines/reference/parser536727.js | 12 +- tests/baselines/reference/parser553699.js | 3 +- .../parserAccessibilityAfterStatic10.js | 3 +- .../parserAccessibilityAfterStatic11.js | 3 +- .../parserAccessibilityAfterStatic14.js | 3 +- .../parserAccessibilityAfterStatic7.js | 3 +- tests/baselines/reference/parserAccessors1.js | 3 +- .../baselines/reference/parserAccessors10.js | 3 +- tests/baselines/reference/parserAccessors2.js | 3 +- tests/baselines/reference/parserAccessors3.js | 5 +- tests/baselines/reference/parserAccessors4.js | 5 +- tests/baselines/reference/parserAccessors7.js | 5 +- tests/baselines/reference/parserAccessors8.js | 5 +- tests/baselines/reference/parserAccessors9.js | 5 +- .../parserAmbiguityWithBinaryOperator1.js | 3 +- .../parserAmbiguityWithBinaryOperator2.js | 3 +- .../parserAmbiguityWithBinaryOperator3.js | 3 +- .../parserAmbiguityWithBinaryOperator4.js | 3 +- .../parserArrayLiteralExpression10.js | 5 +- .../parserArrayLiteralExpression11.js | 6 +- .../parserArrayLiteralExpression12.js | 7 +- .../parserArrayLiteralExpression13.js | 8 +- .../parserArrayLiteralExpression14.js | 14 +- .../parserArrayLiteralExpression15.js | 14 +- .../parserArrayLiteralExpression2.js | 4 +- .../parserArrayLiteralExpression3.js | 5 +- .../parserArrayLiteralExpression4.js | 6 +- .../parserArrayLiteralExpression5.js | 4 +- .../parserArrayLiteralExpression6.js | 5 +- .../parserArrayLiteralExpression7.js | 4 +- .../parserArrayLiteralExpression8.js | 5 +- .../parserArrayLiteralExpression9.js | 5 +- .../parserArrowFunctionExpression1.js | 3 +- .../parserArrowFunctionExpression2.js | 3 +- .../parserArrowFunctionExpression3.js | 3 +- .../parserArrowFunctionExpression4.js | 3 +- .../parserCastVersusArrowFunction1.js | 12 +- tests/baselines/reference/parserClass1.js | 20 +- .../reference/parserClassDeclaration11.js | 3 +- .../reference/parserClassDeclaration13.js | 3 +- .../reference/parserClassDeclaration16.js | 3 +- .../reference/parserClassDeclaration19.js | 3 +- .../reference/parserClassDeclaration20.js | 3 +- .../reference/parserClassDeclaration21.js | 3 +- .../reference/parserClassDeclaration22.js | 3 +- .../reference/parserCommaInTypeMemberList2.js | 4 +- .../reference/parserComputedPropertyName1.js | 4 +- .../reference/parserComputedPropertyName12.js | 3 +- .../reference/parserComputedPropertyName17.js | 5 +- .../reference/parserComputedPropertyName2.js | 4 +- .../reference/parserComputedPropertyName24.js | 3 +- .../reference/parserComputedPropertyName3.js | 5 +- .../reference/parserComputedPropertyName33.js | 3 +- .../reference/parserComputedPropertyName38.js | 3 +- .../reference/parserComputedPropertyName39.js | 3 +- .../reference/parserComputedPropertyName4.js | 5 +- .../reference/parserComputedPropertyName40.js | 3 +- .../reference/parserComputedPropertyName5.js | 5 +- .../reference/parserComputedPropertyName6.js | 5 +- .../reference/parserES3Accessors1.js | 3 +- .../reference/parserES3Accessors2.js | 3 +- .../reference/parserES3Accessors3.js | 5 +- .../reference/parserES3Accessors4.js | 5 +- .../parserES5ComputedPropertyName3.js | 3 +- .../parserES5ComputedPropertyName4.js | 7 +- .../reference/parserES5ForOfStatement17.js | 3 +- .../reference/parserES5ForOfStatement18.js | 3 +- .../reference/parserES5ForOfStatement19.js | 3 +- .../reference/parserES5ForOfStatement20.js | 3 +- .../reference/parserES5ForOfStatement21.js | 3 +- .../reference/parserES5SymbolProperty7.js | 3 +- .../parserErrantSemicolonInClass1.js | 8 +- ...serErrorRecoveryArrayLiteralExpression1.js | 11 +- ...serErrorRecoveryArrayLiteralExpression2.js | 12 +- ...serErrorRecoveryArrayLiteralExpression3.js | 7 +- .../reference/parserErrorRecovery_Block1.js | 3 +- .../reference/parserErrorRecovery_Block3.js | 3 +- ...ErrorRecovery_IncompleteMemberVariable1.js | 4 +- ...ErrorRecovery_IncompleteMemberVariable2.js | 4 +- .../parserErrorRecovery_ObjectLiteral1.js | 5 +- .../parserErrorRecovery_ObjectLiteral2.js | 6 +- .../parserErrorRecovery_ObjectLiteral3.js | 6 +- .../parserErrorRecovery_ObjectLiteral4.js | 6 +- .../parserErrorRecovery_ObjectLiteral5.js | 6 +- .../parserErrorRecovery_ParameterList6.js | 3 +- .../parserErrorRecovery_SwitchStatement1.js | 6 +- .../reference/parserForOfStatement17.js | 3 +- .../reference/parserForOfStatement18.js | 3 +- .../reference/parserForOfStatement19.js | 3 +- .../reference/parserForOfStatement20.js | 3 +- .../reference/parserForOfStatement21.js | 3 +- .../reference/parserFunctionDeclaration4.js | 3 +- .../reference/parserFunctionDeclaration5.js | 3 +- .../reference/parserFunctionDeclaration6.js | 3 +- .../parserFunctionPropertyAssignment1.js | 5 +- .../parserFunctionPropertyAssignment2.js | 5 +- .../parserFunctionPropertyAssignment3.js | 5 +- .../parserFunctionPropertyAssignment4.js | 5 +- tests/baselines/reference/parserFuzz1.js | 6 +- .../parserGetAccessorWithTypeParameters1.js | 3 +- .../parserGreaterThanTokenAmbiguity10.js | 3 +- .../parserGreaterThanTokenAmbiguity14.js | 3 +- .../parserGreaterThanTokenAmbiguity15.js | 3 +- .../parserGreaterThanTokenAmbiguity19.js | 3 +- .../parserGreaterThanTokenAmbiguity20.js | 3 +- .../parserGreaterThanTokenAmbiguity4.js | 3 +- .../parserGreaterThanTokenAmbiguity5.js | 3 +- .../parserGreaterThanTokenAmbiguity9.js | 3 +- .../reference/parserInExpression1.js | 4 +- .../reference/parserMemberAccessor1.js | 6 +- .../parserMemberAccessorDeclaration1.js | 3 +- .../parserMemberAccessorDeclaration10.js | 3 +- .../parserMemberAccessorDeclaration11.js | 3 +- .../parserMemberAccessorDeclaration12.js | 3 +- .../parserMemberAccessorDeclaration13.js | 3 +- .../parserMemberAccessorDeclaration14.js | 3 +- .../parserMemberAccessorDeclaration15.js | 3 +- .../parserMemberAccessorDeclaration17.js | 3 +- .../parserMemberAccessorDeclaration2.js | 3 +- .../parserMemberAccessorDeclaration3.js | 3 +- .../parserMemberAccessorDeclaration4.js | 3 +- .../parserMemberAccessorDeclaration5.js | 3 +- .../parserMemberAccessorDeclaration6.js | 3 +- .../parserMemberAccessorDeclaration7.js | 3 +- .../parserMemberAccessorDeclaration8.js | 3 +- .../parserMemberAccessorDeclaration9.js | 3 +- .../parserMemberFunctionDeclaration1.js | 3 +- .../parserMemberFunctionDeclaration2.js | 3 +- .../parserMemberFunctionDeclaration3.js | 3 +- .../parserMemberFunctionDeclaration4.js | 3 +- .../parserMemberFunctionDeclaration5.js | 3 +- ...erMemberFunctionDeclarationAmbiguities1.js | 24 +- .../parserMissingLambdaOpenBrace1.js | 4 +- .../reference/parserMissingToken1.js | 6 +- ...rserNoASIOnCallAfterFunctionExpression1.js | 3 +- .../reference/parserNotHexLiteral1.js | 5 +- .../reference/parserObjectLiterals1.js | 5 +- .../reference/parserParameterList1.js | 3 +- .../reference/parserParameterList15.js | 3 +- .../reference/parserParameterList16.js | 3 +- .../reference/parserParameterList3.js | 3 +- .../baselines/reference/parserRealSource1.js | 60 +- .../baselines/reference/parserRealSource10.js | 3 +- .../baselines/reference/parserRealSource11.js | 228 +- .../baselines/reference/parserRealSource14.js | 223 +- .../baselines/reference/parserRealSource4.js | 8 +- .../baselines/reference/parserRealSource6.js | 3 +- .../baselines/reference/parserRealSource7.js | 39 +- .../baselines/reference/parserRealSource8.js | 21 +- .../baselines/reference/parserRealSource9.js | 4 +- ...parserRegularExpressionDivideAmbiguity1.js | 3 +- .../reference/parserReturnStatement4.js | 6 +- .../parserSetAccessorWithTypeParameters1.js | 3 +- .../parserShorthandPropertyAssignment1.js | 8 +- .../parserShorthandPropertyAssignment2.js | 4 +- .../parserShorthandPropertyAssignment3.js | 4 +- .../parserShorthandPropertyAssignment4.js | 4 +- .../parserShorthandPropertyAssignment5.js | 4 +- .../reference/parserSkippedTokens16.js | 9 +- .../baselines/reference/parserStrictMode12.js | 5 +- .../reference/parserSymbolIndexer5.js | 3 +- .../reference/parserSymbolProperty7.js | 3 +- .../reference/parserUnaryExpression2.js | 3 +- .../reference/parserUnaryExpression3.js | 4 +- .../parserUnicodeWhitespaceCharacter1.js | 3 +- .../parserUsingConstructorAsIdentifier.js | 16 +- tests/baselines/reference/parserharness.js | 244 +- tests/baselines/reference/parserindenter.js | 14 +- ...sRecoversWhenHittingUnexpectedSemicolon.js | 3 +- .../reference/partiallyAmbientFundule.js | 3 +- .../reference/plusOperatorWithAnyOtherType.js | 12 +- .../reference/plusOperatorWithBooleanType.js | 13 +- .../reference/plusOperatorWithNumberType.js | 25 +- .../reference/plusOperatorWithStringType.js | 25 +- .../reference/primitiveConstraints1.js | 6 +- tests/baselines/reference/primitiveMembers.js | 11 +- .../reference/primtiveTypesAreIdentical.js | 21 +- ...ivateClassPropertyAccessibleWithinClass.js | 56 +- .../reference/privateInstanceVisibility.js | 4 +- .../privateStaticMemberAccessibility.js | 4 +- .../baselines/reference/privateVisibility.js | 7 +- tests/baselines/reference/privateVisibles.js | 4 +- .../reference/project/baseline/amd/decl.js | 5 +- .../reference/project/baseline/node/decl.js | 5 +- .../reference/project/baseline2/amd/decl.js | 5 +- .../project/baseline2/amd/dont_emit.js | 5 +- .../reference/project/baseline2/node/decl.js | 5 +- .../project/baseline2/node/dont_emit.js | 5 +- .../project/nonRelative/amd/lib/bar/a.js | 3 +- .../project/nonRelative/amd/lib/foo/a.js | 3 +- .../project/nonRelative/amd/lib/foo/b.js | 3 +- .../project/nonRelative/node/lib/bar/a.js | 3 +- .../project/nonRelative/node/lib/foo/a.js | 3 +- .../project/nonRelative/node/lib/foo/b.js | 3 +- .../reference/project/prologueEmit/amd/out.js | 4 +- .../project/prologueEmit/node/out.js | 4 +- .../amd/li'b/class'A.js | 3 +- .../node/li'b/class'A.js | 3 +- tests/baselines/reference/promiseChaining.js | 8 +- tests/baselines/reference/promiseChaining1.js | 8 +- tests/baselines/reference/promiseChaining2.js | 8 +- .../reference/promisePermutations.js | 16 +- .../reference/promisePermutations2.js | 16 +- .../reference/promisePermutations3.js | 16 +- .../reference/promiseTypeInference.js | 4 +- tests/baselines/reference/propertyAccess.js | 21 +- ...tyAccessOnTypeParameterWithConstraints2.js | 4 +- ...tyAccessOnTypeParameterWithConstraints3.js | 4 +- ...tyAccessOnTypeParameterWithConstraints5.js | 4 +- .../propertyAndAccessorWithSameName.js | 6 +- .../propertyAndFunctionWithSameName.js | 3 +- tests/baselines/reference/propertyOrdering.js | 4 +- .../reference/propertyWrappedInTry.js | 3 +- ...ectedClassPropertyAccessibleWithinClass.js | 56 +- ...edClassPropertyAccessibleWithinSubclass.js | 32 +- tests/baselines/reference/prototypes.js | 3 +- .../reference/qualifiedModuleLocals.js | 7 +- .../reference/quotedAccessorName1.js | 4 +- .../reference/quotedAccessorName2.js | 4 +- .../reference/quotedFunctionName1.js | 3 +- .../reference/quotedFunctionName2.js | 3 +- .../reference/quotedPropertyName3.js | 4 +- tests/baselines/reference/rectype.js | 4 +- tests/baselines/reference/recur1.js | 6 +- .../recursiveBaseConstructorCreation1.js | 3 +- .../reference/recursiveClassReferenceTest.js | 20 +- .../recursiveClassReferenceTest.js.map | 2 +- .../recursiveClassReferenceTest.sourcemap.txt | 938 +++-- .../reference/recursiveFunctionTypes.js | 28 +- .../reference/recursiveFunctionTypes1.js | 3 +- .../reference/recursiveGetterAccess.js | 4 +- .../recursiveIdenticalOverloadResolution.js | 4 +- .../reference/recursiveInference1.js | 4 +- .../reference/recursiveInferenceBug.js | 7 +- .../reference/recursiveInheritance3.js | 4 +- .../reference/recursiveInitializer.js | 4 +- .../reference/recursiveObjectLiteral.js | 4 +- .../reference/recursiveProperties.js | 8 +- tests/baselines/reference/recursiveReturns.js | 4 +- .../recursiveTypesUsedAsFunctionParameters.js | 10 +- tests/baselines/reference/redefineArray.js | 4 +- ...lassDeclarationWhenInBaseTypeResolution.js | 2744 +++++++++--- .../reference/restArgAssignmentCompat.js | 11 +- .../reference/restElementMustBeLast.js | 12 +- .../reference/restParameterNotLast.js | 3 +- .../reference/returnInConstructor1.js | 26 +- tests/baselines/reference/returnStatements.js | 53 +- .../reference/returnTypeParameter.js | 7 +- .../returnTypeParameterWithModules.js | 11 +- .../reference/returnTypeTypeArguments.js | 68 +- ...verseInferenceInContextualInstantiation.js | 4 +- tests/baselines/reference/scannertest1.js | 10 +- .../reference/scopingInCatchBlocks.js | 15 +- tests/baselines/reference/selfInCallback.js | 8 +- tests/baselines/reference/selfInLambdas.js | 4 +- tests/baselines/reference/separate1-2.js | 3 +- .../reference/shadowPrivateMembers.js | 6 +- .../reference/shadowedInternalModule.js | 10 +- ...tionParameterReferencedInObjectLiteral1.js | 8 +- .../reference/sourceMap-FileWithComments.js | 4 +- .../sourceMap-FileWithComments.js.map | 2 +- .../sourceMap-FileWithComments.sourcemap.txt | 326 +- ...aultConstructorAndCapturedThisStatement.js | 4 +- ...ConstructorAndCapturedThisStatement.js.map | 2 +- ...ctorAndCapturedThisStatement.sourcemap.txt | 70 +- .../sourceMapValidationFunctionExpressions.js | 4 +- ...rceMapValidationFunctionExpressions.js.map | 2 +- ...alidationFunctionExpressions.sourcemap.txt | 50 +- ...MapValidationFunctionPropertyAssignment.js | 5 +- ...alidationFunctionPropertyAssignment.js.map | 2 +- ...onFunctionPropertyAssignment.sourcemap.txt | 48 +- .../sourceMapValidationStatements.js | 29 +- .../sourceMapValidationStatements.js.map | 2 +- ...ourceMapValidationStatements.sourcemap.txt | 493 +-- ...eBeforeQuestionMarkInPropertyAssignment.js | 4 +- ...specializationsShouldNotAffectEachOther.js | 8 +- .../baselines/reference/specializeVarArgs1.js | 4 +- .../specializedInheritedConstructors1.js | 8 +- .../specializedOverloadWithRestParameters.js | 6 +- ...pecializedSignatureAsCallbackParameter1.js | 8 +- ...reIsNotSubtypeOfNonSpecializedSignature.js | 12 +- ...atureIsSubtypeOfNonSpecializedSignature.js | 12 +- .../reference/staticAndMemberFunctions.js | 6 +- .../staticAndNonStaticPropertiesSameName.js | 6 +- tests/baselines/reference/staticClassProps.js | 3 +- tests/baselines/reference/staticFactory1.js | 8 +- .../reference/staticGetterAndSetter.js | 7 +- .../baselines/reference/staticInheritance.js | 3 +- .../reference/staticInstanceResolution4.js | 3 +- .../reference/staticInstanceResolution5.js | 9 +- ...mberAssignsToConstructorFunctionMembers.js | 14 +- .../reference/staticMemberExportAccess.js | 4 +- ...AndPublicMemberOfAnotherClassAssignment.js | 6 +- .../staticMembersUsingClassTypeParameter.js | 9 +- ...icMethodsReferencingClassTypeParameters.js | 4 +- .../reference/staticModifierAlreadySeen.js | 3 +- .../reference/staticOffOfInstance1.js | 3 +- .../reference/staticOffOfInstance2.js | 3 +- .../staticPropertyAndFunctionWithSameName.js | 3 +- .../reference/staticPropertyNotInClassType.js | 22 +- .../reference/staticPrototypeProperty.js | 3 +- tests/baselines/reference/staticVisibility.js | 8 +- tests/baselines/reference/statics.js | 4 +- .../baselines/reference/staticsInAFunction.js | 3 +- .../reference/staticsInConstructorBodies.js | 3 +- tests/baselines/reference/strictMode5.js | 3 +- .../reference/stringIndexerAndConstructor.js | 3 +- ...ngIndexerConstrainsPropertyDeclarations.js | 12 +- ...gIndexerConstrainsPropertyDeclarations2.js | 8 +- .../reference/stringIndexingResults.js | 4 +- .../stringLiteralObjectLiteralDeclaration1.js | 4 +- ...iteralPropertyNameWithLineContinuation1.js | 6 +- .../stringLiteralTypeIsSubtypeOfString.js | 120 +- ...gLiteralTypesInImplementationSignatures.js | 21 +- ...LiteralTypesInImplementationSignatures2.js | 12 +- .../baselines/reference/stringPropCodeGen.js | 3 +- tests/baselines/reference/stripInternal1.js | 6 +- tests/baselines/reference/structural1.js | 5 +- tests/baselines/reference/subtypesOfAny.js | 3 +- .../reference/subtypesOfTypeParameter.js | 25 +- ...subtypesOfTypeParameterWithConstraints2.js | 25 +- tests/baselines/reference/subtypesOfUnion.js | 3 +- .../reference/subtypingWithCallSignatures.js | 16 +- .../reference/subtypingWithCallSignatures2.js | 281 +- .../reference/subtypingWithCallSignatures3.js | 166 +- .../reference/subtypingWithCallSignatures4.js | 173 +- .../reference/subtypingWithCallSignaturesA.js | 4 +- .../subtypingWithConstructSignatures2.js | 140 +- .../subtypingWithConstructSignatures3.js | 80 +- .../subtypingWithConstructSignatures4.js | 90 +- .../subtypingWithObjectMembersOptionality.js | 8 +- .../subtypingWithOptionalProperties.js | 4 +- tests/baselines/reference/superAccess.js | 4 +- tests/baselines/reference/superAccess2.js | 10 +- ...eButWithIncorrectNumberOfTypeArguments1.js | 4 +- ...sFromGenericTypeButWithNoTypeArguments1.js | 4 +- ...ivesNonGenericTypeButWithTypeArguments1.js | 4 +- .../superCallFromClassThatHasNoBaseType1.js | 4 +- .../reference/superCallFromFunction1.js | 4 +- .../reference/superCallInNonStaticMethod.js | 4 +- .../reference/superCallOutsideConstructor.js | 3 +- .../superCallParameterContextualTyping1.js | 4 +- .../superCallParameterContextualTyping2.js | 4 +- tests/baselines/reference/superCalls.js | 3 +- .../reference/superCallsInConstructor.js | 9 +- tests/baselines/reference/superErrors.js | 44 +- .../baselines/reference/superInCatchBlock1.js | 3 +- tests/baselines/reference/superInLambdas.js | 52 +- tests/baselines/reference/superNewCall1.js | 4 +- .../reference/superPropertyAccess.js | 21 +- .../reference/superPropertyAccess1.js | 6 +- .../reference/superPropertyAccess2.js | 6 +- .../reference/superPropertyAccessNoError.js | 4 +- .../reference/superWithTypeArgument3.js | 3 +- ...side-object-literal-getters-and-setters.js | 4 +- .../reference/switchAssignmentCompat.js | 3 +- .../reference/switchBreakStatements.js | 3 +- .../switchCasesExpressionTypeMismatch.js | 24 +- .../baselines/reference/switchFallThroughs.js | 7 +- tests/baselines/reference/switchStatements.js | 37 +- .../switchStatementsWithMultipleDefaults.js | 3 +- .../reference/symbolDeclarationEmit10.js | 7 +- .../reference/symbolDeclarationEmit11.js | 10 +- .../reference/symbolDeclarationEmit12.js | 10 +- .../reference/symbolDeclarationEmit13.js | 7 +- .../reference/symbolDeclarationEmit14.js | 8 +- .../reference/symbolDeclarationEmit3.js | 3 +- .../reference/symbolDeclarationEmit4.js | 7 +- .../reference/symbolDeclarationEmit9.js | 3 +- tests/baselines/reference/symbolProperty1.js | 3 +- tests/baselines/reference/symbolProperty18.js | 7 +- tests/baselines/reference/symbolProperty19.js | 10 +- tests/baselines/reference/symbolProperty2.js | 3 +- tests/baselines/reference/symbolProperty20.js | 4 +- tests/baselines/reference/symbolProperty22.js | 4 +- tests/baselines/reference/symbolProperty28.js | 4 +- tests/baselines/reference/symbolProperty29.js | 4 +- tests/baselines/reference/symbolProperty3.js | 3 +- tests/baselines/reference/symbolProperty30.js | 4 +- tests/baselines/reference/symbolProperty31.js | 4 +- tests/baselines/reference/symbolProperty32.js | 4 +- tests/baselines/reference/symbolProperty33.js | 4 +- tests/baselines/reference/symbolProperty34.js | 4 +- tests/baselines/reference/symbolProperty4.js | 3 +- tests/baselines/reference/symbolProperty48.js | 3 +- tests/baselines/reference/symbolProperty49.js | 3 +- tests/baselines/reference/symbolProperty5.js | 3 +- tests/baselines/reference/symbolProperty50.js | 3 +- tests/baselines/reference/symbolProperty51.js | 3 +- tests/baselines/reference/symbolProperty6.js | 3 +- tests/baselines/reference/symbolProperty7.js | 3 +- tests/baselines/reference/symbolType13.js | 9 +- .../taggedTemplateContextualTyping1.js | 29 +- .../taggedTemplateContextualTyping2.js | 18 +- ...gedTemplateStringsTypeArgumentInference.js | 137 +- ...TemplateStringsTypeArgumentInferenceES6.js | 53 +- ...dTemplateStringsWithOverloadResolution3.js | 27 +- ...plateStringsWithOverloadResolution3_ES6.js | 19 +- ...tionExpressionsInSubstitutionExpression.js | 4 +- ...nExpressionsInSubstitutionExpressionES6.js | 4 +- tests/baselines/reference/targetTypeArgs.js | 40 +- .../reference/targetTypeBaseCalls.js | 15 +- tests/baselines/reference/targetTypeCalls.js | 28 +- .../baselines/reference/targetTypeCastTest.js | 8 +- .../reference/targetTypeObjectLiteralToAny.js | 5 +- tests/baselines/reference/targetTypeTest1.js | 18 +- tests/baselines/reference/targetTypeTest2.js | 18 +- tests/baselines/reference/targetTypeTest3.js | 18 +- .../baselines/reference/targetTypeVoidFunc.js | 4 +- .../reference/targetTypingOnFunctions.js | 8 +- .../reference/templateStringInArray.js | 6 +- .../templateStringInArrowFunction.js | 4 +- .../templateStringInEqualityChecks.js | 5 +- .../templateStringInEqualityChecksES6.js | 5 +- .../reference/templateStringInInOperator.js | 5 +- .../templateStringInInOperatorES6.js | 5 +- .../templateStringInObjectLiteral.js | 3 +- .../templateStringInObjectLiteralES6.js | 3 +- .../templateStringWithEmbeddedArray.js | 6 +- .../templateStringWithEmbeddedArrayES6.js | 6 +- ...templateStringWithEmbeddedArrowFunction.js | 4 +- ...ateStringWithEmbeddedFunctionExpression.js | 4 +- ...StringWithEmbeddedFunctionExpressionES6.js | 4 +- .../templateStringWithEmbeddedInOperator.js | 5 +- ...templateStringWithEmbeddedInOperatorES6.js | 5 +- ...templateStringWithEmbeddedObjectLiteral.js | 5 +- ...plateStringWithEmbeddedObjectLiteralES6.js | 5 +- ...tionExpressionsInSubstitutionExpression.js | 4 +- ...nExpressionsInSubstitutionExpressionES6.js | 4 +- .../reference/ternaryExpressionSourceMap.js | 6 +- .../ternaryExpressionSourceMap.js.map | 2 +- .../ternaryExpressionSourceMap.sourcemap.txt | 75 +- tests/baselines/reference/thisBinding.js | 5 +- tests/baselines/reference/thisBinding2.js | 4 +- ...essionInCallExpressionWithTypeArguments.js | 8 +- .../thisExpressionInIndexExpression.js | 4 +- .../thisExpressionOfGenericObject.js | 4 +- tests/baselines/reference/thisInAccessors.js | 16 +- ...thisInArrowFunctionInStaticInitializer1.js | 3 +- .../reference/thisInInnerFunctions.js | 8 +- .../reference/thisInInvalidContexts.js | 3 +- .../thisInInvalidContextsExternalModule.js | 3 +- tests/baselines/reference/thisInLambda.js | 7 +- .../reference/thisInObjectLiterals.js | 5 +- .../reference/thisInOuterClassBody.js | 4 +- .../thisInPropertyBoundDeclarations.js | 47 +- ...eferencedInFunctionInsideArrowFunction1.js | 7 +- .../reference/throwInEnclosingStatements.js | 4 +- tests/baselines/reference/throwStatements.js | 36 +- ...ArgumentsInGenericFunctionTypedArgument.js | 8 +- .../reference/tooManyTypeParameters1.js | 6 +- tests/baselines/reference/topLevelExports.js | 4 +- tests/baselines/reference/topLevelLambda.js | 4 +- tests/baselines/reference/topLevelLambda2.js | 7 +- tests/baselines/reference/topLevelLambda3.js | 4 +- tests/baselines/reference/topLevelLambda4.js | 4 +- ...railingCommaInHeterogenousArrayLiteral1.js | 17 +- .../baselines/reference/trailingCommasES3.js | 38 +- .../baselines/reference/trailingCommasES5.js | 38 +- tests/baselines/reference/tryCatchFinally.js | 21 +- tests/baselines/reference/tryStatements.js | 15 +- tests/baselines/reference/tupleTypes.js | 49 +- .../reference/twoAccessorsWithSameName.js | 13 +- .../reference/twoAccessorsWithSameName2.js | 10 +- tests/baselines/reference/typeAliases.js | 5 +- ...eAnnotationBestCommonTypeInArrayLiteral.js | 3 +- tests/baselines/reference/typeArgInference.js | 29 +- .../baselines/reference/typeArgInference2.js | 21 +- .../reference/typeArgInferenceWithNull.js | 20 +- .../typeArgumentConstraintResolution1.js | 7 +- .../reference/typeArgumentInference.js | 164 +- ...ypeArgumentInferenceConstructSignatures.js | 146 +- .../reference/typeArgumentInferenceErrors.js | 28 +- .../typeArgumentInferenceOrdering.js | 4 +- ...eArgumentInferenceTransitiveConstraints.js | 6 +- ...mentInferenceWithConstraintAsCommonRoot.js | 4 +- .../typeArgumentInferenceWithConstraints.js | 180 +- .../typeArgumentInferenceWithObjectLiteral.js | 64 +- .../typeAssertionToGenericFunctionType.js | 8 +- tests/baselines/reference/typeAssertions.js | 6 +- .../reference/typeCheckTypeArgument.js | 9 +- ...CheckingInsideFunctionExpressionInArray.js | 12 +- tests/baselines/reference/typeGuardsDefeat.js | 4 +- .../typeGuardsInConditionalExpression.js | 77 +- .../typeGuardsInFunctionAndModuleBlock.js | 62 +- .../reference/typeGuardsInIfStatement.js | 26 +- ...ypeGuardsInRightOperandOfAndAndOperator.js | 30 +- .../typeGuardsInRightOperandOfOrOrOperator.js | 30 +- .../baselines/reference/typeGuardsWithAny.js | 4 +- .../reference/typeIdentityConsidersBrands.js | 6 +- tests/baselines/reference/typeInfer1.js | 10 +- .../typeInferenceConflictingCandidates.js | 4 +- .../reference/typeInferenceFixEarly.js | 4 +- .../reference/typeInferenceWithTupleType.js | 25 +- .../typeInferenceWithTypeAnnotation.js | 4 +- .../reference/typeLiteralCallback.js | 8 +- tests/baselines/reference/typeMatch2.js | 80 +- tests/baselines/reference/typeOfOnTypeArg.js | 4 +- .../reference/typeOfThisInInstanceMember.js | 6 +- .../reference/typeOfThisInInstanceMember2.js | 6 +- .../reference/typeParameterAsElementType.js | 5 +- .../typeParameterAsTypeParameterConstraint.js | 28 +- ...typeParameterAsTypeParameterConstraint2.js | 20 +- ...erAsTypeParameterConstraintTransitively.js | 36 +- ...rAsTypeParameterConstraintTransitively2.js | 30 +- ...rameterCompatibilityAccrossDeclarations.js | 8 +- .../reference/typeParameterConstraints1.js | 39 +- ...ypeParameterDirectlyConstrainedToItself.js | 12 +- ...eParameterIndirectlyConstrainedToItself.js | 12 +- .../reference/typeParameterOrderReversal.js | 6 +- .../typeParameterUsedAsConstraint.js | 36 +- .../typeParametersAreIdenticalToThemselves.js | 33 +- .../typeParametersInStaticAccessors.js | 7 +- tests/baselines/reference/typeQueryOnClass.js | 21 +- tests/baselines/reference/typeResolution.js | 15 +- .../baselines/reference/typeResolution.js.map | 2 +- .../reference/typeResolution.sourcemap.txt | 449 +- tests/baselines/reference/typeVal.js | 4 +- .../reference/typedGenericPrototypeMember.js | 3 +- .../reference/typeofANonExportedType.js | 7 +- .../reference/typeofAnExportedType.js | 7 +- tests/baselines/reference/typeofClass2.js | 12 +- tests/baselines/reference/typeofInterface.js | 4 +- .../typeofOperatorWithAnyOtherType.js | 11 +- .../typeofOperatorWithBooleanType.js | 18 +- .../reference/typeofOperatorWithNumberType.js | 30 +- .../reference/typeofOperatorWithStringType.js | 30 +- .../typesWithDuplicateTypeParameters.js | 6 +- .../reference/typesWithOptionalProperty.js | 17 +- .../reference/uncaughtCompilerError1.js | 10 +- tests/baselines/reference/undeclaredMethod.js | 3 +- .../reference/undeclaredModuleError.js | 3 +- .../reference/undefinedArgumentInference.js | 5 +- .../undefinedIsSubtypeOfEverything.js | 3 +- ...ndefinedSymbolReferencedInArrayLiteral1.js | 18 +- tests/baselines/reference/underscoreTest1.js | 658 ++- .../unexpectedStatementBlockTerminator.js | 7 +- ...nSubtypeIfEveryConstituentTypeIsSubtype.js | 3 +- .../reference/unionTypeEquivalence.js | 3 +- .../reference/unionTypeFromArrayLiteral.js | 64 +- .../baselines/reference/unionTypeInference.js | 5 +- .../reference/unionTypesAssignability.js | 6 +- tests/baselines/reference/unknownSymbols1.js | 3 +- tests/baselines/reference/unknownSymbols2.js | 8 +- .../reference/unspecializedConstraints.js | 16 +- ...untypedFunctionCallsWithTypeParameters1.js | 7 +- .../validMultipleVariableDeclarations.js | 41 +- .../reference/validUseOfThisInSuper.js | 4 +- .../reference/varAndFunctionShareName.js | 3 +- tests/baselines/reference/vardecl.js | 16 +- tests/baselines/reference/voidArrayLit.js | 14 +- .../reference/voidAsNonAmbiguousReturnType.js | 3 +- .../reference/voidFunctionAssignmentCompat.js | 52 +- .../reference/voidOperatorWithAnyOtherType.js | 10 +- .../reference/voidOperatorWithBooleanType.js | 13 +- .../reference/voidOperatorWithNumberType.js | 25 +- .../reference/voidOperatorWithStringType.js | 25 +- .../reference/whileBreakStatements.js | 3 +- .../reference/whileContinueStatements.js | 3 +- tests/baselines/reference/widenToAny1.js | 5 +- tests/baselines/reference/widenToAny2.js | 5 +- tests/baselines/reference/widenedTypes.js | 30 +- tests/baselines/reference/widenedTypes1.js | 26 +- tests/baselines/reference/withExportDecl.js | 22 +- tests/baselines/reference/withImportDecl.js | 11 +- tests/baselines/reference/withStatement.js | 3 +- .../reference/withStatementErrors.js | 3 +- tests/baselines/reference/witness.js | 4 +- .../wrappedAndRecursiveConstraints3.js | 11 +- .../wrappedAndRecursiveConstraints4.js | 11 +- .../reference/wrappedIncovations1.js | 5 +- .../reference/wrappedIncovations2.js | 5 +- ...nePropertyAccessAndArrowFunctionIndent1.ts | 4 + 1891 files changed, 28573 insertions(+), 11183 deletions(-) create mode 100644 tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.errors.txt create mode 100644 tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js create mode 100644 tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 4ba2da757e5..a6fe773cd7b 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -140,6 +140,12 @@ module ts { description: Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation, experimental: true }, + { + name: "preserveFormatting", + type: "boolean", + description: Diagnostics.Preserve_new_lines_when_emitting_code, + experimental: true + }, { name: "target", shortName: "t", diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index f616de8bd4b..24ed8ce4e99 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -463,6 +463,7 @@ module ts { File_0_must_have_extension_ts_or_d_ts: { code: 6054, category: DiagnosticCategory.Error, key: "File '{0}' must have extension '.ts' or '.d.ts'." }, Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." }, + Preserve_new_lines_when_emitting_code: { code: 6057, category: DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." }, Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ddd3f72aaf0..40f7d55f9f0 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1844,6 +1844,10 @@ "category": "Message", "code": 6056 }, + "Preserve new-lines when emitting code.": { + "category": "Message", + "code": 6057 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 40f46958121..c7f132519ae 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1531,6 +1531,7 @@ module ts { var sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap ? [] : undefined; var diagnostics: Diagnostic[] = []; var newLine = host.getNewLine(); + var preserveNewLines = compilerOptions.preserveNewLines || false; if (targetSourceFile === undefined) { forEach(host.getSourceFiles(), sourceFile => { @@ -2172,7 +2173,7 @@ module ts { increaseIndent(); - if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) { + if (preserveNewLines && nodeStartPositionsAreOnSameLine(parent, nodes[0])) { if (spacesBetweenBraces) { write(" "); } @@ -2183,7 +2184,7 @@ module ts { for (var i = 0, n = nodes.length; i < n; i++) { if (i) { - if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { + if (preserveNewLines && nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { write(", "); } else { @@ -2195,15 +2196,13 @@ module ts { emit(nodes[i]); } - var closeTokenIsOnSameLineAsLastElement = nodeEndPositionsAreOnSameLine(parent, lastOrUndefined(nodes)); - if (nodes.hasTrailingComma && allowTrailingComma) { write(","); } decreaseIndent(); - if (closeTokenIsOnSameLineAsLastElement) { + if (preserveNewLines && nodeEndPositionsAreOnSameLine(parent, lastOrUndefined(nodes))) { if (spacesBetweenBraces) { write(" "); } @@ -3035,10 +3034,12 @@ module ts { } function indentIfOnDifferentLines(parent: Node, node1: Node, node2: Node) { - var isSynthesized = nodeIsSynthesized(parent); + // Use a newline for existin code if the original had one, and we're preserving formatting. + var realNodesAreOnDifferentLines = preserveNewLines && !nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); - var realNodesAreOnDifferentLines = !isSynthesized && !nodeEndIsOnSameLineAsNodeStart(node1, node2); + // Always use a newline for synthesized code if hte generator asked for it. var synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2); + if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) { increaseIndent(); writeLine(); @@ -3383,7 +3384,7 @@ module ts { } function emitBlock(node: Block) { - if (isSingleLineEmptyBlock(node)) { + if (preserveNewLines && isSingleLineEmptyBlock(node)) { emitToken(SyntaxKind.OpenBraceToken, node.pos); write(" "); emitToken(SyntaxKind.CloseBraceToken, node.statements.end); @@ -3600,7 +3601,8 @@ module ts { else { write("default:"); } - if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { + + if (preserveNewLines && node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { write(" "); emit(node.statements[0]); } @@ -4303,7 +4305,7 @@ module ts { // If we didn't have to emit any preamble code, then attempt to keep the arrow // function on one line. - if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { + if (preserveNewLines && !preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { write(" "); emitStart(body); write("return "); @@ -4354,7 +4356,7 @@ module ts { var preambleEmitted = writer.getTextPos() !== initialTextPos; - if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { + if (preserveNewLines && !preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { for (var i = 0, n = body.statements.length; i < n; i++) { write(" "); emit(body.statements[i]); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 21f21f97b18..abace7e224e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1554,6 +1554,7 @@ module ts { version?: boolean; watch?: boolean; stripInternal?: boolean; + preserveNewLines?: boolean; [option: string]: string | number | boolean; } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 26c06c7950c..6d9a77d4785 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1007,6 +1007,10 @@ module Harness { options.outDir = setting.value; break; + case 'preservenewlines': + options.preserveNewLines = !!setting.value; + break; + case 'sourceroot': options.sourceRoot = setting.value; break; diff --git a/tests/baselines/reference/2dArrays.js b/tests/baselines/reference/2dArrays.js index fe8ab380ba7..7840f3d8c54 100644 --- a/tests/baselines/reference/2dArrays.js +++ b/tests/baselines/reference/2dArrays.js @@ -30,7 +30,9 @@ var Board = (function () { function Board() { } Board.prototype.allShipsSunk = function () { - return this.ships.every(function (val) { return val.isSunk; }); + return this.ships.every(function (val) { + return val.isSunk; + }); }; return Board; })(); diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 423f00a5202..b2c299de7a2 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -1234,6 +1234,7 @@ declare module "typescript" { version?: boolean; watch?: boolean; stripInternal?: boolean; + preserveNewLines?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -2003,6 +2004,8 @@ function compile(fileNames, options) { } exports.compile = compile; compile(process.argv.slice(2), { - noEmitOnError: true, noImplicitAny: true, - target: 1 /* ES5 */, module: 1 /* CommonJS */ + noEmitOnError: true, + noImplicitAny: true, + target: 1 /* ES5 */, + module: 1 /* CommonJS */ }); diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index 8028c42e426..cd5078e6f4c 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -3939,6 +3939,9 @@ declare module "typescript" { stripInternal?: boolean; >stripInternal : boolean + preserveNewLines?: boolean; +>preserveNewLines : boolean + [option: string]: string | number | boolean; >option : string } diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 469adaa0202..73ead70933b 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -1265,6 +1265,7 @@ declare module "typescript" { version?: boolean; watch?: boolean; stripInternal?: boolean; + preserveNewLines?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -2037,8 +2038,7 @@ function delint(sourceFile) { if (ifStatement.thenStatement.kind !== 174 /* Block */) { report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body."); } - if (ifStatement.elseStatement && - ifStatement.elseStatement.kind !== 174 /* Block */ && ifStatement.elseStatement.kind !== 178 /* IfStatement */) { + if (ifStatement.elseStatement && ifStatement.elseStatement.kind !== 174 /* Block */ && ifStatement.elseStatement.kind !== 178 /* IfStatement */) { report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body."); } break; diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index 5b968d41c92..8632c09700d 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -4085,6 +4085,9 @@ declare module "typescript" { stripInternal?: boolean; >stripInternal : boolean + preserveNewLines?: boolean; +>preserveNewLines : boolean + [option: string]: string | number | boolean; >option : string } diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 75d74933eae..41edf853d44 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -1266,6 +1266,7 @@ declare module "typescript" { version?: boolean; watch?: boolean; stripInternal?: boolean; + preserveNewLines?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -2033,20 +2034,35 @@ function transform(contents, compilerOptions) { // Create a compilerHost object to allow the compiler to read and write files var compilerHost = { getSourceFile: function (fileName, target) { - return files[fileName] !== undefined ? - ts.createSourceFile(fileName, files[fileName], target) : undefined; + return files[fileName] !== undefined ? ts.createSourceFile(fileName, files[fileName], target) : undefined; }, writeFile: function (name, text, writeByteOrderMark) { - outputs.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); + outputs.push({ + name: name, + text: text, + writeByteOrderMark: writeByteOrderMark + }); }, - getDefaultLibFileName: function () { return "lib.d.ts"; }, - useCaseSensitiveFileNames: function () { return false; }, - getCanonicalFileName: function (fileName) { return fileName; }, - getCurrentDirectory: function () { return ""; }, - getNewLine: function () { return "\n"; } + getDefaultLibFileName: function () { + return "lib.d.ts"; + }, + useCaseSensitiveFileNames: function () { + return false; + }, + getCanonicalFileName: function (fileName) { + return fileName; + }, + getCurrentDirectory: function () { + return ""; + }, + getNewLine: function () { + return "\n"; + } }; // Create a program from inputs - var program = ts.createProgram(["file.ts"], compilerOptions, compilerHost); + var program = ts.createProgram([ + "file.ts" + ], compilerOptions, compilerHost); // Query for early errors var errors = ts.getPreEmitDiagnostics(program); var emitResult = program.emit(); @@ -2054,8 +2070,7 @@ function transform(contents, compilerOptions) { return { outputs: outputs, errors: errors.map(function (e) { - return e.file.fileName + "(" + (e.file.getLineAndCharacterOfPosition(e.start).line + 1) + "): " - + ts.flattenDiagnosticMessageText(e.messageText, os.EOL); + return e.file.fileName + "(" + (e.file.getLineAndCharacterOfPosition(e.start).line + 1) + "): " + ts.flattenDiagnosticMessageText(e.messageText, os.EOL); }) }; } diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index c164b9290a2..cfab2663ee4 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -4035,6 +4035,9 @@ declare module "typescript" { stripInternal?: boolean; >stripInternal : boolean + preserveNewLines?: boolean; +>preserveNewLines : boolean + [option: string]: string | number | boolean; >option : string } diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index ca70270ce5a..c9d50a0a450 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -1303,6 +1303,7 @@ declare module "typescript" { version?: boolean; watch?: boolean; stripInternal?: boolean; + preserveNewLines?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { @@ -2062,21 +2063,33 @@ function watch(rootFileNames, options) { var files = {}; // initialize the list of files rootFileNames.forEach(function (fileName) { - files[fileName] = { version: 0 }; + files[fileName] = { + version: 0 + }; }); // Create the language service host to allow the LS to communicate with the host var servicesHost = { - getScriptFileNames: function () { return rootFileNames; }, - getScriptVersion: function (fileName) { return files[fileName] && files[fileName].version.toString(); }, + getScriptFileNames: function () { + return rootFileNames; + }, + getScriptVersion: function (fileName) { + return files[fileName] && files[fileName].version.toString(); + }, getScriptSnapshot: function (fileName) { if (!fs.existsSync(fileName)) { return undefined; } return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString()); }, - getCurrentDirectory: function () { return process.cwd(); }, - getCompilationSettings: function () { return options; }, - getDefaultLibFileName: function (options) { return ts.getDefaultLibFilePath(options); } + getCurrentDirectory: function () { + return process.cwd(); + }, + getCompilationSettings: function () { + return options; + }, + getDefaultLibFileName: function (options) { + return ts.getDefaultLibFilePath(options); + } }; // Create the language service files var services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry()); @@ -2085,7 +2098,10 @@ function watch(rootFileNames, options) { // First time around, emit all files emitFile(fileName); // Add a watch on the file to handle next change - fs.watchFile(fileName, { persistent: true, interval: 250 }, function (curr, prev) { + fs.watchFile(fileName, { + persistent: true, + interval: 250 + }, function (curr, prev) { // Check timestamp if (+curr.mtime <= +prev.mtime) { return; @@ -2110,9 +2126,7 @@ function watch(rootFileNames, options) { }); } function logErrors(fileName) { - var allDiagnostics = services.getCompilerOptionsDiagnostics() - .concat(services.getSyntacticDiagnostics(fileName)) - .concat(services.getSemanticDiagnostics(fileName)); + var allDiagnostics = services.getCompilerOptionsDiagnostics().concat(services.getSyntacticDiagnostics(fileName)).concat(services.getSemanticDiagnostics(fileName)); allDiagnostics.forEach(function (diagnostic) { if (diagnostic.file) { var lineChar = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); @@ -2125,7 +2139,10 @@ function watch(rootFileNames, options) { } } // Initialize files constituting the program as all .ts files in the current directory -var currentDirectoryFiles = fs.readdirSync(process.cwd()). - filter(function (fileName) { return fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts"; }); +var currentDirectoryFiles = fs.readdirSync(process.cwd()).filter(function (fileName) { + return fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts"; +}); // Start the watcher -watch(currentDirectoryFiles, { module: 1 /* CommonJS */ }); +watch(currentDirectoryFiles, { + module: 1 /* CommonJS */ +}); diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 5913aebd1da..9f438cb3bdb 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -4208,6 +4208,9 @@ declare module "typescript" { stripInternal?: boolean; >stripInternal : boolean + preserveNewLines?: boolean; +>preserveNewLines : boolean + [option: string]: string | number | boolean; >option : string } diff --git a/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.js b/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.js index 90bed5cfd91..74a8a66a8bc 100644 --- a/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.js +++ b/tests/baselines/reference/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.js @@ -17,7 +17,10 @@ var cl = Point.Origin; //// [function.js] function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } //// [test.js] var cl; diff --git a/tests/baselines/reference/ArrowFunctionExpression1.js b/tests/baselines/reference/ArrowFunctionExpression1.js index 21c71af243c..baa75809f65 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.js +++ b/tests/baselines/reference/ArrowFunctionExpression1.js @@ -2,4 +2,5 @@ var v = (public x: string) => { }; //// [ArrowFunctionExpression1.js] -var v = function (x) { }; +var v = function (x) { +}; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js index b27c2ce5a30..a3ccfbe2f41 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js @@ -58,7 +58,8 @@ var clodule1 = (function () { })(); var clodule1; (function (clodule1) { - function f(x) { } + function f(x) { + } })(clodule1 || (clodule1 = {})); var clodule2 = (function () { function clodule2() { @@ -81,7 +82,9 @@ var clodule3 = (function () { })(); var clodule3; (function (clodule3) { - clodule3.y = { id: T }; + clodule3.y = { + id: T + }; })(clodule3 || (clodule3 = {})); var clodule4 = (function () { function clodule4() { diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js index 255e74631a3..cf39aa6c11b 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js @@ -19,7 +19,8 @@ module clodule { var clodule = (function () { function clodule() { } - clodule.fn = function (id) { }; + clodule.fn = function (id) { + }; return clodule; })(); var clodule; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js index 76ba858306c..69f72e3b4a7 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js @@ -19,7 +19,8 @@ module clodule { var clodule = (function () { function clodule() { } - clodule.fn = function (id) { }; + clodule.fn = function (id) { + }; return clodule; })(); var clodule; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js index 5f01b6acff1..827557bdbad 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.js @@ -19,7 +19,9 @@ module clodule { var clodule = (function () { function clodule() { } - clodule.sfn = function (id) { return 42; }; + clodule.sfn = function (id) { + return 42; + }; return clodule; })(); var clodule; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js index a86bc7d2e90..13483b591d9 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js @@ -28,12 +28,19 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = function () { return { x: 0, y: 0 }; }; // unexpected error here bug 840246 + Point.Origin = function () { + return { + x: 0, + y: 0 + }; + }; // unexpected error here bug 840246 return Point; })(); var Point; (function (Point) { - function Origin() { return null; } + function Origin() { + return null; + } Point.Origin = Origin; //expected duplicate identifier error })(Point || (Point = {})); var A; @@ -43,13 +50,20 @@ var A; this.x = x; this.y = y; } - Point.Origin = function () { return { x: 0, y: 0 }; }; // unexpected error here bug 840246 + Point.Origin = function () { + return { + x: 0, + y: 0 + }; + }; // unexpected error here bug 840246 return Point; })(); A.Point = Point; var Point; (function (Point) { - function Origin() { return ""; } + function Origin() { + return ""; + } Point.Origin = Origin; //expected duplicate identifier error })(Point = A.Point || (A.Point = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js index f462ea9eaa9..188a69a18f7 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js @@ -28,12 +28,19 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = function () { return { x: 0, y: 0 }; }; + Point.Origin = function () { + return { + x: 0, + y: 0 + }; + }; return Point; })(); var Point; (function (Point) { - function Origin() { return ""; } // not an error, since not exported + function Origin() { + return ""; + } // not an error, since not exported })(Point || (Point = {})); var A; (function (A) { @@ -42,12 +49,19 @@ var A; this.x = x; this.y = y; } - Point.Origin = function () { return { x: 0, y: 0 }; }; + Point.Origin = function () { + return { + x: 0, + y: 0 + }; + }; return Point; })(); A.Point = Point; var Point; (function (Point) { - function Origin() { return ""; } // not an error since not exported + function Origin() { + return ""; + } // not an error since not exported })(Point = A.Point || (A.Point = {})); })(A || (A = {})); diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js index 45958ad62d4..c2c20f7f7ff 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js @@ -28,7 +28,10 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; return Point; })(); var Point; @@ -42,7 +45,10 @@ var A; this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; return Point; })(); A.Point = Point; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js index ae56fd1acdc..241e1db7b0d 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js @@ -28,7 +28,10 @@ var Point = (function () { this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; return Point; })(); var Point; @@ -42,7 +45,10 @@ var A; this.x = x; this.y = y; } - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; return Point; })(); A.Point = Point; diff --git a/tests/baselines/reference/ClassDeclaration11.js b/tests/baselines/reference/ClassDeclaration11.js index 6284af07676..6c4ba4ac6ec 100644 --- a/tests/baselines/reference/ClassDeclaration11.js +++ b/tests/baselines/reference/ClassDeclaration11.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration13.js b/tests/baselines/reference/ClassDeclaration13.js index 7791b77eae6..4c4324eb1e1 100644 --- a/tests/baselines/reference/ClassDeclaration13.js +++ b/tests/baselines/reference/ClassDeclaration13.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration21.js b/tests/baselines/reference/ClassDeclaration21.js index b5144b607d1..94cf3587c8d 100644 --- a/tests/baselines/reference/ClassDeclaration21.js +++ b/tests/baselines/reference/ClassDeclaration21.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype[1] = function () { }; + C.prototype[1] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration22.js b/tests/baselines/reference/ClassDeclaration22.js index 0074813e77e..c44ba4ba43b 100644 --- a/tests/baselines/reference/ClassDeclaration22.js +++ b/tests/baselines/reference/ClassDeclaration22.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype["bar"] = function () { }; + C.prototype["bar"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ES5SymbolProperty2.js b/tests/baselines/reference/ES5SymbolProperty2.js index effd1e610f4..a1efd6ae7ba 100644 --- a/tests/baselines/reference/ES5SymbolProperty2.js +++ b/tests/baselines/reference/ES5SymbolProperty2.js @@ -17,7 +17,8 @@ var M; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/ES5SymbolProperty3.js b/tests/baselines/reference/ES5SymbolProperty3.js index 52ea7e091ee..7ef892cb3c4 100644 --- a/tests/baselines/reference/ES5SymbolProperty3.js +++ b/tests/baselines/reference/ES5SymbolProperty3.js @@ -12,7 +12,8 @@ var Symbol; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/ES5SymbolProperty4.js b/tests/baselines/reference/ES5SymbolProperty4.js index ae8a539f351..d4022066bb8 100644 --- a/tests/baselines/reference/ES5SymbolProperty4.js +++ b/tests/baselines/reference/ES5SymbolProperty4.js @@ -12,7 +12,8 @@ var Symbol; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/ES5SymbolProperty5.js b/tests/baselines/reference/ES5SymbolProperty5.js index 63b12667d0f..c433b0ab443 100644 --- a/tests/baselines/reference/ES5SymbolProperty5.js +++ b/tests/baselines/reference/ES5SymbolProperty5.js @@ -12,7 +12,8 @@ var Symbol; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator](0); // Should error diff --git a/tests/baselines/reference/ES5SymbolProperty6.js b/tests/baselines/reference/ES5SymbolProperty6.js index 10eda091e5e..949ce722aa7 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.js +++ b/tests/baselines/reference/ES5SymbolProperty6.js @@ -9,7 +9,8 @@ class C { var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/ES5SymbolProperty7.js b/tests/baselines/reference/ES5SymbolProperty7.js index d3f796ce758..f98e792e8cd 100644 --- a/tests/baselines/reference/ES5SymbolProperty7.js +++ b/tests/baselines/reference/ES5SymbolProperty7.js @@ -12,7 +12,8 @@ var Symbol; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index bfa243937d6..8fa04691498 100644 --- a/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -35,7 +35,10 @@ var A; return Point; })(); A.Point = Point; - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { @@ -44,7 +47,11 @@ var A; return Point3d; })(Point); A.Point3d = Point3d; - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; var Line = (function () { function Line(start, end) { this.start = start; diff --git a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js index 71a43788c55..9c7e3d5db2b 100644 --- a/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportClassWithInaccessibleTypeInTypeParameterConstraint.js @@ -38,7 +38,10 @@ var A; } return Point; })(); - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Point3d = (function (_super) { __extends(Point3d, _super); function Point3d() { @@ -47,7 +50,11 @@ var A; return Point3d; })(Point); A.Point3d = Point3d; - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; var Line = (function () { function Line(start, end) { this.start = start; diff --git a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js index 21d969d242c..56f50afa97b 100644 --- a/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.js @@ -33,7 +33,10 @@ var A; })(); A.Line = Line; function fromOrigin(p) { - return new Line({ x: 0, y: 0 }, p); + return new Line({ + x: 0, + y: 0 + }, p); } A.fromOrigin = fromOrigin; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js index 99831f10629..d669ce248d7 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.js @@ -32,7 +32,10 @@ var A; })(); A.Line = Line; function fromOrigin(p) { - return new Line({ x: 0, y: 0 }, p); + return new Line({ + x: 0, + y: 0 + }, p); } A.fromOrigin = fromOrigin; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js index 3037e33d880..a7ad139f68e 100644 --- a/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js +++ b/tests/baselines/reference/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.js @@ -32,7 +32,10 @@ var A; return Line; })(); function fromOrigin(p) { - return new Line({ x: 0, y: 0 }, p); + return new Line({ + x: 0, + y: 0 + }, p); } A.fromOrigin = fromOrigin; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js index e2b32a3bca4..a5ce37fb363 100644 --- a/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js @@ -25,6 +25,13 @@ module A { //// [ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.js] var A; (function (A) { - A.Origin = { x: 0, y: 0 }; - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin = { + x: 0, + y: 0 + }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js index 7625500a1d0..77db9879e3b 100644 --- a/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js +++ b/tests/baselines/reference/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js @@ -26,6 +26,13 @@ module A { //// [ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.js] var A; (function (A) { - A.Origin = { x: 0, y: 0 }; - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin = { + x: 0, + y: 0 + }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js index df6645df3b3..c2c4b64ece6 100644 --- a/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js +++ b/tests/baselines/reference/ExportModuleWithAccessibleTypesOnItsExportedMembers.js @@ -38,7 +38,10 @@ var A; function Line(start, end) { } Line.fromOrigin = function (p) { - return new Line({ x: 0, y: 0 }, p); + return new Line({ + x: 0, + y: 0 + }, p); }; return Line; })(); diff --git a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js index 46361dd41bb..50da60f7113 100644 --- a/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js +++ b/tests/baselines/reference/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.js @@ -21,6 +21,12 @@ var A; } return Point; })(); - A.Origin = { x: 0, y: 0 }; - A.Unity = { start: new Point(0, 0), end: new Point(1, 0) }; + A.Origin = { + x: 0, + y: 0 + }; + A.Unity = { + start: new Point(0, 0), + end: new Point(1, 0) + }; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js index 591845b627e..a4d203cc363 100644 --- a/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js +++ b/tests/baselines/reference/ExportVariableWithAccessibleTypeInTypeAnnotation.js @@ -15,5 +15,8 @@ module A { var A; (function (A) { // valid since Point is exported - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; })(A || (A = {})); diff --git a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js index d63edb65569..de0b6e706ad 100644 --- a/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js +++ b/tests/baselines/reference/ExportVariableWithInaccessibleTypeInTypeAnnotation.js @@ -22,7 +22,14 @@ module A { var A; (function (A) { // valid since Point is exported - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; // invalid Point3d is not exported - A.Origin3d = { x: 0, y: 0, z: 0 }; + A.Origin3d = { + x: 0, + y: 0, + z: 0 + }; })(A || (A = {})); diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js index 369a5b4dd52..26b2b17de38 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js @@ -47,7 +47,10 @@ var cl = B.Point.Origin; var A; (function (A) { function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } A.Point = Point; })(A || (A = {})); @@ -56,7 +59,10 @@ var A; (function (A) { var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = A.Point || (A.Point = {})); })(A || (A = {})); //// [test.js] @@ -69,12 +75,18 @@ var cl = A.Point.Origin; // not expected to be an error. var B; (function (B) { function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } B.Point = Point; var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = B.Point || (B.Point = {})); })(B || (B = {})); var fn; diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js index 13302ea391a..8c84896b926 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js @@ -26,7 +26,10 @@ var cl = B.Point.Origin; var A; (function (A) { function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } A.Point = Point; })(A || (A = {})); @@ -35,7 +38,10 @@ var B; (function (B) { var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = B.Point || (B.Point = {})); })(B || (B = {})); //// [test.js] diff --git a/tests/baselines/reference/FunctionDeclaration10_es6.js b/tests/baselines/reference/FunctionDeclaration10_es6.js index 51694533964..96d32200564 100644 --- a/tests/baselines/reference/FunctionDeclaration10_es6.js +++ b/tests/baselines/reference/FunctionDeclaration10_es6.js @@ -4,5 +4,7 @@ function * foo(a = yield => yield) { //// [FunctionDeclaration10_es6.js] function foo(a) { - if (a === void 0) { a = function (yield) { return yield; }; } + if (a === void 0) { a = function (yield) { + return yield; + }; } } diff --git a/tests/baselines/reference/FunctionDeclaration12_es6.js b/tests/baselines/reference/FunctionDeclaration12_es6.js index d9c1739cb49..da9cea3f9c6 100644 --- a/tests/baselines/reference/FunctionDeclaration12_es6.js +++ b/tests/baselines/reference/FunctionDeclaration12_es6.js @@ -2,4 +2,5 @@ var v = function * yield() { } //// [FunctionDeclaration12_es6.js] -var v = , yield = function () { }; +var v = , yield = function () { +}; diff --git a/tests/baselines/reference/FunctionDeclaration4.js b/tests/baselines/reference/FunctionDeclaration4.js index b50970965f0..53e040b28fc 100644 --- a/tests/baselines/reference/FunctionDeclaration4.js +++ b/tests/baselines/reference/FunctionDeclaration4.js @@ -3,4 +3,5 @@ function foo(); function bar() { } //// [FunctionDeclaration4.js] -function bar() { } +function bar() { +} diff --git a/tests/baselines/reference/FunctionDeclaration6.js b/tests/baselines/reference/FunctionDeclaration6.js index 721d4d80b6d..093fac7ed7c 100644 --- a/tests/baselines/reference/FunctionDeclaration6.js +++ b/tests/baselines/reference/FunctionDeclaration6.js @@ -6,5 +6,6 @@ //// [FunctionDeclaration6.js] { - function bar() { } + function bar() { + } } diff --git a/tests/baselines/reference/FunctionExpression1_es6.js b/tests/baselines/reference/FunctionExpression1_es6.js index 97e5d28887d..7c8d82f4ca8 100644 --- a/tests/baselines/reference/FunctionExpression1_es6.js +++ b/tests/baselines/reference/FunctionExpression1_es6.js @@ -2,4 +2,5 @@ var v = function * () { } //// [FunctionExpression1_es6.js] -var v = function () { }; +var v = function () { +}; diff --git a/tests/baselines/reference/FunctionExpression2_es6.js b/tests/baselines/reference/FunctionExpression2_es6.js index 87960e37128..0a2468bcb8c 100644 --- a/tests/baselines/reference/FunctionExpression2_es6.js +++ b/tests/baselines/reference/FunctionExpression2_es6.js @@ -2,4 +2,5 @@ var v = function * foo() { } //// [FunctionExpression2_es6.js] -var v = function foo() { }; +var v = function foo() { +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments1_es6.js b/tests/baselines/reference/FunctionPropertyAssignments1_es6.js index 0176b412713..49c2605e177 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments1_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments1_es6.js @@ -2,4 +2,7 @@ var v = { *foo() { } } //// [FunctionPropertyAssignments1_es6.js] -var v = { foo: function () { } }; +var v = { + foo: function () { + } +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments2_es6.js b/tests/baselines/reference/FunctionPropertyAssignments2_es6.js index fc86a6a48d6..996bd08af0b 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments2_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments2_es6.js @@ -2,4 +2,7 @@ var v = { *() { } } //// [FunctionPropertyAssignments2_es6.js] -var v = { : function () { } }; +var v = { + : function () { + } +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments3_es6.js b/tests/baselines/reference/FunctionPropertyAssignments3_es6.js index 89963edbc6e..64edd61828c 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments3_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments3_es6.js @@ -2,4 +2,7 @@ var v = { *{ } } //// [FunctionPropertyAssignments3_es6.js] -var v = { : function () { } }; +var v = { + : function () { + } +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments4_es6.js b/tests/baselines/reference/FunctionPropertyAssignments4_es6.js index 71076523414..ee6e35defe8 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments4_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments4_es6.js @@ -2,4 +2,6 @@ var v = { * } //// [FunctionPropertyAssignments4_es6.js] -var v = { : function () { } }; +var v = { + : function () { } +}; diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js index 51e5d0000e4..f41bd0d3ffa 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js @@ -3,6 +3,7 @@ var v = { *[foo()]() { } } //// [FunctionPropertyAssignments5_es6.js] var v = (_a = {}, - _a[foo()] = function () { }, + _a[foo()] = function () { + }, _a); var _a; diff --git a/tests/baselines/reference/FunctionPropertyAssignments6_es6.js b/tests/baselines/reference/FunctionPropertyAssignments6_es6.js index 60f3677f108..f7e9576c7a0 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments6_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments6_es6.js @@ -2,4 +2,7 @@ var v = { *() { } } //// [FunctionPropertyAssignments6_es6.js] -var v = { : function () { } }; +var v = { + : function () { + } +}; diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.js b/tests/baselines/reference/MemberAccessorDeclaration15.js index 85bbfa62238..41ed265a878 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.js +++ b/tests/baselines/reference/MemberAccessorDeclaration15.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/MemberFunctionDeclaration1_es6.js b/tests/baselines/reference/MemberFunctionDeclaration1_es6.js index 121376d5265..86e7c9d418a 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration1_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration2_es6.js b/tests/baselines/reference/MemberFunctionDeclaration2_es6.js index dcb494b3d13..efd60844dc7 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration2_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration2_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.js b/tests/baselines/reference/MemberFunctionDeclaration3_es6.js index e858ab15582..357f9175b42 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype[foo] = function () { }; + C.prototype[foo] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration4_es6.js b/tests/baselines/reference/MemberFunctionDeclaration4_es6.js index 26b08681441..9c6d76bfca5 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration4_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration4_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype. = function () { }; + C.prototype. = function () { + }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration7_es6.js b/tests/baselines/reference/MemberFunctionDeclaration7_es6.js index 8f942d87f9f..211713c6e14 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration7_es6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js index e9b8f44f895..6b110cbb0f2 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.js @@ -34,7 +34,10 @@ var A; (function (A) { var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = A.Point || (A.Point = {})); })(A || (A = {})); //// [function.js] @@ -42,7 +45,10 @@ var A; (function (A) { // duplicate identifier error function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } A.Point = Point; })(A || (A = {})); @@ -51,11 +57,17 @@ var B; (function (B) { var Point; (function (Point) { - Point.Origin = { x: 0, y: 0 }; + Point.Origin = { + x: 0, + y: 0 + }; })(Point = B.Point || (B.Point = {})); // duplicate identifier error function Point() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } B.Point = Point; })(B || (B = {})); diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js index e31ca5d5885..0211c85af9d 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedImportAlias.js @@ -54,9 +54,15 @@ var B; var Geometry; (function (Geometry) { var Lines = B; - Geometry.Origin = { x: 0, y: 0 }; + Geometry.Origin = { + x: 0, + y: 0 + }; // this is valid since B.Line _is_ visible outside Geometry - Geometry.Unit = new Lines.Line(Geometry.Origin, { x: 1, y: 0 }); + Geometry.Unit = new Lines.Line(Geometry.Origin, { + x: 1, + y: 0 + }); })(Geometry || (Geometry = {})); // expected to work since all are exported var p; diff --git a/tests/baselines/reference/Protected4.js b/tests/baselines/reference/Protected4.js index 9c23a1be884..665a182ef33 100644 --- a/tests/baselines/reference/Protected4.js +++ b/tests/baselines/reference/Protected4.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.m = function () { }; + C.prototype.m = function () { + }; return C; })(); diff --git a/tests/baselines/reference/Protected5.js b/tests/baselines/reference/Protected5.js index 8426a8765d7..8834cc488cb 100644 --- a/tests/baselines/reference/Protected5.js +++ b/tests/baselines/reference/Protected5.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.m = function () { }; + C.m = function () { + }; return C; })(); diff --git a/tests/baselines/reference/Protected6.js b/tests/baselines/reference/Protected6.js index 10b59551737..004f30b27f8 100644 --- a/tests/baselines/reference/Protected6.js +++ b/tests/baselines/reference/Protected6.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.m = function () { }; + C.m = function () { + }; return C; })(); diff --git a/tests/baselines/reference/Protected7.js b/tests/baselines/reference/Protected7.js index 16c24edb8cb..466f6909d67 100644 --- a/tests/baselines/reference/Protected7.js +++ b/tests/baselines/reference/Protected7.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.m = function () { }; + C.prototype.m = function () { + }; return C; })(); diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js index deb2f3aa59d..52810fa0178 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.js @@ -56,7 +56,10 @@ var A; function Point() { } Point.prototype.fromCarthesian = function (p) { - return { x: p.x, y: p.y }; + return { + x: p.x, + y: p.y + }; }; return Point; })(); diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js index 125a803ff39..227b28f44db 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.js @@ -47,11 +47,17 @@ var A; var Utils; (function (Utils) { function mirror(p) { - return { x: p.y, y: p.x }; + return { + x: p.y, + y: p.x + }; } Utils.mirror = mirror; })(Utils = A.Utils || (A.Utils = {})); - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; })(A || (A = {})); //// [part2.js] var A; @@ -78,4 +84,7 @@ var o = A.Origin; var o = A.Utils.mirror(o); var p; var p; -var p = new A.Utils.Plane(o, { x: 1, y: 1 }); +var p = new A.Utils.Plane(o, { + x: 1, + y: 1 +}); diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js index c7f55d0a2df..3f5f3bd8986 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js @@ -35,17 +35,26 @@ var A; var Utils; (function (Utils) { function mirror(p) { - return { x: p.y, y: p.x }; + return { + x: p.y, + y: p.x + }; } Utils.mirror = mirror; })(Utils = A.Utils || (A.Utils = {})); - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; })(A = exports.A || (exports.A = {})); //// [part2.js] var A; (function (A) { // collision with 'Origin' var in other part of merged module - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Utils; (function (Utils) { var Plane = (function () { diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js index a854dff15c6..32b5ed538d8 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.js @@ -38,7 +38,10 @@ var Root; var Utils; (function (Utils) { function mirror(p) { - return { x: p.y, y: p.x }; + return { + x: p.y, + y: p.x + }; } Utils.mirror = mirror; })(Utils = A.Utils || (A.Utils = {})); @@ -50,7 +53,10 @@ var otherRoot; var A; (function (A) { // have to be fully qualified since in different root - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Utils; (function (Utils) { var Plane = (function () { diff --git a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js index 82c9afd0787..ba77d51ef69 100644 --- a/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js +++ b/tests/baselines/reference/TwoInternalModulesWithTheSameNameAndSameCommonRoot.js @@ -45,7 +45,10 @@ var A; var Utils; (function (Utils) { function mirror(p) { - return { x: p.y, y: p.x }; + return { + x: p.y, + y: p.x + }; } Utils.mirror = mirror; })(Utils = A.Utils || (A.Utils = {})); @@ -53,7 +56,10 @@ var A; //// [part2.js] var A; (function (A) { - A.Origin = { x: 0, y: 0 }; + A.Origin = { + x: 0, + y: 0 + }; var Utils; (function (Utils) { var Plane = (function () { @@ -74,4 +80,7 @@ var o = A.Origin; var o = A.Utils.mirror(o); var p; var p; -var p = new A.Utils.Plane(o, { x: 1, y: 1 }); +var p = new A.Utils.Plane(o, { + x: 1, + y: 1 +}); diff --git a/tests/baselines/reference/YieldExpression10_es6.js b/tests/baselines/reference/YieldExpression10_es6.js index 3bae1b645fe..345f76fc190 100644 --- a/tests/baselines/reference/YieldExpression10_es6.js +++ b/tests/baselines/reference/YieldExpression10_es6.js @@ -6,7 +6,8 @@ var v = { * foo() { //// [YieldExpression10_es6.js] -var v = { foo: function () { +var v = { + foo: function () { ; } }; diff --git a/tests/baselines/reference/YieldExpression13_es6.js b/tests/baselines/reference/YieldExpression13_es6.js index 093759e6bd9..328fc80dbdd 100644 --- a/tests/baselines/reference/YieldExpression13_es6.js +++ b/tests/baselines/reference/YieldExpression13_es6.js @@ -2,4 +2,6 @@ function* foo() { yield } //// [YieldExpression13_es6.js] -function foo() { ; } +function foo() { + ; +} diff --git a/tests/baselines/reference/YieldExpression17_es6.js b/tests/baselines/reference/YieldExpression17_es6.js index cefe4ca28df..5ac8093395a 100644 --- a/tests/baselines/reference/YieldExpression17_es6.js +++ b/tests/baselines/reference/YieldExpression17_es6.js @@ -2,4 +2,8 @@ var v = { get foo() { yield foo; } } //// [YieldExpression17_es6.js] -var v = { get foo() { ; } }; +var v = { + get foo() { + ; + } +}; diff --git a/tests/baselines/reference/accessibilityModifiers.js b/tests/baselines/reference/accessibilityModifiers.js index ebc801ac136..901b3a29c2e 100644 --- a/tests/baselines/reference/accessibilityModifiers.js +++ b/tests/baselines/reference/accessibilityModifiers.js @@ -50,36 +50,48 @@ class E { var C = (function () { function C() { } - C.privateMethod = function () { }; + C.privateMethod = function () { + }; Object.defineProperty(C, "privateGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "privateSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); - C.protectedMethod = function () { }; + C.protectedMethod = function () { + }; Object.defineProperty(C, "protectedGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "protectedSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); - C.publicMethod = function () { }; + C.publicMethod = function () { + }; Object.defineProperty(C, "publicGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "publicSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); @@ -89,36 +101,48 @@ var C = (function () { var D = (function () { function D() { } - D.privateMethod = function () { }; + D.privateMethod = function () { + }; Object.defineProperty(D, "privateGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(D, "privateSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); - D.protectedMethod = function () { }; + D.protectedMethod = function () { + }; Object.defineProperty(D, "protectedGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(D, "protectedSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); - D.publicMethod = function () { }; + D.publicMethod = function () { + }; Object.defineProperty(D, "publicGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(D, "publicSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); @@ -128,14 +152,18 @@ var D = (function () { var E = (function () { function E() { } - E.prototype.method = function () { }; + E.prototype.method = function () { + }; Object.defineProperty(E.prototype, "getter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(E.prototype, "setter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.js b/tests/baselines/reference/accessorParameterAccessibilityModifier.js index 8b5ee6196e0..89a511e6c5c 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.js +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.js @@ -10,12 +10,14 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "X", { - set: function (v2) { }, + set: function (v2) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessorWithES3.js b/tests/baselines/reference/accessorWithES3.js index 1eecaa68d64..6eba5238a91 100644 --- a/tests/baselines/reference/accessorWithES3.js +++ b/tests/baselines/reference/accessorWithES3.js @@ -47,8 +47,11 @@ var D = (function () { return D; })(); var x = { - get a() { return 1; } + get a() { + return 1; + } }; var y = { - set b(v) { } + set b(v) { + } }; diff --git a/tests/baselines/reference/accessorWithES5.js b/tests/baselines/reference/accessorWithES5.js index 746703bce52..1a3690556e0 100644 --- a/tests/baselines/reference/accessorWithES5.js +++ b/tests/baselines/reference/accessorWithES5.js @@ -44,8 +44,11 @@ var D = (function () { return D; })(); var x = { - get a() { return 1; } + get a() { + return 1; + } }; var y = { - set b(v) { } + set b(v) { + } }; diff --git a/tests/baselines/reference/accessorWithoutBody1.js b/tests/baselines/reference/accessorWithoutBody1.js index e06e305e161..8f357b89490 100644 --- a/tests/baselines/reference/accessorWithoutBody1.js +++ b/tests/baselines/reference/accessorWithoutBody1.js @@ -2,4 +2,6 @@ var v = { get foo() } //// [accessorWithoutBody1.js] -var v = { get foo() { } }; +var v = { + get foo() { } +}; diff --git a/tests/baselines/reference/accessorWithoutBody2.js b/tests/baselines/reference/accessorWithoutBody2.js index 3b5a821d580..d9405daeb93 100644 --- a/tests/baselines/reference/accessorWithoutBody2.js +++ b/tests/baselines/reference/accessorWithoutBody2.js @@ -2,4 +2,6 @@ var v = { set foo(a) } //// [accessorWithoutBody2.js] -var v = { set foo(a) { } }; +var v = { + set foo(a) { } +}; diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.js b/tests/baselines/reference/accessorsAreNotContextuallyTyped.js index 8c01173a13c..d8cb761bb9b 100644 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.js +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.js @@ -20,7 +20,9 @@ var C = (function () { } Object.defineProperty(C.prototype, "x", { get: function () { - return function (x) { return ""; }; + return function (x) { + return ""; + }; }, set: function (v) { }, diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.js b/tests/baselines/reference/accessorsNotAllowedInES3.js index 0843a39191c..7dab1283e84 100644 --- a/tests/baselines/reference/accessorsNotAllowedInES3.js +++ b/tests/baselines/reference/accessorsNotAllowedInES3.js @@ -11,10 +11,16 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); return C; })(); -var y = { get foo() { return 3; } }; +var y = { + get foo() { + return 3; + } +}; diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js index 5e527aef3e9..6a3b3773aa6 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js @@ -18,26 +18,40 @@ var LanguageSpec_section_4_5_error_cases = (function () { function LanguageSpec_section_4_5_error_cases() { } Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterFirst", { - get: function () { return ""; }, - set: function (a) { }, + get: function () { + return ""; + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterLast", { - get: function () { return ""; }, - set: function (a) { }, + get: function () { + return ""; + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterFirst", { - get: function () { return ""; }, - set: function (aStr) { aStr = 0; }, + get: function () { + return ""; + }, + set: function (aStr) { + aStr = 0; + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterLast", { - get: function () { return ""; }, - set: function (aStr) { aStr = 0; }, + get: function () { + return ""; + }, + set: function (aStr) { + aStr = 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index 9aa7ce2f408..b140e565b29 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -47,38 +47,56 @@ var LanguageSpec_section_4_5_inference = (function () { function LanguageSpec_section_4_5_inference() { } Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation_GetterFirst", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter_SetterFirst", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation_GetterFirst", { - get: function () { return new B(); }, - set: function (a) { }, + get: function () { + return new B(); + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js index 26a77e917d9..ca3e8435e05 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js @@ -40,11 +40,13 @@ var r19 = a + { a: '' }; var r20 = a + ((a: string) => { return a }); //// [additionOperatorWithAnyAndEveryType.js] -function foo() { } +function foo() { +} var C = (function () { function C() { } - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var E; @@ -83,5 +85,9 @@ var r15 = a + 0 /* a */; var r16 = a + M; var r17 = a + ''; var r18 = a + 123; -var r19 = a + { a: '' }; -var r20 = a + (function (a) { return a; }); +var r19 = a + { + a: '' +}; +var r20 = a + (function (a) { + return a; +}); diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.js b/tests/baselines/reference/additionOperatorWithInvalidOperands.js index 7bd31c7ae53..baf4fadedb3 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.js @@ -41,11 +41,13 @@ var r19 = E.a + C.foo(); var r20 = E.a + M; //// [additionOperatorWithInvalidOperands.js] -function foo() { } +function foo() { +} var C = (function () { function C() { } - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var E; diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js index 79d3c0b9b8d..5ec03e15b6c 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js @@ -25,7 +25,9 @@ var r11 = null + (() => { }); //// [additionOperatorWithNullValueAndInvalidOperator.js] // If one operand is the null or undefined value, it is treated as having the type of the other operand. -function foo() { return undefined; } +function foo() { + return undefined; +} var a; var b; var c; @@ -40,6 +42,9 @@ var r6 = null + c; // other cases var r7 = null + d; var r8 = null + true; -var r9 = null + { a: '' }; +var r9 = null + { + a: '' +}; var r10 = null + foo(); -var r11 = null + (function () { }); +var r11 = null + (function () { +}); diff --git a/tests/baselines/reference/additionOperatorWithStringAndEveryType.js b/tests/baselines/reference/additionOperatorWithStringAndEveryType.js index ecce65ba577..35c6056574e 100644 --- a/tests/baselines/reference/additionOperatorWithStringAndEveryType.js +++ b/tests/baselines/reference/additionOperatorWithStringAndEveryType.js @@ -75,5 +75,7 @@ var r15 = x + E; var r16 = x + 0 /* a */; var r17 = x + ''; var r18 = x + 0; -var r19 = x + { a: '' }; +var r19 = x + { + a: '' +}; var r20 = x + []; diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.js b/tests/baselines/reference/additionOperatorWithTypeParameter.js index a568f420a32..23a6b95b147 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.js +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.js @@ -74,6 +74,7 @@ function foo(t, u) { var r16 = t + undefined; var r17 = t + t; var r18 = t + u; - var r19 = t + (function () { }); + var r19 = t + (function () { + }); var r20 = t + []; } diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js index 98935db2b86..6bf55f351a5 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js @@ -25,7 +25,9 @@ var r11 = undefined + (() => { }); //// [additionOperatorWithUndefinedValueAndInvalidOperands.js] // If one operand is the null or undefined value, it is treated as having the type of the other operand. -function foo() { return undefined; } +function foo() { + return undefined; +} var a; var b; var c; @@ -40,6 +42,9 @@ var r6 = undefined + c; // other cases var r7 = undefined + d; var r8 = undefined + true; -var r9 = undefined + { a: '' }; +var r9 = undefined + { + a: '' +}; var r10 = undefined + foo(); -var r11 = undefined + (function () { }); +var r11 = undefined + (function () { +}); diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index 5712abf3443..1c7f8381be0 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -46,5 +46,9 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInArray_main.js] var moduleA = require("aliasUsageInArray_moduleA"); -var xs = [moduleA]; -var xs2 = [moduleA]; +var xs = [ + moduleA +]; +var xs2 = [ + moduleA +]; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index 661c8fd91e7..e101cd49aba 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -45,5 +45,9 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInFunctionExpression_main.js] var moduleA = require("aliasUsageInFunctionExpression_moduleA"); -var f = function (x) { return x; }; -f = function (x) { return moduleA; }; +var f = function (x) { + return x; +}; +f = function (x) { + return moduleA; +}; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 1070036adea..fc0cd51be50 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -52,5 +52,9 @@ var moduleA = require("aliasUsageInGenericFunction_moduleA"); function foo(x) { return x; } -var r = foo({ a: moduleA }); -var r2 = foo({ a: null }); +var r = foo({ + a: moduleA +}); +var r2 = foo({ + a: null +}); diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 50ccfaf944d..7e6cc1340e8 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -46,6 +46,14 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInObjectLiteral_main.js] var moduleA = require("aliasUsageInObjectLiteral_moduleA"); -var a = { x: moduleA }; -var b = { x: moduleA }; -var c = { y: { z: moduleA } }; +var a = { + x: moduleA +}; +var b = { + x: moduleA +}; +var c = { + y: { + z: moduleA + } +}; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 07a382ebca1..8a29a7f998b 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -53,5 +53,9 @@ var i; var d1 = i || moduleA; var d2 = i || moduleA; var d2 = moduleA || i; -var e = null || { x: moduleA }; -var f = null ? { x: moduleA } : null; +var e = null || { + x: moduleA +}; +var f = null ? { + x: moduleA +} : null; diff --git a/tests/baselines/reference/aliasUsedAsNameValue.js b/tests/baselines/reference/aliasUsedAsNameValue.js index fb909181529..4b6debf4c98 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.js +++ b/tests/baselines/reference/aliasUsedAsNameValue.js @@ -21,7 +21,9 @@ export var a = function () { //// [aliasUsedAsNameValue_0.js] exports.id; //// [aliasUsedAsNameValue_1.js] -function b(a) { return null; } +function b(a) { + return null; +} exports.b = b; //// [aliasUsedAsNameValue_2.js] /// diff --git a/tests/baselines/reference/ambientClassOverloadForFunction.js b/tests/baselines/reference/ambientClassOverloadForFunction.js index 402eca63381..cf3a59a465d 100644 --- a/tests/baselines/reference/ambientClassOverloadForFunction.js +++ b/tests/baselines/reference/ambientClassOverloadForFunction.js @@ -5,4 +5,6 @@ function foo() { return null; } //// [ambientClassOverloadForFunction.js] ; -function foo() { return null; } +function foo() { + return null; +} diff --git a/tests/baselines/reference/ambiguousGenericAssertion1.js b/tests/baselines/reference/ambiguousGenericAssertion1.js index 8d40873036c..06804387585 100644 --- a/tests/baselines/reference/ambiguousGenericAssertion1.js +++ b/tests/baselines/reference/ambiguousGenericAssertion1.js @@ -6,8 +6,12 @@ var r3 = <(x: T) => T>f; // ambiguous, appears to the parser as a << operatio //// [ambiguousGenericAssertion1.js] -function f(x) { return null; } -var r = function (x) { return x; }; +function f(x) { + return null; +} +var r = function (x) { + return x; +}; var r2 = f; // valid var r3 = << T > (x), T; T > f; // ambiguous, appears to the parser as a << operation diff --git a/tests/baselines/reference/ambiguousOverload.js b/tests/baselines/reference/ambiguousOverload.js index 642f09dca16..fd373c075a2 100644 --- a/tests/baselines/reference/ambiguousOverload.js +++ b/tests/baselines/reference/ambiguousOverload.js @@ -12,11 +12,15 @@ var x2: string = foof2("s", null); var y2: number = foof2("s", null); //// [ambiguousOverload.js] -function foof(bar) { return bar; } +function foof(bar) { + return bar; +} ; var x = foof("s", null); var y = foof("s", null); -function foof2(bar) { return bar; } +function foof2(bar) { + return bar; +} ; var x2 = foof2("s", null); var y2 = foof2("s", null); diff --git a/tests/baselines/reference/anonterface.js b/tests/baselines/reference/anonterface.js index 12bfbc4ec9d..59d055b29d7 100644 --- a/tests/baselines/reference/anonterface.js +++ b/tests/baselines/reference/anonterface.js @@ -28,4 +28,6 @@ var M; M.C = C; })(M || (M = {})); var c = new M.C(); -c.m(function (n) { return "hello: " + n; }, 18); +c.m(function (n) { + return "hello: " + n; +}, 18); diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.js b/tests/baselines/reference/anyAssignabilityInInheritance.js index 04e3e91761d..bc9ebb02f42 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.js +++ b/tests/baselines/reference/anyAssignabilityInInheritance.js @@ -118,7 +118,8 @@ var E; E[E["A"] = 0] = "A"; })(E || (E = {})); var r3 = foo3(a); // any -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/anyAssignableToEveryType2.js b/tests/baselines/reference/anyAssignableToEveryType2.js index 530d8eb0439..41cedb73215 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.js +++ b/tests/baselines/reference/anyAssignableToEveryType2.js @@ -146,7 +146,8 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/anyDeclare.js b/tests/baselines/reference/anyDeclare.js index 8bb2f55eb84..a46a2529491 100644 --- a/tests/baselines/reference/anyDeclare.js +++ b/tests/baselines/reference/anyDeclare.js @@ -10,5 +10,6 @@ module myMod { var myMod; (function (myMod) { var myFn; - function myFn() { } + function myFn() { + } })(myMod || (myMod = {})); diff --git a/tests/baselines/reference/anyIdenticalToItself.js b/tests/baselines/reference/anyIdenticalToItself.js index b7b9b25e418..dc221b69aa7 100644 --- a/tests/baselines/reference/anyIdenticalToItself.js +++ b/tests/baselines/reference/anyIdenticalToItself.js @@ -13,7 +13,8 @@ class C { } //// [anyIdenticalToItself.js] -function foo(x, y) { } +function foo(x, y) { +} var C = (function () { function C() { } diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.js b/tests/baselines/reference/anyInferenceAnonymousFunctions.js index df921965994..03e45113b26 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.js +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.js @@ -25,6 +25,12 @@ paired.reduce(function (a1, a2) { paired.reduce(function (b1, b2) { return b1.concat({}); }, []); -paired.reduce(function (b3, b4) { return b3.concat({}); }, []); -paired.map(function (c1) { return c1.count; }); -paired.map(function (c2) { return c2.count; }); +paired.reduce(function (b3, b4) { + return b3.concat({}); +}, []); +paired.map(function (c1) { + return c1.count; +}); +paired.map(function (c2) { + return c2.count; +}); diff --git a/tests/baselines/reference/arrayAssignmentTest1.js b/tests/baselines/reference/arrayAssignmentTest1.js index 0abfa889bed..aed3d0cdf06 100644 --- a/tests/baselines/reference/arrayAssignmentTest1.js +++ b/tests/baselines/reference/arrayAssignmentTest1.js @@ -95,8 +95,12 @@ var __extends = this.__extends || function (d, b) { var C1 = (function () { function C1() { } - C1.prototype.IM1 = function () { return null; }; - C1.prototype.C1M1 = function () { return null; }; + C1.prototype.IM1 = function () { + return null; + }; + C1.prototype.C1M1 = function () { + return null; + }; return C1; })(); var C2 = (function (_super) { @@ -104,13 +108,17 @@ var C2 = (function (_super) { function C2() { _super.apply(this, arguments); } - C2.prototype.C2M1 = function () { return null; }; + C2.prototype.C2M1 = function () { + return null; + }; return C2; })(C1); var C3 = (function () { function C3() { } - C3.prototype.CM3M1 = function () { return 3; }; + C3.prototype.CM3M1 = function () { + return 3; + }; return C3; })(); /* @@ -129,8 +137,12 @@ var c1 = new C1(); var i1 = c1; var c2 = new C2(); var c3 = new C3(); -var o1 = { one: 1 }; -var f1 = function () { return new C1(); }; +var o1 = { + one: 1 +}; +var f1 = function () { + return new C1(); +}; var arr_any = []; var arr_i1 = []; var arr_c1 = []; diff --git a/tests/baselines/reference/arrayAssignmentTest2.js b/tests/baselines/reference/arrayAssignmentTest2.js index 977862866ed..0e6a9837573 100644 --- a/tests/baselines/reference/arrayAssignmentTest2.js +++ b/tests/baselines/reference/arrayAssignmentTest2.js @@ -69,8 +69,12 @@ var __extends = this.__extends || function (d, b) { var C1 = (function () { function C1() { } - C1.prototype.IM1 = function () { return null; }; - C1.prototype.C1M1 = function () { return null; }; + C1.prototype.IM1 = function () { + return null; + }; + C1.prototype.C1M1 = function () { + return null; + }; return C1; })(); var C2 = (function (_super) { @@ -78,13 +82,17 @@ var C2 = (function (_super) { function C2() { _super.apply(this, arguments); } - C2.prototype.C2M1 = function () { return null; }; + C2.prototype.C2M1 = function () { + return null; + }; return C2; })(C1); var C3 = (function () { function C3() { } - C3.prototype.CM3M1 = function () { return 3; }; + C3.prototype.CM3M1 = function () { + return 3; + }; return C3; })(); /* @@ -103,8 +111,12 @@ var c1 = new C1(); var i1 = c1; var c2 = new C2(); var c3 = new C3(); -var o1 = { one: 1 }; -var f1 = function () { return new C1(); }; +var o1 = { + one: 1 +}; +var f1 = function () { + return new C1(); +}; var arr_any = []; var arr_i1 = []; var arr_c1 = []; @@ -118,7 +130,9 @@ arr_c3 = arr_c2_2; // should be an error - is arr_c3 = arr_c1_2; // should be an error - is arr_c3 = arr_i1_2; // should be an error - is arr_any = f1; // should be an error - is -arr_any = function () { return null; }; // should be an error - is +arr_any = function () { + return null; +}; // should be an error - is arr_any = o1; // should be an error - is arr_any = a1; // should be ok - is arr_any = c1; // should be an error - is diff --git a/tests/baselines/reference/arrayAssignmentTest4.js b/tests/baselines/reference/arrayAssignmentTest4.js index c38cdebc06c..43c7f2f4144 100644 --- a/tests/baselines/reference/arrayAssignmentTest4.js +++ b/tests/baselines/reference/arrayAssignmentTest4.js @@ -30,7 +30,9 @@ arr_any = c3; // should be an error - is var C3 = (function () { function C3() { } - C3.prototype.CM3M1 = function () { return 3; }; + C3.prototype.CM3M1 = function () { + return 3; + }; return C3; })(); /* @@ -45,7 +47,11 @@ Type 1 of any[]: */ var c3 = new C3(); -var o1 = { one: 1 }; +var o1 = { + one: 1 +}; var arr_any = []; -arr_any = function () { return null; }; // should be an error - is +arr_any = function () { + return null; +}; // should be an error - is arr_any = c3; // should be an error - is diff --git a/tests/baselines/reference/arrayAugment.js b/tests/baselines/reference/arrayAugment.js index 20cf510712a..fcd2ee6987b 100644 --- a/tests/baselines/reference/arrayAugment.js +++ b/tests/baselines/reference/arrayAugment.js @@ -9,6 +9,8 @@ var y: string[][]; // Expect no error here //// [arrayAugment.js] -var x = ['']; +var x = [ + '' +]; var y = x.split(4); var y; // Expect no error here diff --git a/tests/baselines/reference/arrayBestCommonTypes.js b/tests/baselines/reference/arrayBestCommonTypes.js index f8e158e5b02..29da9f0737d 100644 --- a/tests/baselines/reference/arrayBestCommonTypes.js +++ b/tests/baselines/reference/arrayBestCommonTypes.js @@ -141,34 +141,170 @@ var EmptyTypes; return null; }; f.prototype.x = function () { - (this.voidIfAny([4, 2][0])); - (this.voidIfAny([4, 2, undefined][0])); - (this.voidIfAny([undefined, 2, 4][0])); - (this.voidIfAny([null, 2, 4][0])); - (this.voidIfAny([2, 4, null][0])); - (this.voidIfAny([undefined, 4, null][0])); - (this.voidIfAny(['', "q"][0])); - (this.voidIfAny(['', "q", undefined][0])); - (this.voidIfAny([undefined, "q", ''][0])); - (this.voidIfAny([null, "q", ''][0])); - (this.voidIfAny(["q", '', null][0])); - (this.voidIfAny([undefined, '', null][0])); - (this.voidIfAny([[3, 4], [null]][0][0])); - var t1 = [{ x: 7, y: new derived() }, { x: 5, y: new base() }]; - var t2 = [{ x: true, y: new derived() }, { x: false, y: new base() }]; - var t3 = [{ x: undefined, y: new base() }, { x: '', y: new derived() }]; + (this.voidIfAny([ + 4, + 2 + ][0])); + (this.voidIfAny([ + 4, + 2, + undefined + ][0])); + (this.voidIfAny([ + undefined, + 2, + 4 + ][0])); + (this.voidIfAny([ + null, + 2, + 4 + ][0])); + (this.voidIfAny([ + 2, + 4, + null + ][0])); + (this.voidIfAny([ + undefined, + 4, + null + ][0])); + (this.voidIfAny([ + '', + "q" + ][0])); + (this.voidIfAny([ + '', + "q", + undefined + ][0])); + (this.voidIfAny([ + undefined, + "q", + '' + ][0])); + (this.voidIfAny([ + null, + "q", + '' + ][0])); + (this.voidIfAny([ + "q", + '', + null + ][0])); + (this.voidIfAny([ + undefined, + '', + null + ][0])); + (this.voidIfAny([ + [ + 3, + 4 + ], + [ + null + ] + ][0][0])); + var t1 = [ + { + x: 7, + y: new derived() + }, + { + x: 5, + y: new base() + } + ]; + var t2 = [ + { + x: true, + y: new derived() + }, + { + x: false, + y: new base() + } + ]; + var t3 = [ + { + x: undefined, + y: new base() + }, + { + x: '', + y: new derived() + } + ]; var anyObj = null; // Order matters here so test all the variants - var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }]; - var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }]; - var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }]; + var a1 = [ + { + x: 0, + y: 'a' + }, + { + x: 'a', + y: 'a' + }, + { + x: anyObj, + y: 'a' + } + ]; + var a2 = [ + { + x: anyObj, + y: 'a' + }, + { + x: 0, + y: 'a' + }, + { + x: 'a', + y: 'a' + } + ]; + var a3 = [ + { + x: 0, + y: 'a' + }, + { + x: anyObj, + y: 'a' + }, + { + x: 'a', + y: 'a' + } + ]; var ifaceObj = null; var baseObj = new base(); var base2Obj = new base2(); - var b1 = [baseObj, base2Obj, ifaceObj]; - var b2 = [base2Obj, baseObj, ifaceObj]; - var b3 = [baseObj, ifaceObj, base2Obj]; - var b4 = [ifaceObj, baseObj, base2Obj]; + var b1 = [ + baseObj, + base2Obj, + ifaceObj + ]; + var b2 = [ + base2Obj, + baseObj, + ifaceObj + ]; + var b3 = [ + baseObj, + ifaceObj, + base2Obj + ]; + var b4 = [ + ifaceObj, + baseObj, + base2Obj + ]; }; return f; })(); @@ -200,34 +336,170 @@ var NonEmptyTypes; return null; }; f.prototype.x = function () { - (this.voidIfAny([4, 2][0])); - (this.voidIfAny([4, 2, undefined][0])); - (this.voidIfAny([undefined, 2, 4][0])); - (this.voidIfAny([null, 2, 4][0])); - (this.voidIfAny([2, 4, null][0])); - (this.voidIfAny([undefined, 4, null][0])); - (this.voidIfAny(['', "q"][0])); - (this.voidIfAny(['', "q", undefined][0])); - (this.voidIfAny([undefined, "q", ''][0])); - (this.voidIfAny([null, "q", ''][0])); - (this.voidIfAny(["q", '', null][0])); - (this.voidIfAny([undefined, '', null][0])); - (this.voidIfAny([[3, 4], [null]][0][0])); - var t1 = [{ x: 7, y: new derived() }, { x: 5, y: new base() }]; - var t2 = [{ x: true, y: new derived() }, { x: false, y: new base() }]; - var t3 = [{ x: undefined, y: new base() }, { x: '', y: new derived() }]; + (this.voidIfAny([ + 4, + 2 + ][0])); + (this.voidIfAny([ + 4, + 2, + undefined + ][0])); + (this.voidIfAny([ + undefined, + 2, + 4 + ][0])); + (this.voidIfAny([ + null, + 2, + 4 + ][0])); + (this.voidIfAny([ + 2, + 4, + null + ][0])); + (this.voidIfAny([ + undefined, + 4, + null + ][0])); + (this.voidIfAny([ + '', + "q" + ][0])); + (this.voidIfAny([ + '', + "q", + undefined + ][0])); + (this.voidIfAny([ + undefined, + "q", + '' + ][0])); + (this.voidIfAny([ + null, + "q", + '' + ][0])); + (this.voidIfAny([ + "q", + '', + null + ][0])); + (this.voidIfAny([ + undefined, + '', + null + ][0])); + (this.voidIfAny([ + [ + 3, + 4 + ], + [ + null + ] + ][0][0])); + var t1 = [ + { + x: 7, + y: new derived() + }, + { + x: 5, + y: new base() + } + ]; + var t2 = [ + { + x: true, + y: new derived() + }, + { + x: false, + y: new base() + } + ]; + var t3 = [ + { + x: undefined, + y: new base() + }, + { + x: '', + y: new derived() + } + ]; var anyObj = null; // Order matters here so test all the variants - var a1 = [{ x: 0, y: 'a' }, { x: 'a', y: 'a' }, { x: anyObj, y: 'a' }]; - var a2 = [{ x: anyObj, y: 'a' }, { x: 0, y: 'a' }, { x: 'a', y: 'a' }]; - var a3 = [{ x: 0, y: 'a' }, { x: anyObj, y: 'a' }, { x: 'a', y: 'a' }]; + var a1 = [ + { + x: 0, + y: 'a' + }, + { + x: 'a', + y: 'a' + }, + { + x: anyObj, + y: 'a' + } + ]; + var a2 = [ + { + x: anyObj, + y: 'a' + }, + { + x: 0, + y: 'a' + }, + { + x: 'a', + y: 'a' + } + ]; + var a3 = [ + { + x: 0, + y: 'a' + }, + { + x: anyObj, + y: 'a' + }, + { + x: 'a', + y: 'a' + } + ]; var ifaceObj = null; var baseObj = new base(); var base2Obj = new base2(); - var b1 = [baseObj, base2Obj, ifaceObj]; - var b2 = [base2Obj, baseObj, ifaceObj]; - var b3 = [baseObj, ifaceObj, base2Obj]; - var b4 = [ifaceObj, baseObj, base2Obj]; + var b1 = [ + baseObj, + base2Obj, + ifaceObj + ]; + var b2 = [ + base2Obj, + baseObj, + ifaceObj + ]; + var b3 = [ + baseObj, + ifaceObj, + base2Obj + ]; + var b4 = [ + ifaceObj, + baseObj, + base2Obj + ]; }; return f; })(); diff --git a/tests/baselines/reference/arrayCast.js b/tests/baselines/reference/arrayCast.js index 214bf642250..7a6482fb39b 100644 --- a/tests/baselines/reference/arrayCast.js +++ b/tests/baselines/reference/arrayCast.js @@ -9,6 +9,15 @@ //// [arrayCast.js] // Should fail. Even though the array is contextually typed with { id: number }[], it still // has type { foo: string }[], which is not assignable to { id: number }[]. -[{ foo: "s" }]; +[ + { + foo: "s" + } +]; // Should succeed, as the {} element causes the type of the array to be {}[] -[{ foo: "s" }, {}]; +[ + { + foo: "s" + }, + {} +]; diff --git a/tests/baselines/reference/arrayConcatMap.js b/tests/baselines/reference/arrayConcatMap.js index 715ca158a43..992c8eb7ce3 100644 --- a/tests/baselines/reference/arrayConcatMap.js +++ b/tests/baselines/reference/arrayConcatMap.js @@ -3,5 +3,14 @@ var x = [].concat([{ a: 1 }], [{ a: 2 }]) .map(b => b.a); //// [arrayConcatMap.js] -var x = [].concat([{ a: 1 }], [{ a: 2 }]) - .map(function (b) { return b.a; }); +var x = [].concat([ + { + a: 1 + } +], [ + { + a: 2 + } +]).map(function (b) { + return b.a; +}); diff --git a/tests/baselines/reference/arrayLiteral.js b/tests/baselines/reference/arrayLiteral.js index ae210aabd42..f2d6c998175 100644 --- a/tests/baselines/reference/arrayLiteral.js +++ b/tests/baselines/reference/arrayLiteral.js @@ -19,11 +19,21 @@ var y2: number[] = new Array(); // valid uses of array literals var x = []; var x = new Array(1); -var y = [1]; -var y = [1, 2]; +var y = [ + 1 +]; +var y = [ + 1, + 2 +]; var y = new Array(); var x2 = []; var x2 = new Array(1); -var y2 = [1]; -var y2 = [1, 2]; +var y2 = [ + 1 +]; +var y2 = [ + 1, + 2 +]; var y2 = new Array(); diff --git a/tests/baselines/reference/arrayLiteral1.js b/tests/baselines/reference/arrayLiteral1.js index b84e7414f24..8949ae684f0 100644 --- a/tests/baselines/reference/arrayLiteral1.js +++ b/tests/baselines/reference/arrayLiteral1.js @@ -2,4 +2,7 @@ var v30 = [1, 2]; //// [arrayLiteral1.js] -var v30 = [1, 2]; +var v30 = [ + 1, + 2 +]; diff --git a/tests/baselines/reference/arrayLiteral2.js b/tests/baselines/reference/arrayLiteral2.js index fb1b8059305..42d05fe9169 100644 --- a/tests/baselines/reference/arrayLiteral2.js +++ b/tests/baselines/reference/arrayLiteral2.js @@ -2,4 +2,7 @@ var v30 = [1, 2], v31; //// [arrayLiteral2.js] -var v30 = [1, 2], v31; +var v30 = [ + 1, + 2 +], v31; diff --git a/tests/baselines/reference/arrayLiteralContextualType.js b/tests/baselines/reference/arrayLiteralContextualType.js index 0edf5c45164..c86347cb028 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.js +++ b/tests/baselines/reference/arrayLiteralContextualType.js @@ -44,8 +44,10 @@ var Elephant = (function () { } return Elephant; })(); -function foo(animals) { } -function bar(animals) { } +function foo(animals) { +} +function bar(animals) { +} foo([ new Giraffe(), new Elephant() @@ -54,6 +56,9 @@ bar([ new Giraffe(), new Elephant() ]); // Legal because of the contextual type IAnimal provided by the parameter -var arr = [new Giraffe(), new Elephant()]; +var arr = [ + new Giraffe(), + new Elephant() +]; foo(arr); // ok because arr is Array not {}[] bar(arr); // ok because arr is Array not {}[] diff --git a/tests/baselines/reference/arrayLiteralSpread.js b/tests/baselines/reference/arrayLiteralSpread.js index 73a60714526..6cb0335e55d 100644 --- a/tests/baselines/reference/arrayLiteralSpread.js +++ b/tests/baselines/reference/arrayLiteralSpread.js @@ -25,7 +25,11 @@ function f2() { //// [arrayLiteralSpread.js] function f0() { - var a = [1, 2, 3]; + var a = [ + 1, + 2, + 3 + ]; var a1 = a; var a2 = [1].concat(a); var a3 = [1, 2].concat(a); @@ -36,11 +40,17 @@ function f0() { var a8 = a.concat(a, a); } function f1() { - var a = [1, 2, 3]; + var a = [ + 1, + 2, + 3 + ]; var b = ["hello"].concat(a, [true]); var b; } function f2() { var a = []; - var b = [5]; + var b = [ + 5 + ]; } diff --git a/tests/baselines/reference/arrayLiteralTypeInference.js b/tests/baselines/reference/arrayLiteralTypeInference.js index 28aa143fa61..8d74e6f1444 100644 --- a/tests/baselines/reference/arrayLiteralTypeInference.js +++ b/tests/baselines/reference/arrayLiteralTypeInference.js @@ -78,8 +78,14 @@ var ActionB = (function (_super) { return ActionB; })(Action); var x1 = [ - { id: 2, trueness: false }, - { id: 3, name: "three" } + { + id: 2, + trueness: false + }, + { + id: 3, + name: "three" + } ]; var x2 = [ new ActionA(), @@ -91,8 +97,14 @@ var x3 = [ new ActionB() ]; var z1 = [ - { id: 2, trueness: false }, - { id: 3, name: "three" } + { + id: 2, + trueness: false + }, + { + id: 3, + name: "three" + } ]; var z2 = [ new ActionA(), diff --git a/tests/baselines/reference/arrayLiteralWidened.js b/tests/baselines/reference/arrayLiteralWidened.js index a250c47849d..02f9e0c6544 100644 --- a/tests/baselines/reference/arrayLiteralWidened.js +++ b/tests/baselines/reference/arrayLiteralWidened.js @@ -17,10 +17,43 @@ var c = [[[null]],[undefined]] //// [arrayLiteralWidened.js] // array literals are widened upon assignment according to their element type var a = []; // any[] -var a = [null, null]; -var a = [undefined, undefined]; -var b = [[], [null, null]]; // any[][] -var b = [[], []]; -var b = [[undefined, undefined]]; -var c = [[[]]]; // any[][][] -var c = [[[null]], [undefined]]; +var a = [ + null, + null +]; +var a = [ + undefined, + undefined +]; +var b = [ + [], + [ + null, + null + ] +]; // any[][] +var b = [ + [], + [] +]; +var b = [ + [ + undefined, + undefined + ] +]; +var c = [ + [ + [] + ] +]; // any[][][] +var c = [ + [ + [ + null + ] + ], + [ + undefined + ] +]; diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js index b4f869d499e..9855abefb2c 100644 --- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js +++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.js @@ -20,10 +20,48 @@ var gs = [(b: { x: number; z?: number }) => 2, (a: { x: number; y?: number }) => var a; var b; var c; -var as = [a, b]; // { x: number; y?: number };[] -var bs = [b, a]; // { x: number; z?: number };[] -var cs = [a, b, c]; // { x: number; y?: number };[] -var ds = [function (x) { return 1; }, function (x) { return 2; }]; // { (x:Object) => number }[] -var es = [function (x) { return 2; }, function (x) { return 1; }]; // { (x:string) => number }[] -var fs = [function (a) { return 1; }, function (b) { return 2; }]; // (a: { x: number; y?: number }) => number[] -var gs = [function (b) { return 2; }, function (a) { return 1; }]; // (b: { x: number; z?: number }) => number[] +var as = [ + a, + b +]; // { x: number; y?: number };[] +var bs = [ + b, + a +]; // { x: number; z?: number };[] +var cs = [ + a, + b, + c +]; // { x: number; y?: number };[] +var ds = [ + function (x) { + return 1; + }, + function (x) { + return 2; + } +]; // { (x:Object) => number }[] +var es = [ + function (x) { + return 2; + }, + function (x) { + return 1; + } +]; // { (x:string) => number }[] +var fs = [ + function (a) { + return 1; + }, + function (b) { + return 2; + } +]; // (a: { x: number; y?: number }) => number[] +var gs = [ + function (b) { + return 2; + }, + function (a) { + return 1; + } +]; // (b: { x: number; z?: number }) => number[] diff --git a/tests/baselines/reference/arrayLiterals.js b/tests/baselines/reference/arrayLiterals.js index 16e5ec7eee4..e55d14e2994 100644 --- a/tests/baselines/reference/arrayLiterals.js +++ b/tests/baselines/reference/arrayLiterals.js @@ -44,24 +44,91 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var arr1 = [[], [1], ['']]; -var arr2 = [[null], [1], ['']]; +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]; +var stringArrArr = [ + [ + '' + ], + [ + "" + ] +]; +var stringArr = [ + '', + "" +]; +var numberArr = [ + 0, + 0.0, + 0x00, + 1e1 +]; +var boolArr = [ + false, + true, + false, + true +]; var C = (function () { function C() { } return C; })(); -var classArr = [new C(), new C()]; -var classTypeArray = [C, C, C]; +var classArr = [ + new C(), + new C() +]; +var classTypeArray = [ + C, + C, + C +]; var classTypeArray; // 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 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; -var context2 = [{ a: '', b: 0, c: '' }, { a: "", b: 3, c: 0 }]; +var context1 = [ + { + a: '', + b: 0, + c: '' + }, + { + a: "", + b: 3, + c: 0 + } +]; +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[] var Base = (function () { function Base() { @@ -84,6 +151,12 @@ var Derived2 = (function (_super) { return Derived2; })(Base); ; -var context3 = [new Derived1(), new Derived2()]; +var context3 = [ + 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 = [new Derived1(), new Derived1()]; +var context4 = [ + new Derived1(), + new Derived1() +]; diff --git a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js index f15215a88eb..cce02199052 100644 --- a/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js +++ b/tests/baselines/reference/arrayLiteralsWithRecursiveGenerics.js @@ -52,8 +52,20 @@ var MyList = (function () { var list; var list2; var myList; -var xs = [list, myList]; // {}[] -var ys = [list, list2]; // {}[] -var zs = [list, null]; // List[] +var xs = [ + list, + myList +]; // {}[] +var ys = [ + list, + list2 +]; // {}[] +var zs = [ + list, + null +]; // List[] var myDerivedList; -var as = [list, myDerivedList]; // List[] +var as = [ + list, + myDerivedList +]; // List[] diff --git a/tests/baselines/reference/arrayOfFunctionTypes3.js b/tests/baselines/reference/arrayOfFunctionTypes3.js index c0829418dd7..036fc2d85ae 100644 --- a/tests/baselines/reference/arrayOfFunctionTypes3.js +++ b/tests/baselines/reference/arrayOfFunctionTypes3.js @@ -28,25 +28,42 @@ var r7 = r6(''); // any not string //// [arrayOfFunctionTypes3.js] // valid uses of arrays of function types -var x = [function () { return 1; }, function () { }]; +var x = [ + function () { + return 1; + }, + function () { + } +]; var r2 = x[0](); var C = (function () { function C() { } return C; })(); -var y = [C, C]; +var y = [ + C, + C +]; var r3 = new y[0](); var a; var b; var c; -var z = [a, b, c]; +var z = [ + a, + b, + c +]; var r4 = z[0]; var r5 = r4(''); // any not string var r5b = r4(1); var a2; var b2; var c2; -var z2 = [a2, b2, c2]; +var z2 = [ + a2, + b2, + c2 +]; var r6 = z2[0]; var r7 = r6(''); // any not string diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js index 6fcdae657e9..3b0f2c11aa7 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js @@ -7,6 +7,7 @@ class X { var X = (function () { function X() { } - X.prototype.f = function (a) { }; + X.prototype.f = function (a) { + }; return X; })(); diff --git a/tests/baselines/reference/arraySigChecking.js b/tests/baselines/reference/arraySigChecking.js index 16189305ead..82ef3d059ef 100644 --- a/tests/baselines/reference/arraySigChecking.js +++ b/tests/baselines/reference/arraySigChecking.js @@ -34,13 +34,22 @@ isEmpty(['a']); //// [arraySigChecking.js] var myVar; -var strArray = [myVar.voidFn()]; +var strArray = [ + myVar.voidFn() +]; var myArray; -myArray = [[1, 2]]; +myArray = [ + [ + 1, + 2 + ] +]; function isEmpty(l) { return l.length === 0; } isEmpty([]); isEmpty(new Array(3)); isEmpty(new Array(3)); -isEmpty(['a']); +isEmpty([ + 'a' +]); diff --git a/tests/baselines/reference/arrowFunctionContexts.js b/tests/baselines/reference/arrowFunctionContexts.js index a10e3955ae0..3a47b787418 100644 --- a/tests/baselines/reference/arrowFunctionContexts.js +++ b/tests/baselines/reference/arrowFunctionContexts.js @@ -105,7 +105,9 @@ var __extends = this.__extends || function (d, b) { }; // Arrow function used in with statement with (window) { - var p = function () { return this; }; + var p = function () { + return this; + }; } // Arrow function as argument to super call var Base = (function () { @@ -117,35 +119,55 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { var _this = this; - _super.call(this, function () { return _this; }); + _super.call(this, function () { + return _this; + }); } return Derived; })(Base); // Arrow function as function argument -window.setTimeout(function () { return null; }, 100); +window.setTimeout(function () { + return null; +}, 100); // Arrow function as value in array literal -var obj = function (n) { return ''; }; +var obj = function (n) { + return ''; +}; var obj; // OK -var arr = [function (n) { return ''; }]; +var arr = [ + function (n) { + return ''; + } +]; var arr; // Incorrect error here (bug 829597) // Arrow function as enum value var E; (function (E) { - E[E["x"] = function () { return 4; }] = "x"; - E[E["y"] = (function () { return _this; }).length] = "y"; // error, can't use this in enum + E[E["x"] = function () { + return 4; + }] = "x"; + E[E["y"] = (function () { + return _this; + }).length] = "y"; // error, can't use this in enum })(E || (E = {})); // Arrow function as module variable initializer var M; (function (M) { - M.a = function (s) { return ''; }; - var b = function (s) { return s; }; + M.a = function (s) { + return ''; + }; + var b = function (s) { + return s; + }; })(M || (M = {})); // Repeat above for module members that are functions? (necessary to redo all of them?) var M2; (function (M2) { // Arrow function used in with statement with (window) { - var p = function () { return this; }; + var p = function () { + return this; + }; } // Arrow function as argument to super call var Base = (function () { @@ -157,37 +179,69 @@ var M2; __extends(Derived, _super); function Derived() { var _this = this; - _super.call(this, function () { return _this; }); + _super.call(this, function () { + return _this; + }); } return Derived; })(Base); // Arrow function as function argument - window.setTimeout(function () { return null; }, 100); + window.setTimeout(function () { + return null; + }, 100); // Arrow function as value in array literal - var obj = function (n) { return ''; }; + var obj = function (n) { + return ''; + }; var obj; // OK - var arr = [function (n) { return ''; }]; + var arr = [ + function (n) { + return ''; + } + ]; var arr; // Incorrect error here (bug 829597) // Arrow function as enum value var E; (function (E) { - E[E["x"] = function () { return 4; }] = "x"; - E[E["y"] = (function () { return _this; }).length] = "y"; + E[E["x"] = function () { + return 4; + }] = "x"; + E[E["y"] = (function () { + return _this; + }).length] = "y"; })(E || (E = {})); // Arrow function as module variable initializer var M; (function (M) { - M.a = function (s) { return ''; }; - var b = function (s) { return s; }; + M.a = function (s) { + return ''; + }; + var b = function (s) { + return s; + }; })(M || (M = {})); })(M2 || (M2 = {})); // (ParamList) => { ... } is a generic arrow function -var generic1 = function (n) { return [n]; }; +var generic1 = function (n) { + return [ + n + ]; +}; var generic1; // Incorrect error, Bug 829597 -var generic2 = function (n) { return [n]; }; +var generic2 = function (n) { + return [ + n + ]; +}; var generic2; // ((ParamList) => { ... } ) is a type assertion to an arrow function -var asserted1 = (function (n) { return [n]; }); +var asserted1 = (function (n) { + return [ + n + ]; +}); var asserted1; -var asserted2 = (function (n) { return n; }); +var asserted2 = (function (n) { + return n; +}); var asserted2; diff --git a/tests/baselines/reference/arrowFunctionExpressions.js b/tests/baselines/reference/arrowFunctionExpressions.js index 68516b52cb2..760ba23627b 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.js +++ b/tests/baselines/reference/arrowFunctionExpressions.js @@ -90,49 +90,84 @@ function tryCatchFn() { //// [arrowFunctionExpressions.js] // ArrowFormalParameters => AssignmentExpression is equivalent to ArrowFormalParameters => { return AssignmentExpression; } -var a = function (p) { return p.length; }; -var a = function (p) { return p.length; }; +var a = function (p) { + return p.length; +}; +var a = function (p) { + return p.length; +}; // Identifier => Block is equivalent to(Identifier) => Block -var b = function (j) { return 0; }; -var b = function (j) { return 0; }; +var b = function (j) { + return 0; +}; +var b = function (j) { + return 0; +}; // Identifier => AssignmentExpression is equivalent to(Identifier) => AssignmentExpression var c; -var d = function (n) { return c = n; }; -var d = function (n) { return c = n; }; +var d = function (n) { + return c = n; +}; +var d = function (n) { + return c = n; +}; var d; // Arrow function used in class member initializer // Arrow function used in class member function var MyClass = (function () { function MyClass() { var _this = this; - this.m = function (n) { return n + 1; }; - this.p = function (n) { return n && _this; }; + this.m = function (n) { + return n + 1; + }; + this.p = function (n) { + return n && _this; + }; } MyClass.prototype.fn = function () { var _this = this; - var m = function (n) { return n + 1; }; - var p = function (n) { return n && _this; }; + var m = function (n) { + return n + 1; + }; + var p = function (n) { + return n && _this; + }; }; return MyClass; })(); // Arrow function used in arrow function -var arrrr = function () { return function (m) { return function () { return function (n) { return m + n; }; }; }; }; +var arrrr = function () { + return function (m) { + return function () { + return function (n) { + return m + n; + }; + }; + }; +}; var e = arrrr()(3)()(4); var e; // Arrow function used in arrow function used in function function someFn() { - var arr = function (n) { return function (p) { return p * n; }; }; + var arr = function (n) { + return function (p) { + return p * n; + }; + }; arr(3)(4).toExponential(); } // Arrow function used in function function someOtherFn() { - var arr = function (n) { return '' + n; }; + var arr = function (n) { + return '' + n; + }; arr(4).charAt(0); } // Arrow function used in nested function in function function outerFn() { function innerFn() { - var arrowFn = function () { }; + var arrowFn = function () { + }; var p = arrowFn(); var p; } @@ -140,7 +175,9 @@ function outerFn() { // Arrow function used in nested function in arrow function var f = function (n) { function fn(x) { - return function () { return n + x; }; + return function () { + return n + x; + }; } return fn(4); }; @@ -150,7 +187,9 @@ var g; function someOuterFn() { var arr = function (n) { function innerFn() { - return function () { return n.length; }; + return function () { + return n.length; + }; } return innerFn; }; @@ -162,12 +201,18 @@ h.toExponential(); function tryCatchFn() { var _this = this; try { - var x = function () { return _this; }; + var x = function () { + return _this; + }; } catch (e) { - var t = function () { return e + _this; }; + var t = function () { + return e + _this; + }; } finally { - var m = function () { return _this + ''; }; + var m = function () { + return _this + ''; + }; } } diff --git a/tests/baselines/reference/arrowFunctionInConstructorArgument1.js b/tests/baselines/reference/arrowFunctionInConstructorArgument1.js index 0f9c3f81b3b..3cfc18d2cf7 100644 --- a/tests/baselines/reference/arrowFunctionInConstructorArgument1.js +++ b/tests/baselines/reference/arrowFunctionInConstructorArgument1.js @@ -11,4 +11,6 @@ var C = (function () { } return C; })(); -var c = new C(function () { return asdf; }); // should error +var c = new C(function () { + return asdf; +}); // should error diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement1.js b/tests/baselines/reference/arrowFunctionInExpressionStatement1.js index 9969a28b6ce..55a6d2781fb 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement1.js +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement1.js @@ -2,4 +2,6 @@ () => 0; //// [arrowFunctionInExpressionStatement1.js] -(function () { return 0; }); +(function () { + return 0; +}); diff --git a/tests/baselines/reference/arrowFunctionInExpressionStatement2.js b/tests/baselines/reference/arrowFunctionInExpressionStatement2.js index 2cc6aca998e..63f3facd858 100644 --- a/tests/baselines/reference/arrowFunctionInExpressionStatement2.js +++ b/tests/baselines/reference/arrowFunctionInExpressionStatement2.js @@ -6,5 +6,7 @@ module M { //// [arrowFunctionInExpressionStatement2.js] var M; (function (M) { - (function () { return 0; }); + (function () { + return 0; + }); })(M || (M = {})); diff --git a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js index 931520294e9..51ddc0f6dac 100644 --- a/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js +++ b/tests/baselines/reference/arrowFunctionMissingCurlyWithSemicolon.js @@ -8,4 +8,6 @@ var square = (x: number) => x * x; // Should error at semicolon. var f = ; var b = 1 * 2 * 3 * 4; -var square = function (x) { return x * x; }; +var square = function (x) { + return x * x; +}; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js index d53f33deadc..e3ff7583448 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody1.js @@ -2,4 +2,6 @@ var v = a => {} //// [arrowFunctionWithObjectLiteralBody1.js] -var v = function (a) { return {}; }; +var v = function (a) { + return {}; +}; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js index f2fc086c082..384cdc2d48b 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody2.js @@ -2,4 +2,6 @@ var v = a => {} //// [arrowFunctionWithObjectLiteralBody2.js] -var v = function (a) { return {}; }; +var v = function (a) { + return {}; +}; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js index 77f5c2d4c3d..f2d27ea4a63 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.js @@ -8,7 +8,27 @@ var c = () => ({ name: "foo", message: "bar" }); var d = () => ((({ name: "foo", message: "bar" }))); //// [arrowFunctionWithObjectLiteralBody5.js] -var a = function () { return { name: "foo", message: "bar" }; }; -var b = function () { return ({ name: "foo", message: "bar" }); }; -var c = function () { return ({ name: "foo", message: "bar" }); }; -var d = function () { return (({ name: "foo", message: "bar" })); }; +var a = function () { + return { + name: "foo", + message: "bar" + }; +}; +var b = function () { + return ({ + name: "foo", + message: "bar" + }); +}; +var c = function () { + return ({ + name: "foo", + message: "bar" + }); +}; +var d = function () { + return (({ + name: "foo", + message: "bar" + })); +}; diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js index 6128a6bef86..ac2af4046eb 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.js @@ -8,7 +8,19 @@ var c = () => ({ name: "foo", message: "bar" }); var d = () => ((({ name: "foo", message: "bar" }))); //// [arrowFunctionWithObjectLiteralBody6.js] -var a = () => ({ name: "foo", message: "bar" }); -var b = () => ({ name: "foo", message: "bar" }); -var c = () => ({ name: "foo", message: "bar" }); -var d = () => (({ name: "foo", message: "bar" })); +var a = () => ({ + name: "foo", + message: "bar" +}); +var b = () => ({ + name: "foo", + message: "bar" +}); +var c = () => ({ + name: "foo", + message: "bar" +}); +var d = () => (({ + name: "foo", + message: "bar" +})); diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.js b/tests/baselines/reference/arrowFunctionsMissingTokens.js index e0e22578ac6..7bd24f07577 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.js +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.js @@ -69,22 +69,39 @@ module okay { //// [arrowFunctionsMissingTokens.js] var missingArrowsWithCurly; (function (missingArrowsWithCurly) { - var a = function () { }; - var b = function () { }; - var c = function (x) { }; - var d = function (x, y) { }; - var e = function (x, y) { }; + var a = function () { + }; + var b = function () { + }; + var c = function (x) { + }; + var d = function (x, y) { + }; + var e = function (x, y) { + }; })(missingArrowsWithCurly || (missingArrowsWithCurly = {})); var missingCurliesWithArrow; (function (missingCurliesWithArrow) { var withStatement; (function (withStatement) { - var a = function () { var k = 10; }; - var b = function () { var k = 10; }; - var c = function (x) { var k = 10; }; - var d = function (x, y) { var k = 10; }; - var e = function (x, y) { var k = 10; }; - var f = function () { var k = 10; }; + var a = function () { + var k = 10; + }; + var b = function () { + var k = 10; + }; + var c = function (x) { + var k = 10; + }; + var d = function (x, y) { + var k = 10; + }; + var e = function (x, y) { + var k = 10; + }; + var f = function () { + var k = 10; + }; })(withStatement || (withStatement = {})); var withoutStatement; (function (withoutStatement) { @@ -110,9 +127,14 @@ var ce_nEst_pas_une_arrow_function; })(ce_nEst_pas_une_arrow_function || (ce_nEst_pas_une_arrow_function = {})); var okay; (function (okay) { - var a = function () { }; - var b = function () { }; - var c = function (x) { }; - var d = function (x, y) { }; - var e = function (x, y) { }; + var a = function () { + }; + var b = function () { + }; + var c = function (x) { + }; + var d = function (x, y) { + }; + var e = function (x, y) { + }; })(okay || (okay = {})); diff --git a/tests/baselines/reference/asiArith.js b/tests/baselines/reference/asiArith.js index b5016af3117..6d7b964c8d0 100644 --- a/tests/baselines/reference/asiArith.js +++ b/tests/baselines/reference/asiArith.js @@ -37,9 +37,7 @@ y //// [asiArith.js] var x = 1; var y = 1; -var z = x - + + +y; +var z = x + + +y; var a = 1; var b = 1; -var c = x - - - -y; +var c = x - - -y; diff --git a/tests/baselines/reference/assign1.js b/tests/baselines/reference/assign1.js index fa18c8f287b..f29f5a2a9de 100644 --- a/tests/baselines/reference/assign1.js +++ b/tests/baselines/reference/assign1.js @@ -12,5 +12,8 @@ module M { //// [assign1.js] var M; (function (M) { - var x = { salt: 2, pepper: 0 }; + var x = { + salt: 2, + pepper: 0 + }; })(M || (M = {})); diff --git a/tests/baselines/reference/assignEveryTypeToAny.js b/tests/baselines/reference/assignEveryTypeToAny.js index 15aa6bcdd91..afe0d17cea1 100644 --- a/tests/baselines/reference/assignEveryTypeToAny.js +++ b/tests/baselines/reference/assignEveryTypeToAny.js @@ -91,8 +91,16 @@ var h; x = h; var i; x = i; -x = { f: function () { return 1; } }; -x = { f: function (x) { return x; } }; +x = { + f: function () { + return 1; + } +}; +x = { + f: function (x) { + return x; + } +}; function j(a) { x = a; } diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js index fe6142cafe0..182ceec9821 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js @@ -10,6 +10,11 @@ fn(function (a, b) { return true; }) //// [assignLambdaToNominalSubtypeOfFunction.js] -function fn(cb) { } -fn(function (a, b) { return true; }); -fn(function (a, b) { return true; }); +function fn(cb) { +} +fn(function (a, b) { + return true; +}); +fn(function (a, b) { + return true; +}); diff --git a/tests/baselines/reference/assignToExistingClass.js b/tests/baselines/reference/assignToExistingClass.js index f12979f3142..c739279c85b 100644 --- a/tests/baselines/reference/assignToExistingClass.js +++ b/tests/baselines/reference/assignToExistingClass.js @@ -28,7 +28,9 @@ var Test; } Tester.prototype.willThrowError = function () { Mocked = Mocked || function () { - return { myProp: "test" }; + return { + myProp: "test" + }; }; }; return Tester; diff --git a/tests/baselines/reference/assignToFn.js b/tests/baselines/reference/assignToFn.js index 2ff8ceedfa6..a565b9ab1ad 100644 --- a/tests/baselines/reference/assignToFn.js +++ b/tests/baselines/reference/assignToFn.js @@ -13,6 +13,10 @@ module M { //// [assignToFn.js] var M; (function (M) { - var x = { f: function (n) { return true; } }; + var x = { + f: function (n) { + return true; + } + }; x.f = "hello"; })(M || (M = {})); diff --git a/tests/baselines/reference/assignmentCompat1.js b/tests/baselines/reference/assignmentCompat1.js index 09546b7165e..99b6d592afd 100644 --- a/tests/baselines/reference/assignmentCompat1.js +++ b/tests/baselines/reference/assignmentCompat1.js @@ -6,7 +6,9 @@ x = y; y = x; //// [assignmentCompat1.js] -var x = { one: 1 }; +var x = { + one: 1 +}; var y; x = y; y = x; diff --git a/tests/baselines/reference/assignmentCompatBug2.js b/tests/baselines/reference/assignmentCompatBug2.js index 5545cc7d19c..6f4ebd585ed 100644 --- a/tests/baselines/reference/assignmentCompatBug2.js +++ b/tests/baselines/reference/assignmentCompatBug2.js @@ -39,33 +39,62 @@ b3 = { }; // error //// [assignmentCompatBug2.js] -var b2 = { a: 0 }; // error -b2 = { a: 0 }; // error -b2 = { b: 0, a: 0 }; +var b2 = { + a: 0 +}; // error +b2 = { + a: 0 +}; // error +b2 = { + b: 0, + a: 0 +}; var b3; b3 = { - f: function (n) { return 0; }, - g: function (s) { return 0; }, + f: function (n) { + return 0; + }, + g: function (s) { + return 0; + }, m: 0 }; // ok b3 = { - f: function (n) { return 0; }, - g: function (s) { return 0; } + f: function (n) { + return 0; + }, + g: function (s) { + return 0; + } }; // error b3 = { - f: function (n) { return 0; }, + f: function (n) { + return 0; + }, m: 0 }; // error b3 = { - f: function (n) { return 0; }, - g: function (s) { return 0; }, + f: function (n) { + return 0; + }, + g: function (s) { + return 0; + }, m: 0, n: 0, - k: function (a) { return null; } + k: function (a) { + return null; + } }; // ok b3 = { - f: function (n) { return 0; }, - g: function (s) { return 0; }, + f: function (n) { + return 0; + }, + g: function (s) { + return 0; + }, n: 0, - k: function (a) { return null; } + k: function (a) { + return null; + } }; // error diff --git a/tests/baselines/reference/assignmentCompatBug3.js b/tests/baselines/reference/assignmentCompatBug3.js index 049e7090335..6d3deedc5b8 100644 --- a/tests/baselines/reference/assignmentCompatBug3.js +++ b/tests/baselines/reference/assignmentCompatBug3.js @@ -28,8 +28,12 @@ foo(x + y); //// [assignmentCompatBug3.js] function makePoint(x, y) { return { - get x() { return x; }, - get y() { return y; }, + get x() { + return x; + }, + get y() { + return y; + }, //x: "yo", //y: "boo", dist: function () { @@ -49,7 +53,8 @@ var C = (function () { }); return C; })(); -function foo(test) { } +function foo(test) { +} var x; var y; foo(x); diff --git a/tests/baselines/reference/assignmentCompatBug5.js b/tests/baselines/reference/assignmentCompatBug5.js index ae444c3dad6..d769e9afd25 100644 --- a/tests/baselines/reference/assignmentCompatBug5.js +++ b/tests/baselines/reference/assignmentCompatBug5.js @@ -12,11 +12,22 @@ foo3((n) => { return; }); //// [assignmentCompatBug5.js] -function foo1(x) { } -foo1({ b: 5 }); -function foo2(x) { } -foo2(["s", "t"]); -function foo3(x) { } +function foo1(x) { +} +foo1({ + b: 5 +}); +function foo2(x) { +} +foo2([ + "s", + "t" +]); +function foo3(x) { +} ; -foo3(function (s) { }); -foo3(function (n) { return; }); +foo3(function (s) { +}); +foo3(function (n) { + return; +}); diff --git a/tests/baselines/reference/assignmentCompatForEnums.js b/tests/baselines/reference/assignmentCompatForEnums.js index 8db85399fa8..4bca6a514d2 100644 --- a/tests/baselines/reference/assignmentCompatForEnums.js +++ b/tests/baselines/reference/assignmentCompatForEnums.js @@ -22,7 +22,9 @@ var TokenType; })(TokenType || (TokenType = {})); ; var list = {}; -function returnType() { return null; } +function returnType() { + return null; +} function foo() { var x = returnType(); var x = list['one']; diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js index c96c739bf3c..b56a09ff7e7 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.js @@ -6,7 +6,17 @@ foo({ id: 1234, name: false }); // Error, name of wrong type foo({ name: "hello" }); // Error, id required but missing //// [assignmentCompatFunctionsWithOptionalArgs.js] -foo({ id: 1234 }); // Ok -foo({ id: 1234, name: "hello" }); // Ok -foo({ id: 1234, name: false }); // Error, name of wrong type -foo({ name: "hello" }); // Error, id required but missing +foo({ + id: 1234 +}); // Ok +foo({ + id: 1234, + name: "hello" +}); // Ok +foo({ + id: 1234, + name: false +}); // Error, name of wrong type +foo({ + name: "hello" +}); // Error, id required but missing diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js index bb6817bb60e..2eac9cdb476 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js @@ -20,8 +20,10 @@ Biz(new Foo()); var Foo = (function () { function Foo() { } - Foo.prototype.Boz = function () { }; + Foo.prototype.Boz = function () { + }; return Foo; })(); -function Biz(map) { } +function Biz(map) { +} Biz(new Foo()); diff --git a/tests/baselines/reference/assignmentCompatOnNew.js b/tests/baselines/reference/assignmentCompatOnNew.js index 1b8cfdcc3bf..bc3b7e6ba96 100644 --- a/tests/baselines/reference/assignmentCompatOnNew.js +++ b/tests/baselines/reference/assignmentCompatOnNew.js @@ -13,5 +13,6 @@ var Foo = (function () { return Foo; })(); ; -function bar(x) { } +function bar(x) { +} bar(Foo); // Error, but should be allowed diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures.js b/tests/baselines/reference/assignmentCompatWithCallSignatures.js index 12fc6159fac..9cd0a8c8bac 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures.js @@ -55,20 +55,40 @@ t = s; t = a2; a = s; a = a2; -t = function (x) { return 1; }; -t = function () { return 1; }; -t = function (x) { return ''; }; -a = function (x) { return 1; }; -a = function () { return 1; }; -a = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function () { + return 1; +}; +t = function (x) { + return ''; +}; +a = function (x) { + return 1; +}; +a = function () { + return 1; +}; +a = function (x) { + return ''; +}; var s2; var a3; // these are errors t = s2; t = a3; -t = function (x) { return 1; }; -t = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function (x) { + return ''; +}; a = s2; a = a3; -a = function (x) { return 1; }; -a = function (x) { return ''; }; +a = function (x) { + return 1; +}; +a = function (x) { + return ''; +}; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures2.js b/tests/baselines/reference/assignmentCompatWithCallSignatures2.js index 6bfc1b6c0d6..288a2bdf435 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures2.js @@ -62,26 +62,70 @@ t = s; t = a2; a = s; a = a2; -t = { f: function () { return 1; } }; -t = { f: function (x) { return 1; } }; -t = { f: function f() { return 1; } }; -t = { f: function (x) { return ''; } }; -a = { f: function () { return 1; } }; -a = { f: function (x) { return 1; } }; -a = { f: function (x) { return ''; } }; +t = { + f: function () { + return 1; + } +}; +t = { + f: function (x) { + return 1; + } +}; +t = { + f: function f() { + return 1; + } +}; +t = { + f: function (x) { + return ''; + } +}; +a = { + f: function () { + return 1; + } +}; +a = { + f: function (x) { + return 1; + } +}; +a = { + f: function (x) { + return ''; + } +}; // errors -t = function () { return 1; }; -t = function (x) { return ''; }; -a = function () { return 1; }; -a = function (x) { return ''; }; +t = function () { + return 1; +}; +t = function (x) { + return ''; +}; +a = function () { + return 1; +}; +a = function (x) { + return ''; +}; var s2; var a3; // these are errors t = s2; t = a3; -t = function (x) { return 1; }; -t = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function (x) { + return ''; +}; a = s2; a = a3; -a = function (x) { return 1; }; -a = function (x) { return ''; }; +a = function (x) { + return 1; +}; +a = function (x) { + return ''; +}; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js index e12a741cd0f..3aa9d5a9a9e 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithOptionalParameters.js @@ -73,9 +73,15 @@ var a5: (x?: number, y?: number) => number; // call signatures in derived types must have the same or fewer optional parameters as the base type var b; var a; -a = function () { return 1; }; // ok, same number of required params -a = function (x) { return 1; }; // ok, same number of required params -a = function (x) { return 1; }; // error, too many required params +a = function () { + return 1; +}; // ok, same number of required params +a = function (x) { + return 1; +}; // ok, same number of required params +a = function (x) { + return 1; +}; // error, too many required params a = b.a; // ok a = b.a2; // ok a = b.a3; // error @@ -83,9 +89,15 @@ a = b.a4; // error a = b.a5; // ok a = b.a6; // error var a2; -a2 = function () { return 1; }; // ok, same number of required params -a2 = function (x) { return 1; }; // ok, same number of required params -a2 = function (x) { return 1; }; // ok, same number of params +a2 = function () { + return 1; +}; // ok, same number of required params +a2 = function (x) { + return 1; +}; // ok, same number of required params +a2 = function (x) { + return 1; +}; // ok, same number of params a2 = b.a; // ok a2 = b.a2; // ok a2 = b.a3; // ok, same number of params @@ -93,10 +105,18 @@ a2 = b.a4; // ok, excess params are optional in b.a3 a2 = b.a5; // ok a2 = b.a6; // error var a3; -a3 = function () { return 1; }; // ok, fewer required params -a3 = function (x) { return 1; }; // ok, fewer required params -a3 = function (x) { return 1; }; // ok, same number of required params -a3 = function (x, y) { return 1; }; // error, too many required params +a3 = function () { + return 1; +}; // ok, fewer required params +a3 = function (x) { + return 1; +}; // ok, fewer required params +a3 = function (x) { + return 1; +}; // ok, same number of required params +a3 = function (x, y) { + return 1; +}; // error, too many required params a3 = b.a; // ok a3 = b.a2; // ok a3 = b.a3; // ok @@ -104,10 +124,18 @@ a3 = b.a4; // ok a3 = b.a5; // ok a3 = b.a6; // error var a4; -a4 = function () { return 1; }; // ok, fewer required params -a4 = function (x, y) { return 1; }; // ok, fewer required params -a4 = function (x) { return 1; }; // ok, same number of required params -a4 = function (x, y) { return 1; }; // ok, same number of params +a4 = function () { + return 1; +}; // ok, fewer required params +a4 = function (x, y) { + return 1; +}; // ok, fewer required params +a4 = function (x) { + return 1; +}; // ok, same number of required params +a4 = function (x, y) { + return 1; +}; // ok, same number of params a4 = b.a; // ok a4 = b.a2; // ok a4 = b.a3; // ok @@ -115,10 +143,18 @@ a4 = b.a4; // ok a4 = b.a5; // ok a4 = b.a6; // ok, same number of params var a5; -a5 = function () { return 1; }; // ok, fewer required params -a5 = function (x, y) { return 1; }; // ok, fewer required params -a5 = function (x) { return 1; }; // ok, fewer params in lambda -a5 = function (x, y) { return 1; }; // ok, same number of params +a5 = function () { + return 1; +}; // ok, fewer required params +a5 = function (x, y) { + return 1; +}; // ok, fewer required params +a5 = function (x) { + return 1; +}; // ok, fewer params in lambda +a5 = function (x, y) { + return 1; +}; // ok, same number of params a5 = b.a; // ok a5 = b.a2; // ok a5 = b.a3; // ok, fewer params in b.a3 diff --git a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js index f4cf5cc79e2..054e865eb45 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js +++ b/tests/baselines/reference/assignmentCompatWithCallSignaturesWithRestParameters.js @@ -48,7 +48,9 @@ var a4: (x?: number, y?: string, ...z: number[]) => number; //// [assignmentCompatWithCallSignaturesWithRestParameters.js] // call signatures in derived types must have the same or fewer optional parameters as the target for assignment var a; // ok, same number of required params -a = function () { return 1; }; // ok, same number of required params +a = function () { + return 1; +}; // ok, same number of required params a = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -63,12 +65,22 @@ a = function () { } return 1; }; // error, type mismatch -a = function (x) { return 1; }; // ok, same number of required params -a = function (x, y, z) { return 1; }; // ok, same number of required params -a = function (x) { return 1; }; // ok, rest param corresponds to infinite number of params -a = function (x) { return 1; }; // error, incompatible type +a = function (x) { + return 1; +}; // ok, same number of required params +a = function (x, y, z) { + return 1; +}; // ok, same number of required params +a = function (x) { + return 1; +}; // ok, rest param corresponds to infinite number of params +a = function (x) { + return 1; +}; // error, incompatible type var a2; -a2 = function () { return 1; }; // ok, fewer required params +a2 = function () { + return 1; +}; // ok, fewer required params a2 = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -76,8 +88,12 @@ a2 = function () { } return 1; }; // ok, fewer required params -a2 = function (x) { return 1; }; // ok, fewer required params -a2 = function (x) { return 1; }; // ok, same number of required params +a2 = function (x) { + return 1; +}; // ok, fewer required params +a2 = function (x) { + return 1; +}; // ok, same number of required params a2 = function (x) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -92,14 +108,28 @@ a2 = function (x) { } return 1; }; // should be type mismatch error -a2 = function (x, y) { return 1; }; // ok, rest param corresponds to infinite number of params -a2 = function (x, y) { return 1; }; // ok, same number of required params +a2 = function (x, y) { + return 1; +}; // ok, rest param corresponds to infinite number of params +a2 = function (x, y) { + return 1; +}; // ok, same number of required params var a3; -a3 = function () { return 1; }; // ok, fewer required params -a3 = function (x) { return 1; }; // ok, fewer required params -a3 = function (x) { return 1; }; // ok, same number of required params -a3 = function (x, y) { return 1; }; // ok, all present params match -a3 = function (x, y, z) { return 1; }; // error +a3 = function () { + return 1; +}; // ok, fewer required params +a3 = function (x) { + return 1; +}; // ok, fewer required params +a3 = function (x) { + return 1; +}; // ok, same number of required params +a3 = function (x, y) { + return 1; +}; // ok, all present params match +a3 = function (x, y, z) { + return 1; +}; // error a3 = function (x) { var z = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -107,13 +137,25 @@ a3 = function (x) { } return 1; }; // error -a3 = function (x, y, z) { return 1; }; // error +a3 = function (x, y, z) { + return 1; +}; // error var a4; -a4 = function () { return 1; }; // ok, fewer required params -a4 = function (x, y) { return 1; }; // error, type mismatch -a4 = function (x) { return 1; }; // ok, all present params match -a4 = function (x, y) { return 1; }; // error, second param has type mismatch -a4 = function (x, y) { return 1; }; // ok, same number of required params with matching types +a4 = function () { + return 1; +}; // ok, fewer required params +a4 = function (x, y) { + return 1; +}; // error, type mismatch +a4 = function (x) { + return 1; +}; // ok, all present params match +a4 = function (x, y) { + return 1; +}; // error, second param has type mismatch +a4 = function (x, y) { + return 1; +}; // ok, same number of required params with matching types a4 = function (x) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures.js index c00aa121712..3b38bce1590 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.js @@ -53,9 +53,17 @@ var a3; // these are errors t = s2; t = a3; -t = function (x) { return 1; }; -t = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function (x) { + return ''; +}; a = s2; a = a3; -a = function (x) { return 1; }; -a = function (x) { return ''; }; +a = function (x) { + return 1; +}; +a = function (x) { + return ''; +}; diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js index d00762aa1c5..ac3accc6b5b 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.js @@ -55,18 +55,34 @@ t = a2; a = s; a = a2; // errors -t = function () { return 1; }; -t = function (x) { return ''; }; -a = function () { return 1; }; -a = function (x) { return ''; }; +t = function () { + return 1; +}; +t = function (x) { + return ''; +}; +a = function () { + return 1; +}; +a = function (x) { + return ''; +}; var s2; var a3; // these are errors t = s2; t = a3; -t = function (x) { return 1; }; -t = function (x) { return ''; }; +t = function (x) { + return 1; +}; +t = function (x) { + return ''; +}; a = s2; a = a3; -a = function (x) { return 1; }; -a = function (x) { return ''; }; +a = function (x) { + return 1; +}; +a = function (x) { + return ''; +}; diff --git a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js index f5a3499c8cc..1a5efce1ac8 100644 --- a/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.js @@ -138,24 +138,60 @@ var ClassTypeParam; function Base() { var _this = this; this.init = function () { - _this.a = function () { return null; }; // ok, same T of required params - _this.a = function (x) { return null; }; // ok, same T of required params - _this.a = function (x) { return null; }; // error, too many required params - _this.a2 = function () { return null; }; // ok, same T of required params - _this.a2 = function (x) { return null; }; // ok, same T of required params - _this.a2 = function (x) { return null; }; // ok, same number of params - _this.a3 = function () { return null; }; // ok, fewer required params - _this.a3 = function (x) { return null; }; // ok, fewer required params - _this.a3 = function (x) { return null; }; // ok, same T of required params - _this.a3 = function (x, y) { return null; }; // error, too many required params - _this.a4 = function () { return null; }; // ok, fewer required params - _this.a4 = function (x, y) { return null; }; // ok, fewer required params - _this.a4 = function (x) { return null; }; // ok, same T of required params - _this.a4 = function (x, y) { return null; }; // ok, same number of params - _this.a5 = function () { return null; }; // ok, fewer required params - _this.a5 = function (x, y) { return null; }; // ok, fewer required params - _this.a5 = function (x) { return null; }; // ok, all present params match - _this.a5 = function (x, y) { return null; }; // ok, same number of params + _this.a = function () { + return null; + }; // ok, same T of required params + _this.a = function (x) { + return null; + }; // ok, same T of required params + _this.a = function (x) { + return null; + }; // error, too many required params + _this.a2 = function () { + return null; + }; // ok, same T of required params + _this.a2 = function (x) { + return null; + }; // ok, same T of required params + _this.a2 = function (x) { + return null; + }; // ok, same number of params + _this.a3 = function () { + return null; + }; // ok, fewer required params + _this.a3 = function (x) { + return null; + }; // ok, fewer required params + _this.a3 = function (x) { + return null; + }; // ok, same T of required params + _this.a3 = function (x, y) { + return null; + }; // error, too many required params + _this.a4 = function () { + return null; + }; // ok, fewer required params + _this.a4 = function (x, y) { + return null; + }; // ok, fewer required params + _this.a4 = function (x) { + return null; + }; // ok, same T of required params + _this.a4 = function (x, y) { + return null; + }; // ok, same number of params + _this.a5 = function () { + return null; + }; // ok, fewer required params + _this.a5 = function (x, y) { + return null; + }; // ok, fewer required params + _this.a5 = function (x) { + return null; + }; // ok, all present params match + _this.a5 = function (x, y) { + return null; + }; // ok, same number of params }; } return Base; @@ -210,24 +246,60 @@ var GenericSignaturesValid; function Base2() { var _this = this; this.init = function () { - _this.a = function () { return null; }; // ok, same T of required params - _this.a = function (x) { return null; }; // ok, same T of required params - _this.a = function (x) { return null; }; // error, too many required params - _this.a2 = function () { return null; }; // ok, same T of required params - _this.a2 = function (x) { return null; }; // ok, same T of required params - _this.a2 = function (x) { return null; }; // ok, same number of params - _this.a3 = function () { return null; }; // ok, fewer required params - _this.a3 = function (x) { return null; }; // ok, fewer required params - _this.a3 = function (x) { return null; }; // ok, same T of required params - _this.a3 = function (x, y) { return null; }; // error, too many required params - _this.a4 = function () { return null; }; // ok, fewer required params - _this.a4 = function (x, y) { return null; }; // ok, fewer required params - _this.a4 = function (x) { return null; }; // ok, same T of required params - _this.a4 = function (x, y) { return null; }; // ok, same number of params - _this.a5 = function () { return null; }; // ok, fewer required params - _this.a5 = function (x, y) { return null; }; // ok, fewer required params - _this.a5 = function (x) { return null; }; // ok, all present params match - _this.a5 = function (x, y) { return null; }; // ok, same number of params + _this.a = function () { + return null; + }; // ok, same T of required params + _this.a = function (x) { + return null; + }; // ok, same T of required params + _this.a = function (x) { + return null; + }; // error, too many required params + _this.a2 = function () { + return null; + }; // ok, same T of required params + _this.a2 = function (x) { + return null; + }; // ok, same T of required params + _this.a2 = function (x) { + return null; + }; // ok, same number of params + _this.a3 = function () { + return null; + }; // ok, fewer required params + _this.a3 = function (x) { + return null; + }; // ok, fewer required params + _this.a3 = function (x) { + return null; + }; // ok, same T of required params + _this.a3 = function (x, y) { + return null; + }; // error, too many required params + _this.a4 = function () { + return null; + }; // ok, fewer required params + _this.a4 = function (x, y) { + return null; + }; // ok, fewer required params + _this.a4 = function (x) { + return null; + }; // ok, same T of required params + _this.a4 = function (x, y) { + return null; + }; // ok, same number of params + _this.a5 = function () { + return null; + }; // ok, fewer required params + _this.a5 = function (x, y) { + return null; + }; // ok, fewer required params + _this.a5 = function (x) { + return null; + }; // ok, all present params match + _this.a5 = function (x, y) { + return null; + }; // ok, same number of params }; } return Base2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers.js b/tests/baselines/reference/assignmentCompatWithObjectMembers.js index 3bd457f19d3..d3dfe7f93fc 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers.js @@ -106,8 +106,12 @@ var SimpleTypes; var t2; var a; var b; - var a2 = { foo: '' }; - var b2 = { foo: '' }; + var a2 = { + foo: '' + }; + var b2 = { + foo: '' + }; s = t; t = s; s = s2; @@ -146,8 +150,12 @@ var ObjectTypes; var t2; var a; var b; - var a2 = { foo: a2 }; - var b2 = { foo: b2 }; + var a2 = { + foo: a2 + }; + var b2 = { + foo: b2 + }; s = t; t = s; s = s2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers2.js b/tests/baselines/reference/assignmentCompatWithObjectMembers2.js index ea565e9545c..5eb2a07ac11 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers2.js @@ -61,8 +61,12 @@ var s2; var t2; var a; var b; -var a2 = { foo: '' }; -var b2 = { foo: '' }; +var a2 = { + foo: '' +}; +var b2 = { + foo: '' +}; s = t; t = s; s = s2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers3.js b/tests/baselines/reference/assignmentCompatWithObjectMembers3.js index 091a1e53d15..f65b06931c0 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers3.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers3.js @@ -61,8 +61,12 @@ var s2; var t2; var a; var b; -var a2 = { foo: '' }; -var b2 = { foo: '' }; +var a2 = { + foo: '' +}; +var b2 = { + foo: '' +}; s = t; t = s; s = s2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js index 0d535cbb20d..f9933a3e04f 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembers4.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembers4.js @@ -136,8 +136,12 @@ var OnlyDerived; var t2; var a; var b; - var a2 = { foo: new Derived() }; - var b2 = { foo: new Derived2() }; + var a2 = { + foo: new Derived() + }; + var b2 = { + foo: new Derived2() + }; s = t; // error t = s; // error s = s2; // ok @@ -195,8 +199,12 @@ var WithBase; var t2; var a; var b; - var a2 = { foo: new Base() }; - var b2 = { foo: new Derived2() }; + var a2 = { + foo: new Base() + }; + var b2 = { + foo: new Derived2() + }; s = t; // ok t = s; // error s = s2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js index 2a1a08a97ed..dc2e1244ef5 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersNumericNames.js @@ -61,8 +61,12 @@ var s2; var t2; var a; var b; -var a2 = { 1.0: '' }; -var b2 = { 1: '' }; +var a2 = { + 1.0: '' +}; +var b2 = { + 1: '' +}; s = t; t = s; s = s2; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js index 5525b623ecc..ca3ada064f8 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality.js @@ -119,7 +119,9 @@ var TargetHasOptional; (function (TargetHasOptional) { var c; var a; - var b = { opt: new Base() }; + var b = { + opt: new Base() + }; var d; var e; var f; @@ -142,7 +144,9 @@ var SourceHasOptional; (function (SourceHasOptional) { var c; var a; - var b = { opt: new Base() }; + var b = { + opt: new Base() + }; var d; var e; var f; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js index 8859a4c9ab0..cf65e181cb9 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersOptionality2.js @@ -121,7 +121,9 @@ var TargetHasOptional; (function (TargetHasOptional) { var c; var a; - var b = { opt: new Base() }; + var b = { + opt: new Base() + }; var d; var e; var f; @@ -144,7 +146,9 @@ var SourceHasOptional; (function (SourceHasOptional) { var c; var a; - var b = { opt: new Base() }; + var b = { + opt: new Base() + }; var d; var e; var f; diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js index a042897ba57..06f398401ca 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.js @@ -106,8 +106,12 @@ var JustStrings; var t2; var a; var b; - var a2 = { '1.0': '' }; - var b2 = { '1': '' }; + var a2 = { + '1.0': '' + }; + var b2 = { + '1': '' + }; s = t; t = s; s = s2; // ok @@ -146,8 +150,12 @@ var NumbersAndStrings; var t2; var a; var b; - var a2 = { '1.0': '' }; - var b2 = { 1.: '' }; + var a2 = { + '1.0': '' + }; + var b2 = { + 1.: '' + }; s = t; // ok t = s; // ok s = s2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.js b/tests/baselines/reference/assignmentCompatWithOverloads.js index ca3dc0e2294..472ebec2967 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.js +++ b/tests/baselines/reference/assignmentCompatWithOverloads.js @@ -31,10 +31,18 @@ var d: new(x: number) => void; d = C; // Error //// [assignmentCompatWithOverloads.js] -function f1(x) { return null; } -function f2(x) { return null; } -function f3(x) { return null; } -function f4(x) { return undefined; } +function f1(x) { + return null; +} +function f2(x) { + return null; +} +function f3(x) { + return null; +} +function f4(x) { + return undefined; +} var g; g = f1; // OK g = f2; // Error diff --git a/tests/baselines/reference/assignmentCompatability1.js b/tests/baselines/reference/assignmentCompatability1.js index f629d5eba27..61ac5d22058 100644 --- a/tests/baselines/reference/assignmentCompatability1.js +++ b/tests/baselines/reference/assignmentCompatability1.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability10.js b/tests/baselines/reference/assignmentCompatability10.js index bbcc8e879e3..a494e30f6cf 100644 --- a/tests/baselines/reference/assignmentCompatability10.js +++ b/tests/baselines/reference/assignmentCompatability10.js @@ -13,7 +13,9 @@ __test2__.__val__x4 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability11.js b/tests/baselines/reference/assignmentCompatability11.js index 992e38f7726..929a8f1bca3 100644 --- a/tests/baselines/reference/assignmentCompatability11.js +++ b/tests/baselines/reference/assignmentCompatability11.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: 1 }; + __test2__.obj = { + two: 1 + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability12.js b/tests/baselines/reference/assignmentCompatability12.js index 3c802aab6e3..f0ccb00833d 100644 --- a/tests/baselines/reference/assignmentCompatability12.js +++ b/tests/baselines/reference/assignmentCompatability12.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: "1" }; + __test2__.obj = { + one: "1" + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability13.js b/tests/baselines/reference/assignmentCompatability13.js index ef4f24f7100..084ef7ebeb1 100644 --- a/tests/baselines/reference/assignmentCompatability13.js +++ b/tests/baselines/reference/assignmentCompatability13.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: "1" }; + __test2__.obj = { + two: "1" + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability14.js b/tests/baselines/reference/assignmentCompatability14.js index bd4445cb515..4bfe397bc60 100644 --- a/tests/baselines/reference/assignmentCompatability14.js +++ b/tests/baselines/reference/assignmentCompatability14.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: true }; + __test2__.obj = { + one: true + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability15.js b/tests/baselines/reference/assignmentCompatability15.js index 37f1be4bc99..0fffe4bd539 100644 --- a/tests/baselines/reference/assignmentCompatability15.js +++ b/tests/baselines/reference/assignmentCompatability15.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: true }; + __test2__.obj = { + two: true + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability16.js b/tests/baselines/reference/assignmentCompatability16.js index 43c832016b0..6b20f1be30b 100644 --- a/tests/baselines/reference/assignmentCompatability16.js +++ b/tests/baselines/reference/assignmentCompatability16.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: [1] }; + __test2__.obj = { + one: [ + 1 + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability17.js b/tests/baselines/reference/assignmentCompatability17.js index 09ce24b8f5d..b44ce12bb12 100644 --- a/tests/baselines/reference/assignmentCompatability17.js +++ b/tests/baselines/reference/assignmentCompatability17.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: [1] }; + __test2__.obj = { + two: [ + 1 + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability18.js b/tests/baselines/reference/assignmentCompatability18.js index ad93e96303f..1120d349d0b 100644 --- a/tests/baselines/reference/assignmentCompatability18.js +++ b/tests/baselines/reference/assignmentCompatability18.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: [1] }; + __test2__.obj = { + one: [ + 1 + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability19.js b/tests/baselines/reference/assignmentCompatability19.js index f330f94e81c..6bc4c762ee6 100644 --- a/tests/baselines/reference/assignmentCompatability19.js +++ b/tests/baselines/reference/assignmentCompatability19.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: [1] }; + __test2__.obj = { + two: [ + 1 + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability2.js b/tests/baselines/reference/assignmentCompatability2.js index 207942875bf..b280ce83c2c 100644 --- a/tests/baselines/reference/assignmentCompatability2.js +++ b/tests/baselines/reference/assignmentCompatability2.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability20.js b/tests/baselines/reference/assignmentCompatability20.js index 321ec78ee17..aed14360279 100644 --- a/tests/baselines/reference/assignmentCompatability20.js +++ b/tests/baselines/reference/assignmentCompatability20.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: ["1"] }; + __test2__.obj = { + one: [ + "1" + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability21.js b/tests/baselines/reference/assignmentCompatability21.js index 215ab5dc397..6ede7ac66eb 100644 --- a/tests/baselines/reference/assignmentCompatability21.js +++ b/tests/baselines/reference/assignmentCompatability21.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: ["1"] }; + __test2__.obj = { + two: [ + "1" + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability22.js b/tests/baselines/reference/assignmentCompatability22.js index 04cc2a2d0ab..41d60442790 100644 --- a/tests/baselines/reference/assignmentCompatability22.js +++ b/tests/baselines/reference/assignmentCompatability22.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: [true] }; + __test2__.obj = { + one: [ + true + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability23.js b/tests/baselines/reference/assignmentCompatability23.js index 1d032364360..4604fd2ba41 100644 --- a/tests/baselines/reference/assignmentCompatability23.js +++ b/tests/baselines/reference/assignmentCompatability23.js @@ -13,13 +13,19 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { two: [true] }; + __test2__.obj = { + two: [ + true + ] + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability24.js b/tests/baselines/reference/assignmentCompatability24.js index e6961264de8..5fa5e612d05 100644 --- a/tests/baselines/reference/assignmentCompatability24.js +++ b/tests/baselines/reference/assignmentCompatability24.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = function f(a) { return a; }; + __test2__.obj = function f(a) { + return a; + }; ; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability25.js b/tests/baselines/reference/assignmentCompatability25.js index 4f365e9049c..7bc941c3450 100644 --- a/tests/baselines/reference/assignmentCompatability25.js +++ b/tests/baselines/reference/assignmentCompatability25.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability26.js b/tests/baselines/reference/assignmentCompatability26.js index e2ae6b766df..b01d3e19a0e 100644 --- a/tests/baselines/reference/assignmentCompatability26.js +++ b/tests/baselines/reference/assignmentCompatability26.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability27.js b/tests/baselines/reference/assignmentCompatability27.js index be5b06dab7c..5460ed7f6c5 100644 --- a/tests/baselines/reference/assignmentCompatability27.js +++ b/tests/baselines/reference/assignmentCompatability27.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability28.js b/tests/baselines/reference/assignmentCompatability28.js index eef6f0a5ef0..6358375ed3a 100644 --- a/tests/baselines/reference/assignmentCompatability28.js +++ b/tests/baselines/reference/assignmentCompatability28.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability29.js b/tests/baselines/reference/assignmentCompatability29.js index c3410a943ca..251a580015d 100644 --- a/tests/baselines/reference/assignmentCompatability29.js +++ b/tests/baselines/reference/assignmentCompatability29.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability3.js b/tests/baselines/reference/assignmentCompatability3.js index 7120e6ce3e2..e32ae5da7ba 100644 --- a/tests/baselines/reference/assignmentCompatability3.js +++ b/tests/baselines/reference/assignmentCompatability3.js @@ -13,13 +13,17 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - __test2__.obj = { one: 1 }; + __test2__.obj = { + one: 1 + }; __test2__.__val__obj = __test2__.obj; })(__test2__ || (__test2__ = {})); __test2__.__val__obj = __test1__.__val__obj4; diff --git a/tests/baselines/reference/assignmentCompatability30.js b/tests/baselines/reference/assignmentCompatability30.js index 261c86ad584..3d519971fa8 100644 --- a/tests/baselines/reference/assignmentCompatability30.js +++ b/tests/baselines/reference/assignmentCompatability30.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability31.js b/tests/baselines/reference/assignmentCompatability31.js index 152b588b72c..ad0954e2dc8 100644 --- a/tests/baselines/reference/assignmentCompatability31.js +++ b/tests/baselines/reference/assignmentCompatability31.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability32.js b/tests/baselines/reference/assignmentCompatability32.js index b9ddacff90c..e321f02c649 100644 --- a/tests/baselines/reference/assignmentCompatability32.js +++ b/tests/baselines/reference/assignmentCompatability32.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability33.js b/tests/baselines/reference/assignmentCompatability33.js index 80dfcfc4f7a..44d42b4bd49 100644 --- a/tests/baselines/reference/assignmentCompatability33.js +++ b/tests/baselines/reference/assignmentCompatability33.js @@ -13,7 +13,9 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability34.js b/tests/baselines/reference/assignmentCompatability34.js index ab324a10396..67167192653 100644 --- a/tests/baselines/reference/assignmentCompatability34.js +++ b/tests/baselines/reference/assignmentCompatability34.js @@ -13,7 +13,9 @@ __test2__.__val__obj = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability35.js b/tests/baselines/reference/assignmentCompatability35.js index 1b79a83146b..f01c63390ed 100644 --- a/tests/baselines/reference/assignmentCompatability35.js +++ b/tests/baselines/reference/assignmentCompatability35.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability36.js b/tests/baselines/reference/assignmentCompatability36.js index 62332f741d4..7c939ceb282 100644 --- a/tests/baselines/reference/assignmentCompatability36.js +++ b/tests/baselines/reference/assignmentCompatability36.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability37.js b/tests/baselines/reference/assignmentCompatability37.js index 8625cae42e5..5741b181151 100644 --- a/tests/baselines/reference/assignmentCompatability37.js +++ b/tests/baselines/reference/assignmentCompatability37.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability38.js b/tests/baselines/reference/assignmentCompatability38.js index 22096b68f25..81a7692f62f 100644 --- a/tests/baselines/reference/assignmentCompatability38.js +++ b/tests/baselines/reference/assignmentCompatability38.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability39.js b/tests/baselines/reference/assignmentCompatability39.js index 70e8a692290..fe2f499270a 100644 --- a/tests/baselines/reference/assignmentCompatability39.js +++ b/tests/baselines/reference/assignmentCompatability39.js @@ -13,7 +13,9 @@ __test2__.__val__x2 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability4.js b/tests/baselines/reference/assignmentCompatability4.js index 2f7d33b8d55..853164790ce 100644 --- a/tests/baselines/reference/assignmentCompatability4.js +++ b/tests/baselines/reference/assignmentCompatability4.js @@ -13,7 +13,9 @@ __test2__.__val__aa = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability40.js b/tests/baselines/reference/assignmentCompatability40.js index 801ddfe7596..26923029392 100644 --- a/tests/baselines/reference/assignmentCompatability40.js +++ b/tests/baselines/reference/assignmentCompatability40.js @@ -13,7 +13,9 @@ __test2__.__val__x5 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability41.js b/tests/baselines/reference/assignmentCompatability41.js index 2ebd35a6caa..101eee5ae3c 100644 --- a/tests/baselines/reference/assignmentCompatability41.js +++ b/tests/baselines/reference/assignmentCompatability41.js @@ -13,7 +13,9 @@ __test2__.__val__x6 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability42.js b/tests/baselines/reference/assignmentCompatability42.js index 39dab170d35..d819f748af4 100644 --- a/tests/baselines/reference/assignmentCompatability42.js +++ b/tests/baselines/reference/assignmentCompatability42.js @@ -13,7 +13,9 @@ __test2__.__val__x7 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability43.js b/tests/baselines/reference/assignmentCompatability43.js index 0ff9bdb4819..5c13de6fa53 100644 --- a/tests/baselines/reference/assignmentCompatability43.js +++ b/tests/baselines/reference/assignmentCompatability43.js @@ -13,14 +13,19 @@ __test2__.__val__obj2 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { ; - var obj2 = { one: 1, two: "a" }; + var obj2 = { + one: 1, + two: "a" + }; ; __test2__.__val__obj2 = obj2; })(__test2__ || (__test2__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability5.js b/tests/baselines/reference/assignmentCompatability5.js index ef38b738ad3..b94a00de732 100644 --- a/tests/baselines/reference/assignmentCompatability5.js +++ b/tests/baselines/reference/assignmentCompatability5.js @@ -13,14 +13,18 @@ __test2__.__val__obj1 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { ; - var obj1 = { one: 1 }; + var obj1 = { + one: 1 + }; ; __test2__.__val__obj1 = obj1; })(__test2__ || (__test2__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability6.js b/tests/baselines/reference/assignmentCompatability6.js index 7b1e2bb65d6..cd87bd10641 100644 --- a/tests/baselines/reference/assignmentCompatability6.js +++ b/tests/baselines/reference/assignmentCompatability6.js @@ -13,7 +13,9 @@ __test2__.__val__obj3 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability7.js b/tests/baselines/reference/assignmentCompatability7.js index c6bf8e53bc1..a668bc34906 100644 --- a/tests/baselines/reference/assignmentCompatability7.js +++ b/tests/baselines/reference/assignmentCompatability7.js @@ -13,14 +13,18 @@ __test2__.__val__obj4 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test2__.__val__obj4 = obj4; })(__test2__ || (__test2__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability8.js b/tests/baselines/reference/assignmentCompatability8.js index 65e4240aac5..e022ddf7bdd 100644 --- a/tests/baselines/reference/assignmentCompatability8.js +++ b/tests/baselines/reference/assignmentCompatability8.js @@ -13,7 +13,9 @@ __test2__.__val__x1 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability9.js b/tests/baselines/reference/assignmentCompatability9.js index 98932380b3e..cbc34de158b 100644 --- a/tests/baselines/reference/assignmentCompatability9.js +++ b/tests/baselines/reference/assignmentCompatability9.js @@ -13,7 +13,9 @@ __test2__.__val__x3 = __test1__.__val__obj4 var __test1__; (function (__test1__) { ; - var obj4 = { one: 1 }; + var obj4 = { + one: 1 + }; ; __test1__.__val__obj4 = obj4; })(__test1__ || (__test1__ = {})); diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js index 760631ffbb5..7346f601dac 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js @@ -35,18 +35,25 @@ fn(a => { }); var x; // Should fail x = ''; -x = ['']; +x = [ + '' +]; x = 4; x = {}; // Should work -function f() { } +function f() { +} ; x = f; -function fn(c) { } +function fn(c) { +} // Should Fail fn(''); -fn(['']); +fn([ + '' +]); fn(4); fn({}); // Should work -fn(function (a) { }); +fn(function (a) { +}); diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js index 2e61521eefb..4e5ed88699c 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js @@ -35,18 +35,25 @@ fn(a => { }); var x; // Should fail x = ''; -x = ['']; +x = [ + '' +]; x = 4; x = {}; // Should work -function f() { } +function f() { +} ; x = f; -function fn(c) { } +function fn(c) { +} // Should Fail fn(''); -fn(['']); +fn([ + '' +]); fn(4); fn({}); // Should work -fn(function (a) { }); +fn(function (a) { +}); diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index 4b17f855171..e6975e70146 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -84,11 +84,17 @@ var C = (function () { function C() { this = value; } - C.prototype.foo = function () { this = value; }; - C.sfoo = function () { this = value; }; + C.prototype.foo = function () { + this = value; + }; + C.sfoo = function () { + this = value; + }; return C; })(); -function foo() { this = value; } +function foo() { + this = value; +} this = value; // identifiers: module, class, enum, function var M; @@ -123,14 +129,20 @@ var Derived = (function (_super) { _super.call(this); _super.prototype. = value; } - Derived.prototype.foo = function () { _super.prototype. = value; }; - Derived.sfoo = function () { _super. = value; }; + Derived.prototype.foo = function () { + _super.prototype. = value; + }; + Derived.sfoo = function () { + _super. = value; + }; return Derived; })(C); // function expression -function bar() { } +function bar() { +} value; -(function () { }); +(function () { +}); value; // function calls foo() = value; @@ -147,5 +159,6 @@ foo() = value; (/d+/) = value; ({}) = value; ([]) = value; -(function baz() { }) = value; +(function baz() { +}) = value; (foo()) = value; diff --git a/tests/baselines/reference/assignmentStricterConstraints.js b/tests/baselines/reference/assignmentStricterConstraints.js index a7f554ade7d..f8f4ce6d1b6 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.js +++ b/tests/baselines/reference/assignmentStricterConstraints.js @@ -13,6 +13,7 @@ g(1, "") var f = function (x, y) { x = y; }; -var g = function (x, y) { }; +var g = function (x, y) { +}; g = f; g(1, ""); diff --git a/tests/baselines/reference/assignmentToFunction.js b/tests/baselines/reference/assignmentToFunction.js index 7462fdfcf3f..275107e05b0 100644 --- a/tests/baselines/reference/assignmentToFunction.js +++ b/tests/baselines/reference/assignmentToFunction.js @@ -11,8 +11,11 @@ module foo { } //// [assignmentToFunction.js] -function fn() { } -fn = function () { return 3; }; +function fn() { +} +fn = function () { + return 3; +}; var foo; (function (foo) { function xyz() { diff --git a/tests/baselines/reference/assignmentToObject.js b/tests/baselines/reference/assignmentToObject.js index d8134080c6a..666350b50ee 100644 --- a/tests/baselines/reference/assignmentToObject.js +++ b/tests/baselines/reference/assignmentToObject.js @@ -5,6 +5,8 @@ var c: Object = a; // should be error //// [assignmentToObject.js] -var a = { toString: 5 }; +var a = { + toString: 5 +}; var b = a; // ok var c = a; // should be error diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.js b/tests/baselines/reference/assignmentToObjectAndFunction.js index a3c4785b18b..bd09a7a8e16 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.js +++ b/tests/baselines/reference/assignmentToObjectAndFunction.js @@ -30,27 +30,33 @@ module bad { var badFundule: Function = bad; // error //// [assignmentToObjectAndFunction.js] -var errObj = { toString: 0 }; // Error, incompatible toString +var errObj = { + toString: 0 +}; // Error, incompatible toString var goodObj = { toString: function (x) { return ""; } }; // Ok, because toString is a subtype of Object's toString var errFun = {}; // Error for no call signature -function foo() { } +function foo() { +} var foo; (function (foo) { foo.boom = 0; })(foo || (foo = {})); var goodFundule = foo; // ok -function bar() { } +function bar() { +} var bar; (function (bar) { - function apply(thisArg, argArray) { } + function apply(thisArg, argArray) { + } bar.apply = apply; })(bar || (bar = {})); var goodFundule2 = bar; // ok -function bad() { } +function bad() { +} var bad; (function (bad) { bad.apply = 0; diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js index 9526cb08bef..584934ea774 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js @@ -87,25 +87,48 @@ M.y = 3; // OK M.y = ''; // Error (M).y = ''; // Error (M.y) = ''; // Error -M = { y: 3 }; // Error -(M) = { y: 3 }; // Error +M = { + y: 3 +}; // Error +(M) = { + y: 3 +}; // Error var M2; (function (M2) { var M3; (function (M3) { M3.x; })(M3 = M2.M3 || (M2.M3 = {})); - M3 = { x: 3 }; // Error + M3 = { + x: 3 + }; // Error })(M2 || (M2 = {})); -M2.M3 = { x: 3 }; // OK -(M2).M3 = { x: 3 }; // OK -(M2.M3) = { x: 3 }; // OK -M2.M3 = { x: '' }; // Error -(M2).M3 = { x: '' }; // Error -(M2.M3) = { x: '' }; // Error -function fn() { } -fn = function () { return 3; }; // Bug 823548: Should be error (fn is not a reference) -(fn) = function () { return 3; }; // Should be error +M2.M3 = { + x: 3 +}; // OK +(M2).M3 = { + x: 3 +}; // OK +(M2.M3) = { + x: 3 +}; // OK +M2.M3 = { + x: '' +}; // Error +(M2).M3 = { + x: '' +}; // Error +(M2.M3) = { + x: '' +}; // Error +function fn() { +} +fn = function () { + return 3; +}; // Bug 823548: Should be error (fn is not a reference) +(fn) = function () { + return 3; +}; // Should be error function fn2(x, y) { x = 3; (x) = 3; // OK diff --git a/tests/baselines/reference/assignmentToReferenceTypes.js b/tests/baselines/reference/assignmentToReferenceTypes.js index 1aec3c2051d..214e10b9c6c 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.js +++ b/tests/baselines/reference/assignmentToReferenceTypes.js @@ -36,7 +36,8 @@ var E; (function (E) { })(E || (E = {})); E = null; -function f() { } +function f() { +} f = null; var x = 1; x = null; diff --git a/tests/baselines/reference/assignments.js b/tests/baselines/reference/assignments.js index 363d2f2a017..f9bb008ccac 100644 --- a/tests/baselines/reference/assignments.js +++ b/tests/baselines/reference/assignments.js @@ -53,7 +53,8 @@ var E; })(E || (E = {})); E = null; // Error 0 /* A */ = null; // OK per spec, Error per implementation (509581) -function fn() { } +function fn() { +} fn = null; // Should be error var v; v = null; // OK diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js index 32fed237a2e..88996de1553 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js @@ -23,6 +23,7 @@ var v2: { //// [augmentedTypeAssignmentCompatIndexSignature.js] var o = {}; -var f = function () { }; +var f = function () { +}; var v1 = o; // Should be allowed var v2 = f; // Should be allowed diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js index 8d2c94899dc..a1b6bf6805c 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js @@ -15,4 +15,5 @@ var b = (() => { })[0]; // Should be Bar //// [augmentedTypeBracketAccessIndexSignature.js] var a = {}[0]; // Should be Foo -var b = (function () { })[0]; // Should be Bar +var b = (function () { +})[0]; // Should be Bar diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js index 6ec653c69b5..5bc184df667 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js @@ -15,7 +15,8 @@ var r4 = f['data']; // Should be number //// [augmentedTypeBracketNamedPropertyAccess.js] var o = {}; -var f = function () { }; +var f = function () { +}; var r1 = o['data']; // Should be number var r2 = o['functionData']; // Should be any (no property found) var r3 = f['functionData']; // Should be string diff --git a/tests/baselines/reference/augmentedTypesClass.js b/tests/baselines/reference/augmentedTypesClass.js index 30b75483d80..5d0d8ab75d6 100644 --- a/tests/baselines/reference/augmentedTypesClass.js +++ b/tests/baselines/reference/augmentedTypesClass.js @@ -12,7 +12,8 @@ enum c4 { One } // error var c1 = (function () { function c1() { } - c1.prototype.foo = function () { }; + c1.prototype.foo = function () { + }; return c1; })(); var c1 = 1; // error @@ -20,7 +21,8 @@ var c1 = 1; // error var c4 = (function () { function c4() { } - c4.prototype.foo = function () { }; + c4.prototype.foo = function () { + }; return c4; })(); var c4; diff --git a/tests/baselines/reference/augmentedTypesClass2a.js b/tests/baselines/reference/augmentedTypesClass2a.js index b2c6fa1e373..fe31f0964c2 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.js +++ b/tests/baselines/reference/augmentedTypesClass2a.js @@ -9,8 +9,11 @@ var c2 = () => { } var c2 = (function () { function c2() { } - c2.prototype.foo = function () { }; + c2.prototype.foo = function () { + }; return c2; })(); // error -function c2() { } // error -var c2 = function () { }; +function c2() { +} // error +var c2 = function () { +}; diff --git a/tests/baselines/reference/augmentedTypesClass3.js b/tests/baselines/reference/augmentedTypesClass3.js index 11d3f0a0d9f..b42d9dda356 100644 --- a/tests/baselines/reference/augmentedTypesClass3.js +++ b/tests/baselines/reference/augmentedTypesClass3.js @@ -18,13 +18,15 @@ class c5c { public foo() { } } var c5 = (function () { function c5() { } - c5.prototype.foo = function () { }; + c5.prototype.foo = function () { + }; return c5; })(); var c5a = (function () { function c5a() { } - c5a.prototype.foo = function () { }; + c5a.prototype.foo = function () { + }; return c5a; })(); var c5a; @@ -34,7 +36,8 @@ var c5a; var c5b = (function () { function c5b() { } - c5b.prototype.foo = function () { }; + c5b.prototype.foo = function () { + }; return c5b; })(); var c5b; @@ -45,7 +48,8 @@ var c5b; var c5c = (function () { function c5c() { } - c5c.prototype.foo = function () { }; + c5c.prototype.foo = function () { + }; return c5c; })(); //import c5c = require(''); diff --git a/tests/baselines/reference/augmentedTypesClass4.js b/tests/baselines/reference/augmentedTypesClass4.js index f178567d843..71fc61d6659 100644 --- a/tests/baselines/reference/augmentedTypesClass4.js +++ b/tests/baselines/reference/augmentedTypesClass4.js @@ -9,12 +9,14 @@ class c3 { public bar() { } } // error var c3 = (function () { function c3() { } - c3.prototype.foo = function () { }; + c3.prototype.foo = function () { + }; return c3; })(); // error var c3 = (function () { function c3() { } - c3.prototype.bar = function () { }; + c3.prototype.bar = function () { + }; return c3; })(); // error diff --git a/tests/baselines/reference/augmentedTypesEnum.js b/tests/baselines/reference/augmentedTypesEnum.js index cb1ec3e844f..484b0addd58 100644 --- a/tests/baselines/reference/augmentedTypesEnum.js +++ b/tests/baselines/reference/augmentedTypesEnum.js @@ -47,12 +47,14 @@ var e2; (function (e2) { e2[e2["One"] = 0] = "One"; })(e2 || (e2 = {})); // error -function e2() { } // error +function e2() { +} // error var e3; (function (e3) { e3[e3["One"] = 0] = "One"; })(e3 || (e3 = {})); // error -var e3 = function () { }; // error +var e3 = function () { +}; // error // enum then class var e4; (function (e4) { @@ -61,7 +63,8 @@ var e4; var e4 = (function () { function e4() { } - e4.prototype.foo = function () { }; + e4.prototype.foo = function () { + }; return e4; })(); // error // enum then enum diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.js b/tests/baselines/reference/augmentedTypesExternalModule1.js index 104559396cc..69cc810668c 100644 --- a/tests/baselines/reference/augmentedTypesExternalModule1.js +++ b/tests/baselines/reference/augmentedTypesExternalModule1.js @@ -9,7 +9,8 @@ define(["require", "exports"], function (require, exports) { var c5 = (function () { function c5() { } - c5.prototype.foo = function () { }; + c5.prototype.foo = function () { + }; return c5; })(); }); diff --git a/tests/baselines/reference/augmentedTypesFunction.js b/tests/baselines/reference/augmentedTypesFunction.js index 1cd1423b7c4..34567c77e8c 100644 --- a/tests/baselines/reference/augmentedTypesFunction.js +++ b/tests/baselines/reference/augmentedTypesFunction.js @@ -40,46 +40,59 @@ module y5c { export interface I { foo(): void } } // should be an error //// [augmentedTypesFunction.js] // function then var -function y1() { } // error +function y1() { +} // error var y1 = 1; // error // function then function -function y2() { } // error -function y2() { } // error -function y2a() { } // error -var y2a = function () { }; // error +function y2() { +} // error +function y2() { +} // error +function y2a() { +} // error +var y2a = function () { +}; // error // function then class -function y3() { } // error +function y3() { +} // error var y3 = (function () { function y3() { } return y3; })(); // error -function y3a() { } // error +function y3a() { +} // error var y3a = (function () { function y3a() { } - y3a.prototype.foo = function () { }; + y3a.prototype.foo = function () { + }; return y3a; })(); // error // function then enum -function y4() { } // error +function y4() { +} // error var y4; (function (y4) { y4[y4["One"] = 0] = "One"; })(y4 || (y4 = {})); // error // function then internal module -function y5() { } -function y5a() { } +function y5() { +} +function y5a() { +} var y5a; (function (y5a) { var y = 2; })(y5a || (y5a = {})); // should be an error -function y5b() { } +function y5b() { +} var y5b; (function (y5b) { y5b.y = 3; })(y5b || (y5b = {})); // should be an error -function y5c() { } +function y5c() { +} // function then import, messes with other errors //function y6() { } //import y6 = require(''); diff --git a/tests/baselines/reference/augmentedTypesModules.js b/tests/baselines/reference/augmentedTypesModules.js index 558ea6609f5..3b7544996a1 100644 --- a/tests/baselines/reference/augmentedTypesModules.js +++ b/tests/baselines/reference/augmentedTypesModules.js @@ -115,43 +115,51 @@ var m1d; var I = (function () { function I() { } - I.prototype.foo = function () { }; + I.prototype.foo = function () { + }; return I; })(); m1d.I = I; })(m1d || (m1d = {})); var m1d = 1; // error -function m2() { } +function m2() { +} ; // ok since the module is not instantiated var m2a; (function (m2a) { var y = 2; })(m2a || (m2a = {})); -function m2a() { } +function m2a() { +} ; // error since the module is instantiated var m2b; (function (m2b) { m2b.y = 2; })(m2b || (m2b = {})); -function m2b() { } +function m2b() { +} ; // error since the module is instantiated // should be errors to have function first -function m2c() { } +function m2c() { +} ; var m2c; (function (m2c) { m2c.y = 2; })(m2c || (m2c = {})); -function m2f() { } +function m2f() { +} ; -function m2g() { } +function m2g() { +} ; var m2g; (function (m2g) { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); m2g.C = C; @@ -168,13 +176,15 @@ var m3a; var m3a = (function () { function m3a() { } - m3a.prototype.foo = function () { }; + m3a.prototype.foo = function () { + }; return m3a; })(); // error, class isn't ambient or declared before the module var m3b = (function () { function m3b() { } - m3b.prototype.foo = function () { }; + m3b.prototype.foo = function () { + }; return m3b; })(); var m3b; @@ -184,7 +194,8 @@ var m3b; var m3c = (function () { function m3c() { } - m3c.prototype.foo = function () { }; + m3c.prototype.foo = function () { + }; return m3c; })(); var m3c; @@ -204,7 +215,8 @@ var m3g; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); m3g.C = C; @@ -237,7 +249,8 @@ var m4d; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); })(m4d || (m4d = {})); diff --git a/tests/baselines/reference/augmentedTypesModules2.js b/tests/baselines/reference/augmentedTypesModules2.js index 5cc805a848f..70fd31f03e0 100644 --- a/tests/baselines/reference/augmentedTypesModules2.js +++ b/tests/baselines/reference/augmentedTypesModules2.js @@ -29,21 +29,25 @@ module m2g { export class C { foo() { } } } //// [augmentedTypesModules2.js] -function m2() { } +function m2() { +} ; // ok since the module is not instantiated var m2a; (function (m2a) { var y = 2; })(m2a || (m2a = {})); -function m2a() { } +function m2a() { +} ; // error since the module is instantiated var m2b; (function (m2b) { m2b.y = 2; })(m2b || (m2b = {})); -function m2b() { } +function m2b() { +} ; // error since the module is instantiated -function m2c() { } +function m2c() { +} ; var m2c; (function (m2c) { @@ -53,18 +57,22 @@ var m2cc; (function (m2cc) { m2cc.y = 2; })(m2cc || (m2cc = {})); -function m2cc() { } +function m2cc() { +} ; // error to have module first -function m2f() { } +function m2f() { +} ; -function m2g() { } +function m2g() { +} ; var m2g; (function (m2g) { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); m2g.C = C; diff --git a/tests/baselines/reference/augmentedTypesModules3.js b/tests/baselines/reference/augmentedTypesModules3.js index fb1c7ef6e70..7f5c390ea3a 100644 --- a/tests/baselines/reference/augmentedTypesModules3.js +++ b/tests/baselines/reference/augmentedTypesModules3.js @@ -19,6 +19,7 @@ var m3a; var m3a = (function () { function m3a() { } - m3a.prototype.foo = function () { }; + m3a.prototype.foo = function () { + }; return m3a; })(); // error, class isn't ambient or declared before the module diff --git a/tests/baselines/reference/augmentedTypesModules3b.js b/tests/baselines/reference/augmentedTypesModules3b.js index 080a5e72ada..2d250ab2822 100644 --- a/tests/baselines/reference/augmentedTypesModules3b.js +++ b/tests/baselines/reference/augmentedTypesModules3b.js @@ -22,7 +22,8 @@ module m3g { export class C { foo() { } } } var m3b = (function () { function m3b() { } - m3b.prototype.foo = function () { }; + m3b.prototype.foo = function () { + }; return m3b; })(); var m3b; @@ -32,7 +33,8 @@ var m3b; var m3c = (function () { function m3c() { } - m3c.prototype.foo = function () { }; + m3c.prototype.foo = function () { + }; return m3c; })(); var m3c; @@ -52,7 +54,8 @@ var m3g; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); m3g.C = C; diff --git a/tests/baselines/reference/augmentedTypesModules4.js b/tests/baselines/reference/augmentedTypesModules4.js index 82f08851efd..f8407e2e36f 100644 --- a/tests/baselines/reference/augmentedTypesModules4.js +++ b/tests/baselines/reference/augmentedTypesModules4.js @@ -51,7 +51,8 @@ var m4d; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); })(m4d || (m4d = {})); diff --git a/tests/baselines/reference/augmentedTypesVar.js b/tests/baselines/reference/augmentedTypesVar.js index b4e412acc05..f4404cecb3d 100644 --- a/tests/baselines/reference/augmentedTypesVar.js +++ b/tests/baselines/reference/augmentedTypesVar.js @@ -42,9 +42,11 @@ var x1 = 1; var x1 = 2; // var then function var x2 = 1; // error -function x2() { } // error +function x2() { +} // error var x3 = 1; -var x3 = function () { }; // error +var x3 = function () { +}; // error // var then class var x4 = 1; // error var x4 = (function () { @@ -56,7 +58,8 @@ var x4a = 1; // error var x4a = (function () { function x4a() { } - x4a.prototype.foo = function () { }; + x4a.prototype.foo = function () { + }; return x4a; })(); // error // var then enum diff --git a/tests/baselines/reference/autoLift2.js b/tests/baselines/reference/autoLift2.js index cf840277d70..45790dc2f6e 100644 --- a/tests/baselines/reference/autoLift2.js +++ b/tests/baselines/reference/autoLift2.js @@ -43,8 +43,18 @@ var A = (function () { var _this = this; this.foo = "foo"; this.bar = "bar"; - [1, 2].forEach(function (p) { return _this.foo; }); - [1, 2].forEach(function (p) { return _this.bar; }); + [ + 1, + 2 + ].forEach(function (p) { + return _this.foo; + }); + [ + 1, + 2 + ].forEach(function (p) { + return _this.bar; + }); }; return A; })(); diff --git a/tests/baselines/reference/autolift3.js b/tests/baselines/reference/autolift3.js index e04501daf46..cc3bcaaae97 100644 --- a/tests/baselines/reference/autolift3.js +++ b/tests/baselines/reference/autolift3.js @@ -33,7 +33,8 @@ b.foo(); //// [autolift3.js] var B = (function () { function B() { - function foo() { } + function foo() { + } foo(); var a = 0; var inner = (function () { diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 49bc535dbfe..69fe778c047 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -63,9 +63,15 @@ var r = true ? 1 : 2; var r3 = true ? 1 : {}; var r4 = true ? a : b; // typeof a var r5 = true ? b : a; // typeof b -var r6 = true ? function (x) { } : function (x) { }; // returns number => void -var r7 = true ? function (x) { } : function (x) { }; -var r8 = true ? function (x) { } : function (x) { }; // returns Object => void +var r6 = true ? function (x) { +} : function (x) { +}; // returns number => void +var r7 = true ? function (x) { +} : function (x) { +}; +var r8 = true ? function (x) { +} : function (x) { +}; // returns Object => void var r10 = true ? derived : derived2; // no error since we use the contextual type in BCT var r11 = true ? base : derived2; function foo5(t, u) { diff --git a/tests/baselines/reference/bestCommonTypeOfTuple.js b/tests/baselines/reference/bestCommonTypeOfTuple.js index f78f8990db0..704cae200a4 100644 --- a/tests/baselines/reference/bestCommonTypeOfTuple.js +++ b/tests/baselines/reference/bestCommonTypeOfTuple.js @@ -26,9 +26,15 @@ var e3 = t3[2]; // any var e4 = t4[3]; // number //// [bestCommonTypeOfTuple.js] -function f1(x) { return "foo"; } -function f2(x) { return 10; } -function f3(x) { return true; } +function f1(x) { + return "foo"; +} +function f2(x) { + return 10; +} +function f3(x) { + return true; +} var E1; (function (E1) { E1[E1["one"] = 0] = "one"; @@ -42,10 +48,23 @@ var t2; var t3; var t4; // no error -t1 = [f1, f2]; -t2 = [0 /* one */, 0 /* two */]; -t3 = [5, undefined]; -t4 = [0 /* one */, 0 /* two */, 20]; +t1 = [ + f1, + f2 +]; +t2 = [ + 0 /* one */, + 0 /* two */ +]; +t3 = [ + 5, + undefined +]; +t4 = [ + 0 /* one */, + 0 /* two */, + 20 +]; var e1 = t1[2]; // {} var e2 = t2[2]; // {} var e3 = t3[2]; // any diff --git a/tests/baselines/reference/bestCommonTypeReturnStatement.js b/tests/baselines/reference/bestCommonTypeReturnStatement.js index f4ab98ed1c6..232ffc07c54 100644 --- a/tests/baselines/reference/bestCommonTypeReturnStatement.js +++ b/tests/baselines/reference/bestCommonTypeReturnStatement.js @@ -18,5 +18,9 @@ function f() { return b(); return d(); } -function b() { return null; } -function d() { return null; } +function b() { + return null; +} +function d() { + return null; +} diff --git a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js index c45ae88458f..afe18e3f282 100644 --- a/tests/baselines/reference/bestCommonTypeWithContextualTyping.js +++ b/tests/baselines/reference/bestCommonTypeWithContextualTyping.js @@ -25,7 +25,11 @@ var e; // All of these should pass. Neither type is a supertype of the other, but the RHS should // always use Ellement in these examples (not Contextual). Because Ellement is assignable // to Contextual, no errors. -var arr = [e]; // Ellement[] -var obj = { s: e }; // { s: Ellement; [s: string]: Ellement } +var arr = [ + e +]; // Ellement[] +var obj = { + s: e +}; // { s: Ellement; [s: string]: Ellement } var conditional = null ? e : e; // Ellement var contextualOr = e || e; // Ellement diff --git a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js index 25622c3d4f3..6a8741097aa 100644 --- a/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js +++ b/tests/baselines/reference/bestCommonTypeWithOptionalProperties.js @@ -20,9 +20,33 @@ var x; var y; var z; // All these arrays should be X[] -var b1 = [x, y, z]; -var b2 = [x, z, y]; -var b3 = [y, x, z]; -var b4 = [y, z, x]; -var b5 = [z, x, y]; -var b6 = [z, y, x]; +var b1 = [ + x, + y, + z +]; +var b2 = [ + x, + z, + y +]; +var b3 = [ + y, + x, + z +]; +var b4 = [ + y, + z, + x +]; +var b5 = [ + z, + x, + y +]; +var b6 = [ + z, + y, + x +]; diff --git a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js index 1b64091c048..b730569bd6a 100644 --- a/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js +++ b/tests/baselines/reference/bitwiseNotOperatorInvalidOperations.js @@ -18,7 +18,11 @@ var q; var a = q; ~; //expect error // multiple operands after ~ -var mul = ~[1, 2, "abc"]; +var mul = ~[ + 1, + 2, + "abc" +]; ""; //expect error // miss an operand var b = ~; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js index 3ee3f28ad9e..a73d851668e 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js @@ -66,9 +66,16 @@ var ResultIsNumber20 = ~~~(ANY + ANY1); // ~ operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js index fb573a7523f..1b2c93307d8 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithBooleanType.js @@ -41,11 +41,15 @@ var ResultIsNumber8 = ~~BOOLEAN; //// [bitwiseNotOperatorWithBooleanType.js] // ~ operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -57,7 +61,10 @@ var objA = new A(); var ResultIsNumber1 = ~BOOLEAN; // boolean type literal var ResultIsNumber2 = ~true; -var ResultIsNumber3 = ~{ x: true, y: false }; +var ResultIsNumber3 = ~{ + x: true, + y: false +}; // boolean type expressions var ResultIsNumber4 = ~objA.a; var ResultIsNumber5 = ~M.n; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js index ac439f02903..ac274bf8c18 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithNumberType.js @@ -47,12 +47,19 @@ var ResultIsNumber13 = ~~~(NUMBER + NUMBER); //// [bitwiseNotOperatorWithNumberType.js] // ~ operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -65,8 +72,16 @@ var ResultIsNumber1 = ~NUMBER; var ResultIsNumber2 = ~NUMBER1; // number type literal var ResultIsNumber3 = ~1; -var ResultIsNumber4 = ~{ x: 1, y: 2 }; -var ResultIsNumber5 = ~{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = ~{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = ~{ + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsNumber6 = ~objA.a; var ResultIsNumber7 = ~M.n; diff --git a/tests/baselines/reference/bitwiseNotOperatorWithStringType.js b/tests/baselines/reference/bitwiseNotOperatorWithStringType.js index a553712e16b..f13cf39bd6f 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithStringType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithStringType.js @@ -46,12 +46,19 @@ var ResultIsNumber14 = ~~~(STRING + STRING); //// [bitwiseNotOperatorWithStringType.js] // ~ operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -64,8 +71,16 @@ var ResultIsNumber1 = ~STRING; var ResultIsNumber2 = ~STRING1; // string type literal var ResultIsNumber3 = ~""; -var ResultIsNumber4 = ~{ x: "", y: "" }; -var ResultIsNumber5 = ~{ x: "", y: function (s) { return s; } }; +var ResultIsNumber4 = ~{ + x: "", + y: "" +}; +var ResultIsNumber5 = ~{ + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsNumber6 = ~objA.a; var ResultIsNumber7 = ~M.n; diff --git a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js index f1028956e16..59bfabd21d6 100644 --- a/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js +++ b/tests/baselines/reference/callGenericFunctionWithIncorrectNumberOfTypeArguments.js @@ -47,10 +47,14 @@ var r7b = i2.f(1, ''); //// [callGenericFunctionWithIncorrectNumberOfTypeArguments.js] // type parameter lists must exactly match type argument lists // all of these invocations are errors -function f(x, y) { return null; } +function f(x, y) { + return null; +} var r1 = f(1, ''); var r1b = f(1, ''); -var f2 = function (x, y) { return null; }; +var f2 = function (x, y) { + return null; +}; var r2 = f2(1, ''); var r2b = f2(1, ''); var f3; diff --git a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js index 26b9d33a55d..04edc93f5d9 100644 --- a/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js +++ b/tests/baselines/reference/callGenericFunctionWithZeroTypeArguments.js @@ -38,9 +38,13 @@ var r7 = i2.f(1); //// [callGenericFunctionWithZeroTypeArguments.js] // valid invocations of generic functions with no explicit type arguments provided -function f(x) { return null; } +function f(x) { + return null; +} var r = f(1); -var f2 = function (x) { return null; }; +var f2 = function (x) { + return null; +}; var r2 = f2(1); var f3; var r3 = f3(1); diff --git a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js index 7b0355533e3..306b4c70362 100644 --- a/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js +++ b/tests/baselines/reference/callNonGenericFunctionWithTypeArguments.js @@ -46,9 +46,13 @@ var r8 = a2(); //// [callNonGenericFunctionWithTypeArguments.js] // it is always illegal to provide type arguments to a non-generic function // all invocations here are illegal -function f(x) { return null; } +function f(x) { + return null; +} var r = f(1); -var f2 = function (x) { return null; }; +var f2 = function (x) { + return null; +}; var r2 = f2(1); var f3; var r3 = f3(1); diff --git a/tests/baselines/reference/callOverloads1.js b/tests/baselines/reference/callOverloads1.js index b1148c12420..86cb951f853 100644 --- a/tests/baselines/reference/callOverloads1.js +++ b/tests/baselines/reference/callOverloads1.js @@ -22,10 +22,13 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(); -function F1(a) { return a; } +function F1(a) { + return a; +} var f1 = new Foo("hey"); f1.bar1(); Foo(); diff --git a/tests/baselines/reference/callOverloads2.js b/tests/baselines/reference/callOverloads2.js index b336911eeb0..e3cbceb177a 100644 --- a/tests/baselines/reference/callOverloads2.js +++ b/tests/baselines/reference/callOverloads2.js @@ -30,11 +30,16 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(); -function F1(s) { return s; } // error -function F1(a) { return a; } // error +function F1(s) { + return s; +} // error +function F1(a) { + return a; +} // error var f1 = new Foo("hey"); f1.bar1(); Foo(); diff --git a/tests/baselines/reference/callOverloads3.js b/tests/baselines/reference/callOverloads3.js index 3b615438ccd..85c16fe85a6 100644 --- a/tests/baselines/reference/callOverloads3.js +++ b/tests/baselines/reference/callOverloads3.js @@ -23,7 +23,8 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(); //class Foo(s: String); diff --git a/tests/baselines/reference/callOverloads4.js b/tests/baselines/reference/callOverloads4.js index 529b63ad3b8..6aab555b721 100644 --- a/tests/baselines/reference/callOverloads4.js +++ b/tests/baselines/reference/callOverloads4.js @@ -23,7 +23,8 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(); var f1 = new Foo("hey"); diff --git a/tests/baselines/reference/callOverloads5.js b/tests/baselines/reference/callOverloads5.js index dc508b3b8ed..2220568e4c2 100644 --- a/tests/baselines/reference/callOverloads5.js +++ b/tests/baselines/reference/callOverloads5.js @@ -24,7 +24,8 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function (a) { }; + Foo.prototype.bar1 = function (a) { + }; return Foo; })(); //class Foo(s: String); diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js index 24c71c98505..6daa62f83a8 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js @@ -21,7 +21,8 @@ var r5 = a.f(); //// [callSignatureWithoutAnnotationsOrBody.js] // Call signatures without a return type annotation and function body return 'any' -function foo(x) { } +function foo(x) { +} var r = foo(1); // void since there's a body var i; var r2 = i(); diff --git a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js index 0e78aac2b1b..f37d4c06861 100644 --- a/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js +++ b/tests/baselines/reference/callSignatureWithoutReturnTypeAnnotationInference.js @@ -165,7 +165,9 @@ function foo7(x) { var r7 = foo7(1); // object types function foo8(x) { - return { x: x }; + return { + x: x + }; } var r8 = foo8(1); function foo9(x) { @@ -202,7 +204,9 @@ function foo12() { return i2; } var r12 = foo12(); -function m1() { return 1; } +function m1() { + return 1; +} var m1; (function (m1) { m1.y = 2; diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js index 5584dd7b216..22b312e2570 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js @@ -40,27 +40,43 @@ var b = { //// [callSignaturesWithAccessibilityModifiersOnParameters.js] // Call signature parameters do not allow accessibility modifiers -function foo(x, y) { } -var f = function foo(x, y) { }; -var f2 = function (x, y) { }; -var f3 = function (x, y) { }; -var f4 = function (x, y) { }; -function foo2(x, y) { } -var f5 = function foo(x, y) { }; -var f6 = function (x, y) { }; -var f7 = function (x, y) { }; -var f8 = function (x, y) { }; +function foo(x, y) { +} +var f = function foo(x, y) { +}; +var f2 = function (x, y) { +}; +var f3 = function (x, y) { +}; +var f4 = function (x, y) { +}; +function foo2(x, y) { +} +var f5 = function foo(x, y) { +}; +var f6 = function (x, y) { +}; +var f7 = function (x, y) { +}; +var f8 = function (x, y) { +}; var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; - C.prototype.foo2 = function (x, y) { }; - C.prototype.foo3 = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; + C.prototype.foo2 = function (x, y) { + }; + C.prototype.foo3 = function (x, y) { + }; return C; })(); var a; var b = { - foo: function (x, y) { }, - a: function foo(x, y) { }, - b: function (x, y) { } + foo: function (x, y) { + }, + a: function foo(x, y) { + }, + b: function (x, y) { + } }; diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js index 6ed7f6f7fe5..49e20266dad 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js @@ -40,27 +40,43 @@ var b = { //// [callSignaturesWithDuplicateParameters.js] // Duplicate parameter names are always an error -function foo(x, x) { } -var f = function foo(x, x) { }; -var f2 = function (x, x) { }; -var f3 = function (x, x) { }; -var f4 = function (x, x) { }; -function foo2(x, x) { } -var f5 = function foo(x, x) { }; -var f6 = function (x, x) { }; -var f7 = function (x, x) { }; -var f8 = function (x, y) { }; +function foo(x, x) { +} +var f = function foo(x, x) { +}; +var f2 = function (x, x) { +}; +var f3 = function (x, x) { +}; +var f4 = function (x, x) { +}; +function foo2(x, x) { +} +var f5 = function foo(x, x) { +}; +var f6 = function (x, x) { +}; +var f7 = function (x, x) { +}; +var f8 = function (x, y) { +}; var C = (function () { function C() { } - C.prototype.foo = function (x, x) { }; - C.prototype.foo2 = function (x, x) { }; - C.prototype.foo3 = function (x, x) { }; + C.prototype.foo = function (x, x) { + }; + C.prototype.foo2 = function (x, x) { + }; + C.prototype.foo3 = function (x, x) { + }; return C; })(); var a; var b = { - foo: function (x, x) { }, - a: function foo(x, x) { }, - b: function (x, x) { } + foo: function (x, x) { + }, + a: function foo(x, x) { + }, + b: function (x, x) { + } }; diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters.js b/tests/baselines/reference/callSignaturesWithOptionalParameters.js index 2f4876fb2de..fa2126fb6c5 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters.js @@ -57,9 +57,12 @@ b.b(1); //// [callSignaturesWithOptionalParameters.js] // Optional parameters should be valid in all the below casts -function foo(x) { } -var f = function foo(x) { }; -var f2 = function (x, y) { }; +function foo(x) { +} +var f = function foo(x) { +}; +var f2 = function (x, y) { +}; foo(1); foo(); f(1); @@ -69,7 +72,8 @@ f2(1, 2); var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var c; @@ -86,9 +90,12 @@ a(1); a.foo(); a.foo(1); var b = { - foo: function (x) { }, - a: function foo(x, y) { }, - b: function (x) { } + foo: function (x) { + }, + a: function foo(x, y) { + }, + b: function (x) { + } }; b.foo(); b.foo(1); diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js index a3fb2fe7a85..95ecb3a0e9c 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js @@ -61,17 +61,21 @@ a.foo(1, 2, 3); //// [callSignaturesWithOptionalParameters2.js] // Optional parameters should be valid in all the below casts -function foo(x) { } +function foo(x) { +} foo(1); foo(); -function foo2(x, y) { } +function foo2(x, y) { +} foo2(1); foo2(1, 2); var C = (function () { function C() { } - C.prototype.foo = function (x) { }; - C.prototype.foo2 = function (x, y) { }; + C.prototype.foo = function (x) { + }; + C.prototype.foo2 = function (x, y) { + }; return C; })(); var c; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index d676c0f2a33..4cb52f41d3c 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -82,7 +82,11 @@ obj.foo.apply(obj, [1, 2].concat(a, ["abc"])); xa[1].foo(1, 2, "abc"); (_a = xa[1]).foo.apply(_a, [1, 2].concat(a)); (_b = xa[1]).foo.apply(_b, [1, 2].concat(a, ["abc"])); -(_c = xa[1]).foo.apply(_c, [1, 2, "abc"]); +(_c = xa[1]).foo.apply(_c, [ + 1, + 2, + "abc" +]); var C = (function () { function C(x, y) { var z = []; diff --git a/tests/baselines/reference/callWithSpreadES6.js b/tests/baselines/reference/callWithSpreadES6.js index bdb5aab33ec..0becb4c6e3e 100644 --- a/tests/baselines/reference/callWithSpreadES6.js +++ b/tests/baselines/reference/callWithSpreadES6.js @@ -79,7 +79,11 @@ obj.foo(1, 2, ...a, "abc"); xa[1].foo(1, 2, "abc"); xa[1].foo(1, 2, ...a); xa[1].foo(1, 2, ...a, "abc"); -xa[1].foo(...[1, 2, "abc"]); +xa[1].foo(...[ + 1, + 2, + "abc" +]); var C = (function () { function C(x, y, ...z) { this.foo(x, y); diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js index 74ea401ae3b..f7bc46a7724 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js @@ -6,7 +6,8 @@ f(); f(); //// [callWithWrongNumberOfTypeArguments.js] -function f() { } +function f() { +} f(); f(); f(); diff --git a/tests/baselines/reference/callbacksDontShareTypes.js b/tests/baselines/reference/callbacksDontShareTypes.js index e6483638058..649ed1cb6ca 100644 --- a/tests/baselines/reference/callbacksDontShareTypes.js +++ b/tests/baselines/reference/callbacksDontShareTypes.js @@ -21,8 +21,14 @@ var r5b = _.map(c2, rf1); //// [callbacksDontShareTypes.js] var _; var c2; -var rf1 = function (x) { return x.toFixed(); }; -var r1a = _.map(c2, function (x) { return x.toFixed(); }); +var rf1 = function (x) { + return x.toFixed(); +}; +var r1a = _.map(c2, function (x) { + return x.toFixed(); +}); var r1b = _.map(c2, rf1); // this line should not cause the following 2 to have errors -var r5a = _.map(c2, function (x) { return x.toFixed(); }); +var r5a = _.map(c2, function (x) { + return x.toFixed(); +}); var r5b = _.map(c2, rf1); diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 7200fabd8c4..cbb41afea3b 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -24,8 +24,13 @@ var B = (function (_super) { __extends(B, _super); function B() { var _this = this; - _super.call(this, { test: function () { return _this.someMethod(); } }); + _super.call(this, { + test: function () { + return _this.someMethod(); + } + }); } - B.prototype.someMethod = function () { }; + B.prototype.someMethod = function () { + }; return B; })(A); diff --git a/tests/baselines/reference/castExpressionParentheses.js b/tests/baselines/reference/castExpressionParentheses.js index ec18d6e373e..c217b5e7b2f 100644 --- a/tests/baselines/reference/castExpressionParentheses.js +++ b/tests/baselines/reference/castExpressionParentheses.js @@ -42,8 +42,13 @@ new (A()); //// [castExpressionParentheses.js] // parentheses should be omitted // literals -{ a: 0 }; -[1, 3,]; +{ + a: 0 +}; +[ + 1, + 3, +]; "string"; 23.0; /regexp/g; @@ -63,8 +68,10 @@ a().x; (typeof A).x; (-A).x; new (A()); -(function () { })(); -(function foo() { })(); +(function () { +})(); +(function foo() { +})(); (-A).x; // nested cast, should keep one pair of parenthese (-A).x; diff --git a/tests/baselines/reference/castTest.js b/tests/baselines/reference/castTest.js index ef9ef084d98..5afa67026b9 100644 --- a/tests/baselines/reference/castTest.js +++ b/tests/baselines/reference/castTest.js @@ -47,5 +47,7 @@ var p_cast = ({ add: function (dx, dy) { return new Point(this.x + dx, this.y + dy); }, - mult: function (p) { return p; } + mult: function (p) { + return p; + } }); diff --git a/tests/baselines/reference/castingTuple.js b/tests/baselines/reference/castingTuple.js index fffadcbc070..bea141968a6 100644 --- a/tests/baselines/reference/castingTuple.js +++ b/tests/baselines/reference/castingTuple.js @@ -82,20 +82,39 @@ var E2; E2[E2["one"] = 0] = "one"; })(E2 || (E2 = {})); // no error -var numStrTuple = [5, "foo"]; +var numStrTuple = [ + 5, + "foo" +]; var emptyObjTuple = numStrTuple; var numStrBoolTuple = numStrTuple; -var classCDTuple = [new C(), new D()]; +var classCDTuple = [ + new C(), + new D() +]; var interfaceIITuple = classCDTuple; var classCDATuple = classCDTuple; var eleFromCDA1 = classCDATuple[2]; // A var eleFromCDA2 = classCDATuple[5]; // C | D | A -var t10 = [0 /* one */, 0 /* one */]; +var t10 = [ + 0 /* one */, + 0 /* one */ +]; var t11 = t10; var array1 = emptyObjTuple; -var unionTuple = [new C(), "foo"]; -var unionTuple2 = [new C(), "foo", new D()]; -var unionTuple3 = [10, "foo"]; +var unionTuple = [ + new C(), + "foo" +]; +var unionTuple2 = [ + new C(), + "foo", + new D() +]; +var unionTuple3 = [ + 10, + "foo" +]; var unionTuple4 = unionTuple3; // error var t3 = numStrTuple; diff --git a/tests/baselines/reference/catch.js b/tests/baselines/reference/catch.js index d3babf1f31d..c6b13cf4d68 100644 --- a/tests/baselines/reference/catch.js +++ b/tests/baselines/reference/catch.js @@ -7,8 +7,12 @@ function f() { //// [catch.js] function f() { - try { } - catch (e) { } - try { } - catch (e) { } + try { + } + catch (e) { + } + try { + } + catch (e) { + } } diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js index 70456b9e9d1..3795994c64c 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js @@ -55,4 +55,12 @@ var C = (function (_super) { return C; })(B); // Ok to go down the chain, but error to try to climb back up -(new Chain(new A)).then(function (a) { return new B; }).then(function (b) { return new C; }).then(function (c) { return new B; }).then(function (b) { return new A; }); +(new Chain(new A)).then(function (a) { + return new B; +}).then(function (b) { + return new C; +}).then(function (c) { + return new B; +}).then(function (b) { + return new A; +}); diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js index 3b9b8b80ecf..dbf55d4ec30 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js @@ -50,12 +50,30 @@ var Chain = (function () { var t; var s; // Ok to go down the chain, but error to climb up the chain - (new Chain(t)).then(function (tt) { return s; }).then(function (ss) { return t; }); + (new Chain(t)).then(function (tt) { + return s; + }).then(function (ss) { + return t; + }); // But error to try to climb up the chain - (new Chain(s)).then(function (ss) { return t; }); + (new Chain(s)).then(function (ss) { + return t; + }); // Staying at T or S should be fine - (new Chain(t)).then(function (tt) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }); - (new Chain(s)).then(function (ss) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }); + (new Chain(t)).then(function (tt) { + return t; + }).then(function (tt) { + return t; + }).then(function (tt) { + return t; + }); + (new Chain(s)).then(function (ss) { + return s; + }).then(function (ss) { + return s; + }).then(function (ss) { + return s; + }); return null; }; return Chain; @@ -70,11 +88,31 @@ var Chain2 = (function () { var s; // Ok to go down the chain, check the constraint at the end. // Should get an error that we are assigning a string to a number - (new Chain2(i)).then(function (ii) { return t; }).then(function (tt) { return s; }).value.x = ""; + (new Chain2(i)).then(function (ii) { + return t; + }).then(function (tt) { + return s; + }).value.x = ""; // Staying at T or S should keep the constraint. // Get an error when we assign a string to a number in both cases - (new Chain2(i)).then(function (ii) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }).value.x = ""; - (new Chain2(i)).then(function (ii) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }).value.x = ""; + (new Chain2(i)).then(function (ii) { + return t; + }).then(function (tt) { + return t; + }).then(function (tt) { + return t; + }).then(function (tt) { + return t; + }).value.x = ""; + (new Chain2(i)).then(function (ii) { + return s; + }).then(function (ss) { + return s; + }).then(function (ss) { + return s; + }).then(function (ss) { + return s; + }).value.x = ""; return null; }; return Chain2; diff --git a/tests/baselines/reference/chainedImportAlias.js b/tests/baselines/reference/chainedImportAlias.js index 077a92d7450..f2b3c6c6cff 100644 --- a/tests/baselines/reference/chainedImportAlias.js +++ b/tests/baselines/reference/chainedImportAlias.js @@ -14,7 +14,8 @@ y.m.foo(); //// [chainedImportAlias_file0.js] var m; (function (m) { - function foo() { } + function foo() { + } m.foo = foo; })(m = exports.m || (exports.m = {})); //// [chainedImportAlias_file1.js] diff --git a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js index 1884967aa9e..e10a41d9fbf 100644 --- a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js +++ b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.js @@ -13,5 +13,9 @@ var s3 = s2.each(x => { x.key /* Type is K, should be number */ }); //// [chainedSpecializationToObjectTypeLiteral.js] var s; -var s2 = s.groupBy(function (s) { return s.length; }); -var s3 = s2.each(function (x) { x.key; /* Type is K, should be number */ }); +var s2 = s.groupBy(function (s) { + return s.length; +}); +var s3 = s2.each(function (x) { + x.key; /* Type is K, should be number */ +}); diff --git a/tests/baselines/reference/classBodyWithStatements.js b/tests/baselines/reference/classBodyWithStatements.js index 2324fe0d791..bae4860f722 100644 --- a/tests/baselines/reference/classBodyWithStatements.js +++ b/tests/baselines/reference/classBodyWithStatements.js @@ -25,7 +25,8 @@ var C2 = (function () { } return C2; })(); -function foo() { } +function foo() { +} var x = 1; var y = 2; var C3 = (function () { diff --git a/tests/baselines/reference/classExpression.js b/tests/baselines/reference/classExpression.js index 6bcf0f46f74..9d902abbf52 100644 --- a/tests/baselines/reference/classExpression.js +++ b/tests/baselines/reference/classExpression.js @@ -20,7 +20,9 @@ var C = (function () { return C; })(); var y = { - foo: , class: C2 }, _a = void 0; + foo: , + class: C2 +}, _a = void 0; var M; (function (M) { var z = ; diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 130bf5818ee..6c7d9fe679b 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -41,8 +41,10 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.thing = function () { }; - C.other = function () { }; + C.prototype.thing = function () { + }; + C.other = function () { + }; return C; })(); var D = (function (_super) { @@ -60,8 +62,10 @@ var r4 = D.other(); var C2 = (function () { function C2() { } - C2.prototype.thing = function (x) { }; - C2.other = function (x) { }; + C2.prototype.thing = function (x) { + }; + C2.other = function (x) { + }; return C2; })(); var D2 = (function (_super) { diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index 81301818918..b69bc3403f4 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -69,7 +69,8 @@ var C5a = (function () { return C5a; })(); null; -{ } +{ +} var C6 = (function (_super) { __extends(C6, _super); function C6() { diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index 06b481dbbf4..9a507934455 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -18,4 +18,5 @@ var C5a = (function () { return C5a; })(); null; -{ } +{ +} diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 2ae7ea71cea..2adb974bb28 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -35,7 +35,8 @@ var C2 = (function () { } return C2; })(); -{ } // error +{ +} // error var x; var C3 = (function (_super) { __extends(C3, _super); @@ -55,7 +56,8 @@ var C4 = (function (_super) { } return C4; })(M); // error -function foo() { } +function foo() { +} var C5 = (function (_super) { __extends(C5, _super); function C5() { @@ -69,4 +71,5 @@ var C6 = (function () { return C6; })(); []; -{ } // error +{ +} // error diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index 7be13137766..f2bcb02fee4 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -9,11 +9,13 @@ var C2 = (function () { } return C2; })(); -{ } // error +{ +} // error var C6 = (function () { function C6() { } return C6; })(); []; -{ } // error +{ +} // error diff --git a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js index 907b6bd6fd2..ed6e3138b07 100644 --- a/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js +++ b/tests/baselines/reference/classExtendsInterfaceThatExtendsClassWithPrivates1.js @@ -19,14 +19,20 @@ var C = (function () { function C() { this.x = 1; } - C.prototype.foo = function (x) { return x; }; + C.prototype.foo = function (x) { + return x; + }; return C; })(); var D2 = (function () { function D2() { this.x = 3; } - D2.prototype.foo = function (x) { return x; }; - D2.prototype.other = function (x) { return x; }; + D2.prototype.foo = function (x) { + return x; + }; + D2.prototype.other = function (x) { + return x; + }; return D2; })(); diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index c2f0f17e534..a0876e8f709 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -12,7 +12,8 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function foo() { } +function foo() { +} var x = new foo(); // can be used as a constructor function var C = (function (_super) { __extends(C, _super); diff --git a/tests/baselines/reference/classImplementsClass2.js b/tests/baselines/reference/classImplementsClass2.js index bc4f6b6748c..98554944bc9 100644 --- a/tests/baselines/reference/classImplementsClass2.js +++ b/tests/baselines/reference/classImplementsClass2.js @@ -23,7 +23,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsClass3.js b/tests/baselines/reference/classImplementsClass3.js index 450263d00c9..9dbfc4388e9 100644 --- a/tests/baselines/reference/classImplementsClass3.js +++ b/tests/baselines/reference/classImplementsClass3.js @@ -24,7 +24,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsClass4.js b/tests/baselines/reference/classImplementsClass4.js index ac5c899bbbf..0e08e508fb5 100644 --- a/tests/baselines/reference/classImplementsClass4.js +++ b/tests/baselines/reference/classImplementsClass4.js @@ -27,7 +27,9 @@ var A = (function () { function A() { this.x = 1; } - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsClass5.js b/tests/baselines/reference/classImplementsClass5.js index a0971904cc3..46e826683e7 100644 --- a/tests/baselines/reference/classImplementsClass5.js +++ b/tests/baselines/reference/classImplementsClass5.js @@ -28,7 +28,9 @@ var A = (function () { function A() { this.x = 1; } - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsClass6.js b/tests/baselines/reference/classImplementsClass6.js index 931218e2bea..386cd6685ae 100644 --- a/tests/baselines/reference/classImplementsClass6.js +++ b/tests/baselines/reference/classImplementsClass6.js @@ -34,7 +34,9 @@ var A = (function () { A.bar = function () { return ""; }; - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C = (function () { diff --git a/tests/baselines/reference/classImplementsImportedInterface.js b/tests/baselines/reference/classImplementsImportedInterface.js index a2af2083a2a..c76a026b58a 100644 --- a/tests/baselines/reference/classImplementsImportedInterface.js +++ b/tests/baselines/reference/classImplementsImportedInterface.js @@ -18,7 +18,8 @@ var M2; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/classMethodWithKeywordName1.js b/tests/baselines/reference/classMethodWithKeywordName1.js index ba5bb72632a..9b6b7595f04 100644 --- a/tests/baselines/reference/classMethodWithKeywordName1.js +++ b/tests/baselines/reference/classMethodWithKeywordName1.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.try = function () { }; + C.try = function () { + }; return C; })(); diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 4bc1c3f790c..179be456028 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -31,13 +31,16 @@ var A = (function (_super) { function A() { _super.apply(this, arguments); } - A.prototype.foo = function () { this.bar(); }; + A.prototype.foo = function () { + this.bar(); + }; return A; })(B); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); var a = new A(); diff --git a/tests/baselines/reference/classOverloadForFunction.js b/tests/baselines/reference/classOverloadForFunction.js index 40f076b0f2c..47c787986da 100644 --- a/tests/baselines/reference/classOverloadForFunction.js +++ b/tests/baselines/reference/classOverloadForFunction.js @@ -10,4 +10,5 @@ var foo = (function () { return foo; })(); ; -function foo() { } +function foo() { +} diff --git a/tests/baselines/reference/classPropertyAsPrivate.js b/tests/baselines/reference/classPropertyAsPrivate.js index 51d08b48ec5..8b59dcde771 100644 --- a/tests/baselines/reference/classPropertyAsPrivate.js +++ b/tests/baselines/reference/classPropertyAsPrivate.js @@ -28,19 +28,27 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; Object.defineProperty(C, "b", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var c; diff --git a/tests/baselines/reference/classPropertyAsProtected.js b/tests/baselines/reference/classPropertyAsProtected.js index 1cd74089816..ddb193f072a 100644 --- a/tests/baselines/reference/classPropertyAsProtected.js +++ b/tests/baselines/reference/classPropertyAsProtected.js @@ -28,19 +28,27 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; Object.defineProperty(C, "b", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var c; diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.js b/tests/baselines/reference/classPropertyIsPublicByDefault.js index a0b61a08922..db1eca56c11 100644 --- a/tests/baselines/reference/classPropertyIsPublicByDefault.js +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.js @@ -27,19 +27,27 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; Object.defineProperty(C, "b", { - get: function () { return null; }, - set: function (x) { }, + get: function () { + return null; + }, + set: function (x) { + }, enumerable: true, configurable: true }); - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var c; diff --git a/tests/baselines/reference/classSideInheritance1.js b/tests/baselines/reference/classSideInheritance1.js index 74df624a78c..38b84b77bd3 100644 --- a/tests/baselines/reference/classSideInheritance1.js +++ b/tests/baselines/reference/classSideInheritance1.js @@ -28,7 +28,9 @@ var A = (function () { A.bar = function () { return ""; }; - A.prototype.foo = function () { return 1; }; + A.prototype.foo = function () { + return 1; + }; return A; })(); var C2 = (function (_super) { diff --git a/tests/baselines/reference/classWithEmptyBody.js b/tests/baselines/reference/classWithEmptyBody.js index 16c50ccec77..df9bc857106 100644 --- a/tests/baselines/reference/classWithEmptyBody.js +++ b/tests/baselines/reference/classWithEmptyBody.js @@ -29,8 +29,11 @@ var C = (function () { var c; var o = c; c = 1; -c = { foo: '' }; -c = function () { }; +c = { + foo: '' +}; +c = function () { +}; var D = (function () { function D() { return 1; @@ -40,5 +43,8 @@ var D = (function () { var d; var o = d; d = 1; -d = { foo: '' }; -d = function () { }; +d = { + foo: '' +}; +d = function () { +}; diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.js b/tests/baselines/reference/classWithMultipleBaseClasses.js index 0e101d61dc9..c6900f526cb 100644 --- a/tests/baselines/reference/classWithMultipleBaseClasses.js +++ b/tests/baselines/reference/classWithMultipleBaseClasses.js @@ -28,19 +28,23 @@ interface I extends A, B { var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); var D = (function () { function D() { } - D.prototype.baz = function () { }; - D.prototype.bat = function () { }; + D.prototype.baz = function () { + }; + D.prototype.bat = function () { + }; return D; })(); diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js index 1c07449c994..acb802d0f97 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js @@ -30,10 +30,15 @@ i = c; var C = (function () { function C() { } - C.prototype.y = function (a) { return null; }; + C.prototype.y = function (a) { + return null; + }; Object.defineProperty(C.prototype, "z", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js index 78e5cb05861..1048c2e5124 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js @@ -32,10 +32,15 @@ i = c; var C = (function () { function C() { } - C.prototype.y = function (a) { return null; }; + C.prototype.y = function (a) { + return null; + }; Object.defineProperty(C.prototype, "z", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classWithOptionalParameter.js b/tests/baselines/reference/classWithOptionalParameter.js index 2f11f15febe..082e624916a 100644 --- a/tests/baselines/reference/classWithOptionalParameter.js +++ b/tests/baselines/reference/classWithOptionalParameter.js @@ -16,12 +16,14 @@ class C2 { var C = (function () { function C() { } - C.prototype.f = function () { }; + C.prototype.f = function () { + }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.f = function (x) { }; + C2.prototype.f = function (x) { + }; return C2; })(); diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js index 4ac6548483e..f8cb9bf4c5b 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js @@ -9,6 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { + }; return C; })(); diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js index fd28ae3d9eb..5caba8f3fd5 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js @@ -9,6 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { + }; return C; })(); diff --git a/tests/baselines/reference/classWithPrivateProperty.js b/tests/baselines/reference/classWithPrivateProperty.js index 0529fd8d694..47ff7c91421 100644 --- a/tests/baselines/reference/classWithPrivateProperty.js +++ b/tests/baselines/reference/classWithPrivateProperty.js @@ -28,11 +28,19 @@ var C = (function () { function C() { this.a = ''; this.b = ''; - this.d = function () { return ''; }; + this.d = function () { + return ''; + }; } - C.prototype.c = function () { return ''; }; - C.f = function () { return ''; }; - C.g = function () { return ''; }; + C.prototype.c = function () { + return ''; + }; + C.f = function () { + return ''; + }; + C.g = function () { + return ''; + }; return C; })(); var c = new C(); diff --git a/tests/baselines/reference/classWithProtectedProperty.js b/tests/baselines/reference/classWithProtectedProperty.js index 4de87229ad0..c8b15c1396c 100644 --- a/tests/baselines/reference/classWithProtectedProperty.js +++ b/tests/baselines/reference/classWithProtectedProperty.js @@ -39,11 +39,19 @@ var C = (function () { function C() { this.a = ''; this.b = ''; - this.d = function () { return ''; }; + this.d = function () { + return ''; + }; } - C.prototype.c = function () { return ''; }; - C.f = function () { return ''; }; - C.g = function () { return ''; }; + C.prototype.c = function () { + return ''; + }; + C.f = function () { + return ''; + }; + C.g = function () { + return ''; + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/classWithPublicProperty.js b/tests/baselines/reference/classWithPublicProperty.js index cc1b0aad64f..88dc9d8de10 100644 --- a/tests/baselines/reference/classWithPublicProperty.js +++ b/tests/baselines/reference/classWithPublicProperty.js @@ -26,11 +26,19 @@ var C = (function () { function C() { this.a = ''; this.b = ''; - this.d = function () { return ''; }; + this.d = function () { + return ''; + }; } - C.prototype.c = function () { return ''; }; - C.f = function () { return ''; }; - C.g = function () { return ''; }; + C.prototype.c = function () { + return ''; + }; + C.f = function () { + return ''; + }; + C.g = function () { + return ''; + }; return C; })(); // all of these are valid diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 36b8bd0af64..2cded4b1f2e 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -31,10 +31,15 @@ var C = (function () { this.a = a; this.b = b; } - C.fn = function () { return this; }; + C.fn = function () { + return this; + }; Object.defineProperty(C, "x", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index e9253b61cac..1f588b785e9 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -103,7 +103,8 @@ var __extends = this.__extends || function (d, b) { var a = (function () { function a(ns) { } - a.prototype.pgF = function () { }; + a.prototype.pgF = function () { + }; Object.defineProperty(a.prototype, "d", { get: function () { return 30; @@ -115,7 +116,10 @@ var a = (function () { }); Object.defineProperty(a, "p2", { get: function () { - return { x: 30, y: 40 }; + return { + x: 30, + y: 40 + }; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js index c877de38a00..9772af20434 100644 --- a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js +++ b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js @@ -21,8 +21,10 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { }; - B.bar = function () { }; + B.prototype.foo = function () { + }; + B.bar = function () { + }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/cloduleTest1.js b/tests/baselines/reference/cloduleTest1.js index 9e7edc77c71..f79f1e5c46f 100644 --- a/tests/baselines/reference/cloduleTest1.js +++ b/tests/baselines/reference/cloduleTest1.js @@ -14,7 +14,8 @@ //// [cloduleTest1.js] var $; (function ($) { - function ajax(options) { } + function ajax(options) { + } $.ajax = ajax; })($ || ($ = {})); var it = $('.foo').addClass('bar'); diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.js b/tests/baselines/reference/cloduleWithDuplicateMember1.js index e3cb8f83fed..ed4d69545fc 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.js @@ -20,7 +20,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -31,7 +33,8 @@ var C = (function () { enumerable: true, configurable: true }); - C.foo = function () { }; + C.foo = function () { + }; return C; })(); var C; @@ -40,8 +43,10 @@ var C; })(C || (C = {})); var C; (function (C) { - function foo() { } + function foo() { + } C.foo = foo; - function x() { } + function x() { + } C.x = x; })(C || (C = {})); diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.js b/tests/baselines/reference/cloduleWithDuplicateMember2.js index c16c6c9af8a..461930c02ae 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.js @@ -16,12 +16,14 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - set: function (y) { }, + set: function (y) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "y", { - set: function (z) { }, + set: function (z) { + }, enumerable: true, configurable: true }); @@ -33,6 +35,7 @@ var C; })(C || (C = {})); var C; (function (C) { - function x() { } + function x() { + } C.x = x; })(C || (C = {})); diff --git a/tests/baselines/reference/clodulesDerivedClasses.js b/tests/baselines/reference/clodulesDerivedClasses.js index b4b31e59d3e..f249a7d5589 100644 --- a/tests/baselines/reference/clodulesDerivedClasses.js +++ b/tests/baselines/reference/clodulesDerivedClasses.js @@ -38,7 +38,9 @@ var Shape; (function (Shape) { var Utils; (function (Utils) { - function convert() { return null; } + function convert() { + return null; + } Utils.convert = convert; })(Utils = Shape.Utils || (Shape.Utils = {})); })(Shape || (Shape = {})); diff --git a/tests/baselines/reference/collisionSuperAndParameter.js b/tests/baselines/reference/collisionSuperAndParameter.js index be9e0ce3f68..f7198dfbf04 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.js +++ b/tests/baselines/reference/collisionSuperAndParameter.js @@ -75,13 +75,17 @@ var Foo = (function () { Foo.prototype.a = function () { var _this = this; var lamda = function (_super) { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Foo.prototype.b = function (_super) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Object.defineProperty(Foo.prototype, "c", { @@ -104,13 +108,17 @@ var Foo2 = (function (_super) { Foo2.prototype.x = function () { var _this = this; var lamda = function (_super) { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Foo2.prototype.y = function (_super) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Object.defineProperty(Foo2.prototype, "z", { @@ -129,7 +137,9 @@ var Foo4 = (function (_super) { Foo4.prototype.y = function (_super) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; return Foo4; diff --git a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js index 1f613798642..b1db7f12ea5 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAliasInGlobal.js @@ -11,5 +11,7 @@ var a; (function (a) { a.b = 10; })(a || (a = {})); -var f = function () { return _this; }; +var f = function () { + return _this; +}; var _this = a; // Error diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js index b99311b0c3e..7c617b25756 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientClassInGlobal.js @@ -6,5 +6,7 @@ var a = new _this(); // Error //// [collisionThisExpressionAndAmbientClassInGlobal.js] var _this = this; -var f = function () { return _this; }; +var f = function () { + return _this; +}; var a = new _this(); // Error diff --git a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js index c6c54869056..8aec5140caf 100644 --- a/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndAmbientVarInGlobal.js @@ -5,5 +5,7 @@ _this = 10; // Error //// [collisionThisExpressionAndAmbientVarInGlobal.js] var _this = this; -var f = function () { return _this; }; +var f = function () { + return _this; +}; _this = 10; // Error diff --git a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js index ccaa335d80e..c31d03bed9b 100644 --- a/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndClassInGlobal.js @@ -10,4 +10,6 @@ var _this = (function () { } return _this; })(); -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js index 4ab929a3877..3de272e51a7 100644 --- a/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndEnumInGlobal.js @@ -12,4 +12,6 @@ var _this; _this[_this["_thisVal1"] = 0] = "_thisVal1"; _this[_this["_thisVal2"] = 1] = "_thisVal2"; })(_this || (_this = {})); -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js index 3c6232ba0ba..07e2a1358f6 100644 --- a/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndFunctionInGlobal.js @@ -9,4 +9,6 @@ var _this = this; function _this() { return 10; } -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js index 53df2984544..0e3384feb29 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.js @@ -51,20 +51,24 @@ var class1 = (function () { get: function () { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; return 10; }, set: function (val) { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; }, enumerable: true, @@ -80,9 +84,11 @@ var class2 = (function () { var _this = this; var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; return 10; }, @@ -90,9 +96,11 @@ var class2 = (function () { var _this = this; var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; }, enumerable: true, diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js index d0ed79da530..e4c1c7ac9ba 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInConstructor.js @@ -26,10 +26,12 @@ var class1 = (function () { function class1() { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; } return class1; @@ -39,9 +41,11 @@ var class2 = (function () { var _this = this; var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; } return class2; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js index 879dd83d778..967d01819ec 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInFunction.js @@ -12,5 +12,7 @@ var console; function x() { var _this = this; var _this = 5; - (function (x) { console.log(_this.x); }); + (function (x) { + console.log(_this.x); + }); } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js index e8b7a0db7f3..a799ec36eae 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInLambda.js @@ -12,9 +12,13 @@ alert(x.doStuff(x => alert(x))); //// [collisionThisExpressionAndLocalVarInLambda.js] var _this = this; var x = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; -alert(x.doStuff(function (x) { return alert(x); })); +alert(x.doStuff(function (x) { + return alert(x); +})); diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js index 63b536bd8b6..398ed393794 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInMethod.js @@ -25,19 +25,23 @@ var a = (function () { a.prototype.method1 = function () { var _this = this; return { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; }; a.prototype.method2 = function () { var _this = this; var _this = 2; return { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; }; return a; diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js index 65d181921d5..f884c93a62e 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInProperty.js @@ -24,10 +24,12 @@ var class1 = (function () { function class1() { var _this = this; this.prop1 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; } return class1; @@ -36,9 +38,11 @@ var class2 = (function () { function class2() { var _this = this; this.prop1 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; var _this = 2; } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js index d502fc5c03a..5ac394520e4 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarWithSuperExperssion.js @@ -40,7 +40,9 @@ var b = (function (_super) { b.prototype.foo = function () { var _this = this; var _this = 10; - var f = function () { return _super.prototype.foo.call(_this); }; + var f = function () { + return _super.prototype.foo.call(_this); + }; }; return b; })(a); diff --git a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js index 777f141451b..2bf6987c86f 100644 --- a/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndModuleInGlobal.js @@ -15,4 +15,6 @@ var _this; return c; })(); })(_this || (_this = {})); -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js index 8b128d92946..12398920f50 100644 --- a/tests/baselines/reference/collisionThisExpressionAndNameResolution.js +++ b/tests/baselines/reference/collisionThisExpressionAndNameResolution.js @@ -22,7 +22,9 @@ var Foo = (function () { function inner() { var _this = this; console.log(_this); // Error as this doesnt not resolve to user defined _this - return function (x) { return _this; }; // New scope. So should inject new _this capture into function inner + return function (x) { + return _this; + }; // New scope. So should inject new _this capture into function inner } }; return Foo; diff --git a/tests/baselines/reference/collisionThisExpressionAndParameter.js b/tests/baselines/reference/collisionThisExpressionAndParameter.js index 3a19cf20d5a..95ade61d202 100644 --- a/tests/baselines/reference/collisionThisExpressionAndParameter.js +++ b/tests/baselines/reference/collisionThisExpressionAndParameter.js @@ -101,19 +101,25 @@ var Foo = (function () { var _this = 10; // Local var. No this capture in x(), so no conflict. function inner(_this) { var _this = this; - return function (x) { return _this; }; // New scope. So should inject new _this capture into function inner + return function (x) { + return _this; + }; // New scope. So should inject new _this capture into function inner } }; Foo.prototype.y = function () { var _this = this; var lamda = function (_this) { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Foo.prototype.z = function (_this) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; Foo.prototype.x1 = function () { @@ -135,35 +141,45 @@ var Foo1 = (function () { function Foo1(_this) { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; } return Foo1; })(); function f1(_this) { var _this = this; - (function (x) { console.log(_this.x); }); + (function (x) { + console.log(_this.x); + }); } var Foo3 = (function () { function Foo3(_this) { var _this = this; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; } Foo3.prototype.z = function (_this) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; }; return Foo3; })(); function f3(_this) { var _this = this; - (function (x) { console.log(_this.x); }); + (function (x) { + console.log(_this.x); + }); } diff --git a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js index a77098739ec..75e4a60bfd3 100644 --- a/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js +++ b/tests/baselines/reference/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js @@ -40,7 +40,9 @@ var Foo2 = (function () { function Foo2(_this) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; } return Foo2; @@ -50,7 +52,9 @@ var Foo3 = (function () { var _this = this; this._this = _this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; } return Foo3; @@ -59,7 +63,9 @@ var Foo4 = (function () { function Foo4(_this) { var _this = this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; } return Foo4; @@ -69,7 +75,9 @@ var Foo5 = (function () { var _this = this; this._this = _this; var lambda = function () { - return function (x) { return _this; }; // New scope. So should inject new _this capture + return function (x) { + return _this; + }; // New scope. So should inject new _this capture }; } return Foo5; diff --git a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js index 7057ad7ac55..77a6a28e283 100644 --- a/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js +++ b/tests/baselines/reference/collisionThisExpressionAndVarInGlobal.js @@ -5,4 +5,6 @@ var f = () => this; //// [collisionThisExpressionAndVarInGlobal.js] var _this = this; var _this = 1; -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js index 522bbbe4e19..903a77c1ac4 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.js @@ -59,8 +59,14 @@ var resultIsAny5 = (OBJECT, ANY); var x; 1, ANY; ++NUMBER, ANY; -"string", [null, 1]; -"string".charAt(0), [null, 1]; +"string", [ + null, + 1 +]; +"string".charAt(0), [ + null, + 1 +]; true, x("any"); !BOOLEAN, x.doSomeThing(); var resultIsAny6 = (1, ANY); diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.js b/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.js index dfaba1a93ca..6e3df849004 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.js @@ -58,11 +58,27 @@ null, BOOLEAN; ANY = undefined, BOOLEAN; 1, true; ++NUMBER, true; -[1, 2, 3], !BOOLEAN; -OBJECT = [1, 2, 3], BOOLEAN = false; +[ + 1, + 2, + 3 +], !BOOLEAN; +OBJECT = [ + 1, + 2, + 3 +], BOOLEAN = false; var resultIsBoolean6 = (null, BOOLEAN); var resultIsBoolean7 = (ANY = undefined, BOOLEAN); var resultIsBoolean8 = (1, true); var resultIsBoolean9 = (++NUMBER, true); -var resultIsBoolean10 = ([1, 2, 3], !BOOLEAN); -var resultIsBoolean11 = (OBJECT = [1, 2, 3], BOOLEAN = false); +var resultIsBoolean10 = ([ + 1, + 2, + 3 +], !BOOLEAN); +var resultIsBoolean11 = (OBJECT = [ + 1, + 2, + 3 +], BOOLEAN = false); diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js index 90c16543ff2..452d74d7cf6 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.js @@ -72,6 +72,9 @@ STRING.toLowerCase(), new CLASS(); var resultIsObject6 = (null, OBJECT); var resultIsObject7 = (ANY = null, OBJECT); var resultIsObject8 = (true, {}); -var resultIsObject9 = (!BOOLEAN, { a: 1, b: "s" }); +var resultIsObject9 = (!BOOLEAN, { + a: 1, + b: "s" +}); var resultIsObject10 = ("string", new Date()); var resultIsObject11 = (STRING.toLowerCase(), new CLASS()); diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js index 412e9e83121..163679b3373 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js +++ b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.js @@ -61,11 +61,17 @@ null, STRING; ANY = new Date(), STRING; true, ""; BOOLEAN == undefined, ""; -["a", "b"], NUMBER.toString(); +[ + "a", + "b" +], NUMBER.toString(); OBJECT = new Object, STRING + "string"; var resultIsString6 = (null, STRING); var resultIsString7 = (ANY = new Date(), STRING); var resultIsString8 = (true, ""); var resultIsString9 = (BOOLEAN == undefined, ""); -var resultIsString10 = (["a", "b"], NUMBER.toString()); +var resultIsString10 = ([ + "a", + "b" +], NUMBER.toString()); var resultIsString11 = (new Object, STRING + "string"); diff --git a/tests/baselines/reference/commentEmitAtEndOfFile1.js b/tests/baselines/reference/commentEmitAtEndOfFile1.js index 1be031fa84a..1a1f7cb8900 100644 --- a/tests/baselines/reference/commentEmitAtEndOfFile1.js +++ b/tests/baselines/reference/commentEmitAtEndOfFile1.js @@ -16,6 +16,7 @@ var f = ''; // test #2 var foo; (function (foo) { - function bar() { } + function bar() { + } })(foo || (foo = {})); // test #4 diff --git a/tests/baselines/reference/commentInMethodCall.js b/tests/baselines/reference/commentInMethodCall.js index 4ad2fc552d7..0f304df0b35 100644 --- a/tests/baselines/reference/commentInMethodCall.js +++ b/tests/baselines/reference/commentInMethodCall.js @@ -8,4 +8,5 @@ s.map(// do something //// [commentInMethodCall.js] //commment here var s; -s.map(function () { }); +s.map(function () { +}); diff --git a/tests/baselines/reference/commentOnBlock1.js b/tests/baselines/reference/commentOnBlock1.js index ed5437c1f66..ff557c1fc9b 100644 --- a/tests/baselines/reference/commentOnBlock1.js +++ b/tests/baselines/reference/commentOnBlock1.js @@ -7,5 +7,6 @@ function f() { //// [commentOnBlock1.js] // asdf function f() { - /*asdf*/ { } + /*asdf*/ { + } } diff --git a/tests/baselines/reference/commentOnClassAccessor1.js b/tests/baselines/reference/commentOnClassAccessor1.js index 428e500da55..cdd14a829fc 100644 --- a/tests/baselines/reference/commentOnClassAccessor1.js +++ b/tests/baselines/reference/commentOnClassAccessor1.js @@ -14,7 +14,9 @@ var C = (function () { /** * @type {number} */ - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/commentOnClassAccessor2.js b/tests/baselines/reference/commentOnClassAccessor2.js index 22a6b69f6c3..c85d17e6e19 100644 --- a/tests/baselines/reference/commentOnClassAccessor2.js +++ b/tests/baselines/reference/commentOnClassAccessor2.js @@ -19,11 +19,14 @@ var C = (function () { /** * Getter. */ - get: function () { return 1; }, + get: function () { + return 1; + }, /** * Setter. */ - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/commentsBeforeFunctionExpression1.js b/tests/baselines/reference/commentsBeforeFunctionExpression1.js index 0e23722faf3..bd7a1896a5d 100644 --- a/tests/baselines/reference/commentsBeforeFunctionExpression1.js +++ b/tests/baselines/reference/commentsBeforeFunctionExpression1.js @@ -6,5 +6,7 @@ var v = { //// [commentsBeforeFunctionExpression1.js] var v = { - f: function (a) { return 0; } + f: function (a) { + return 0; + } }; diff --git a/tests/baselines/reference/commentsFunction.js b/tests/baselines/reference/commentsFunction.js index 0ffb2714108..f5779be524d 100644 --- a/tests/baselines/reference/commentsFunction.js +++ b/tests/baselines/reference/commentsFunction.js @@ -74,8 +74,12 @@ var fooFunc = function FooFunctionValue(/** fooFunctionValue param */ b) { return b; }; /// lamdaFoo var comment -var lambdaFoo = function (/**param a*/ a, /**param b*/ b) { return a + b; }; -var lambddaNoVarComment = function (/**param a*/ a, /**param b*/ b) { return a * b; }; +var lambdaFoo = function (/**param a*/ a, /**param b*/ b) { + return a + b; +}; +var lambddaNoVarComment = function (/**param a*/ a, /**param b*/ b) { + return a * b; +}; lambdaFoo(10, 20); lambddaNoVarComment(10, 20); function blah(a /* multiline trailing comment @@ -86,9 +90,15 @@ function blah2(a /* single line multiple trailing comments */ /* second */) { function blah3(a // trailing commen single line ) { } -lambdaFoo = function (a, b) { return a * b; }; // This is trailing comment -/*leading comment*/ (function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration) -/*leading comment*/ (function () { return 0; }); //trailing comment +lambdaFoo = function (a, b) { + return a * b; +}; // This is trailing comment +/*leading comment*/ (function () { + return 0; +}); // Needs to be wrapped in parens to be a valid expression (not declaration) +/*leading comment*/ (function () { + return 0; +}); //trailing comment function blah4(/*1*/ a /*2*/, /*3*/ b /*4*/) { } function foo1() { diff --git a/tests/baselines/reference/commentsInterface.js b/tests/baselines/reference/commentsInterface.js index bff79a02aa5..dfffedaea1b 100644 --- a/tests/baselines/reference/commentsInterface.js +++ b/tests/baselines/reference/commentsInterface.js @@ -89,7 +89,9 @@ var i2_i_nc_fnfoo = i2_i.nc_fnfoo; var i2_i_nc_fnfoo_r = i2_i.nc_fnfoo(10); var i3_i; i3_i = { - f: function (/**i3_i a*/ a) { return "Hello" + a; }, + f: function (/**i3_i a*/ a) { + return "Hello" + a; + }, l: this.f, /** own x*/ x: this.f(10), diff --git a/tests/baselines/reference/commentsOnObjectLiteral3.js b/tests/baselines/reference/commentsOnObjectLiteral3.js index 49f2a6ffbf9..5d57b76991e 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral3.js +++ b/tests/baselines/reference/commentsOnObjectLiteral3.js @@ -27,7 +27,8 @@ var v = { func: function () { }, //PropertyName + CallSignature - func1: function () { }, + func1: function () { + }, //getter get a() { return this.prop; diff --git a/tests/baselines/reference/commentsVarDecl.js b/tests/baselines/reference/commentsVarDecl.js index 5ff2a3c1c6a..d76b43fafb6 100644 --- a/tests/baselines/reference/commentsVarDecl.js +++ b/tests/baselines/reference/commentsVarDecl.js @@ -70,7 +70,9 @@ var yy = /// value comment 20; /** comment2 */ -var z = function (x, y) { return x + y; }; +var z = function (x, y) { + return x + y; +}; var z2; var x2 = z2; var n4; diff --git a/tests/baselines/reference/complexClassRelationships.js b/tests/baselines/reference/complexClassRelationships.js index e8dc954e14c..a1e982e4b4d 100644 --- a/tests/baselines/reference/complexClassRelationships.js +++ b/tests/baselines/reference/complexClassRelationships.js @@ -68,7 +68,11 @@ var Derived = (function (_super) { })(Base); var BaseCollection = (function () { function BaseCollection(f) { - (function (item) { return [item.Components]; }); + (function (item) { + return [ + item.Components + ]; + }); } return BaseCollection; })(); @@ -81,7 +85,9 @@ var Thing = (function () { function Thing() { } Object.defineProperty(Thing.prototype, "Components", { - get: function () { return null; }, + get: function () { + return null; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/compositeGenericFunction.js b/tests/baselines/reference/compositeGenericFunction.js index 106c724ea24..0fe2e7d6f41 100644 --- a/tests/baselines/reference/compositeGenericFunction.js +++ b/tests/baselines/reference/compositeGenericFunction.js @@ -7,8 +7,12 @@ var z: number = h(f); var z: number = h(f); //// [compositeGenericFunction.js] -function f(value) { return value; } +function f(value) { + return value; +} ; -function h(func) { return null; } +function h(func) { + return null; +} var z = h(f); var z = h(f); diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index d85d053f8eb..40c8a3d7ad1 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -192,8 +192,14 @@ value; } value; // array literals -['', ''] *= value; -['', ''] += value; +[ + '', + '' +] *= value; +[ + '', + '' +] += value; // super var Derived = (function (_super) { __extends(Derived, _super); @@ -213,13 +219,17 @@ var Derived = (function (_super) { return Derived; })(C); // function expression -function bar1() { } +function bar1() { +} value; -function bar2() { } +function bar2() { +} value; -(function () { }); +(function () { +}); value; -(function () { }); +(function () { +}); value; // function calls foo() *= value; @@ -249,7 +259,9 @@ foo() += value; ({}) += value; ([]) *= value; ([]) += value; -(function baz1() { }) *= value; -(function baz2() { }) += value; +(function baz1() { +}) *= value; +(function baz2() { +}) += value; (foo()) *= value; (foo()) += value; diff --git a/tests/baselines/reference/computedPropertyNames10_ES5.js b/tests/baselines/reference/computedPropertyNames10_ES5.js index 302f9355be8..5d8ff398d6c 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES5.js +++ b/tests/baselines/reference/computedPropertyNames10_ES5.js @@ -21,16 +21,27 @@ var s; var n; var a; var v = (_a = {}, - _a[s] = function () { }, - _a[n] = function () { }, - _a[s + s] = function () { }, - _a[s + n] = function () { }, - _a[+s] = function () { }, - _a[""] = function () { }, - _a[0] = function () { }, - _a[a] = function () { }, - _a[true] = function () { }, - _a["hello bye"] = function () { }, - _a["hello " + a + " bye"] = function () { }, + _a[s] = function () { + }, + _a[n] = function () { + }, + _a[s + s] = function () { + }, + _a[s + n] = function () { + }, + _a[+s] = function () { + }, + _a[""] = function () { + }, + _a[0] = function () { + }, + _a[a] = function () { + }, + _a[true] = function () { + }, + _a["hello bye"] = function () { + }, + _a["hello " + a + " bye"] = function () { + }, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames10_ES6.js b/tests/baselines/reference/computedPropertyNames10_ES6.js index 0a55fabecd8..72613b5c829 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES6.js +++ b/tests/baselines/reference/computedPropertyNames10_ES6.js @@ -21,15 +21,26 @@ var s; var n; var a; var v = { - [s]() { }, - [n]() { }, - [s + s]() { }, - [s + n]() { }, - [+s]() { }, - [""]() { }, - [0]() { }, - [a]() { }, - [true]() { }, - [`hello bye`]() { }, - [`hello ${a} bye`]() { } + [s]() { + }, + [n]() { + }, + [s + s]() { + }, + [s + n]() { + }, + [+s]() { + }, + [""]() { + }, + [0]() { + }, + [a]() { + }, + [true]() { + }, + [`hello bye`]() { + }, + [`hello ${a} bye`]() { + } }; diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.js b/tests/baselines/reference/computedPropertyNames11_ES5.js index 69902003342..2b56eeb29f2 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.js +++ b/tests/baselines/reference/computedPropertyNames11_ES5.js @@ -21,16 +21,77 @@ var s; var n; var a; var v = (_a = {}, - _a[s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[n] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a[s + s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[s + n] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a[+s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[""] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a[0] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[a] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a[true] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a["hello bye"] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), - _a["hello " + a + " bye"] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), + _a[s] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[n] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a[s + s] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[s + n] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a[+s] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[""] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a[0] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[a] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a[true] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a["hello bye"] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), + _a["hello " + a + " bye"] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames11_ES6.js b/tests/baselines/reference/computedPropertyNames11_ES6.js index f1a774b88fe..63f786e4634 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES6.js +++ b/tests/baselines/reference/computedPropertyNames11_ES6.js @@ -21,15 +21,32 @@ var s; var n; var a; var v = { - get [s]() { return 0; }, - set [n](v) { }, - get [s + s]() { return 0; }, - set [s + n](v) { }, - get [+s]() { return 0; }, - set [""](v) { }, - get [0]() { return 0; }, - set [a](v) { }, - get [true]() { return 0; }, - set [`hello bye`](v) { }, - get [`hello ${a} bye`]() { return 0; } + get [s]() { + return 0; + }, + set [n](v) { + }, + get [s + s]() { + return 0; + }, + set [s + n](v) { + }, + get [+s]() { + return 0; + }, + set [""](v) { + }, + get [0]() { + return 0; + }, + set [a](v) { + }, + get [true]() { + return 0; + }, + set [`hello bye`](v) { + }, + get [`hello ${a} bye`]() { + return 0; + } }; diff --git a/tests/baselines/reference/computedPropertyNames13_ES5.js b/tests/baselines/reference/computedPropertyNames13_ES5.js index 89562162911..7933d6f9830 100644 --- a/tests/baselines/reference/computedPropertyNames13_ES5.js +++ b/tests/baselines/reference/computedPropertyNames13_ES5.js @@ -23,16 +23,27 @@ var a; var C = (function () { function C() { } - C.prototype[s] = function () { }; - C.prototype[n] = function () { }; - C[s + s] = function () { }; - C.prototype[s + n] = function () { }; - C.prototype[+s] = function () { }; - C[""] = function () { }; - C.prototype[0] = function () { }; - C.prototype[a] = function () { }; - C[true] = function () { }; - C.prototype["hello bye"] = function () { }; - C["hello " + a + " bye"] = function () { }; + C.prototype[s] = function () { + }; + C.prototype[n] = function () { + }; + C[s + s] = function () { + }; + C.prototype[s + n] = function () { + }; + C.prototype[+s] = function () { + }; + C[""] = function () { + }; + C.prototype[0] = function () { + }; + C.prototype[a] = function () { + }; + C[true] = function () { + }; + C.prototype["hello bye"] = function () { + }; + C["hello " + a + " bye"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames13_ES6.js b/tests/baselines/reference/computedPropertyNames13_ES6.js index b18ef3fb3e2..07aa1673aba 100644 --- a/tests/baselines/reference/computedPropertyNames13_ES6.js +++ b/tests/baselines/reference/computedPropertyNames13_ES6.js @@ -23,16 +23,27 @@ var a; var C = (function () { function C() { } - C.prototype[s] = function () { }; - C.prototype[n] = function () { }; - C[s + s] = function () { }; - C.prototype[s + n] = function () { }; - C.prototype[+s] = function () { }; - C[""] = function () { }; - C.prototype[0] = function () { }; - C.prototype[a] = function () { }; - C[true] = function () { }; - C.prototype[`hello bye`] = function () { }; - C[`hello ${a} bye`] = function () { }; + C.prototype[s] = function () { + }; + C.prototype[n] = function () { + }; + C[s + s] = function () { + }; + C.prototype[s + n] = function () { + }; + C.prototype[+s] = function () { + }; + C[""] = function () { + }; + C.prototype[0] = function () { + }; + C.prototype[a] = function () { + }; + C[true] = function () { + }; + C.prototype[`hello bye`] = function () { + }; + C[`hello ${a} bye`] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames14_ES5.js b/tests/baselines/reference/computedPropertyNames14_ES5.js index 5db5e842a2a..3a53e4106fc 100644 --- a/tests/baselines/reference/computedPropertyNames14_ES5.js +++ b/tests/baselines/reference/computedPropertyNames14_ES5.js @@ -14,11 +14,17 @@ var b; var C = (function () { function C() { } - C.prototype[b] = function () { }; - C[true] = function () { }; - C.prototype[[]] = function () { }; - C[{}] = function () { }; - C.prototype[undefined] = function () { }; - C[null] = function () { }; + C.prototype[b] = function () { + }; + C[true] = function () { + }; + C.prototype[[]] = function () { + }; + C[{}] = function () { + }; + C.prototype[undefined] = function () { + }; + C[null] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames14_ES6.js b/tests/baselines/reference/computedPropertyNames14_ES6.js index 94b4196a606..7a58ad9a80a 100644 --- a/tests/baselines/reference/computedPropertyNames14_ES6.js +++ b/tests/baselines/reference/computedPropertyNames14_ES6.js @@ -14,11 +14,17 @@ var b; var C = (function () { function C() { } - C.prototype[b] = function () { }; - C[true] = function () { }; - C.prototype[[]] = function () { }; - C[{}] = function () { }; - C.prototype[undefined] = function () { }; - C[null] = function () { }; + C.prototype[b] = function () { + }; + C[true] = function () { + }; + C.prototype[[]] = function () { + }; + C[{}] = function () { + }; + C.prototype[undefined] = function () { + }; + C[null] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames15_ES5.js b/tests/baselines/reference/computedPropertyNames15_ES5.js index 93258b64c75..7e0db9855dd 100644 --- a/tests/baselines/reference/computedPropertyNames15_ES5.js +++ b/tests/baselines/reference/computedPropertyNames15_ES5.js @@ -15,8 +15,11 @@ var p3; var C = (function () { function C() { } - C.prototype[p1] = function () { }; - C.prototype[p2] = function () { }; - C.prototype[p3] = function () { }; + C.prototype[p1] = function () { + }; + C.prototype[p2] = function () { + }; + C.prototype[p3] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames15_ES6.js b/tests/baselines/reference/computedPropertyNames15_ES6.js index ab7bf4552d6..70c2e7b451c 100644 --- a/tests/baselines/reference/computedPropertyNames15_ES6.js +++ b/tests/baselines/reference/computedPropertyNames15_ES6.js @@ -15,8 +15,11 @@ var p3; var C = (function () { function C() { } - C.prototype[p1] = function () { }; - C.prototype[p2] = function () { }; - C.prototype[p3] = function () { }; + C.prototype[p1] = function () { + }; + C.prototype[p2] = function () { + }; + C.prototype[p3] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames16_ES5.js b/tests/baselines/reference/computedPropertyNames16_ES5.js index 2c7316e1398..b8c4991bee4 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES5.js +++ b/tests/baselines/reference/computedPropertyNames16_ES5.js @@ -24,57 +24,74 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, n, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, s + s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, s + n, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, +s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 0, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, a, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, true, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "hello bye", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "hello " + a + " bye", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames16_ES6.js b/tests/baselines/reference/computedPropertyNames16_ES6.js index 369040e7e22..90f15f6cf2e 100644 --- a/tests/baselines/reference/computedPropertyNames16_ES6.js +++ b/tests/baselines/reference/computedPropertyNames16_ES6.js @@ -24,57 +24,74 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, n, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, s + s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, s + n, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, +s, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 0, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, a, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, true, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, `hello bye`, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, `hello ${a} bye`, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames17_ES5.js b/tests/baselines/reference/computedPropertyNames17_ES5.js index 3b5c100694d..33bc5bfd3c8 100644 --- a/tests/baselines/reference/computedPropertyNames17_ES5.js +++ b/tests/baselines/reference/computedPropertyNames17_ES5.js @@ -15,32 +15,41 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, b, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, true, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, [], { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, {}, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, undefined, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, null, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames17_ES6.js b/tests/baselines/reference/computedPropertyNames17_ES6.js index 38012efbb14..e9b19202e08 100644 --- a/tests/baselines/reference/computedPropertyNames17_ES6.js +++ b/tests/baselines/reference/computedPropertyNames17_ES6.js @@ -15,32 +15,41 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, b, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, true, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, [], { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, {}, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, undefined, { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, null, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames1_ES5.js b/tests/baselines/reference/computedPropertyNames1_ES5.js index 37e06616c2f..9acf507ecbc 100644 --- a/tests/baselines/reference/computedPropertyNames1_ES5.js +++ b/tests/baselines/reference/computedPropertyNames1_ES5.js @@ -6,7 +6,18 @@ var v = { //// [computedPropertyNames1_ES5.js] var v = (_a = {}, - _a[0 + 1] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a[0 + 1] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), + _a[0 + 1] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a[0 + 1] = Object.defineProperty({ + set: function (v) { + }, + enumerable: true, + configurable: true + }), _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames1_ES6.js b/tests/baselines/reference/computedPropertyNames1_ES6.js index 80a7d2ecdd2..86cdd9c4333 100644 --- a/tests/baselines/reference/computedPropertyNames1_ES6.js +++ b/tests/baselines/reference/computedPropertyNames1_ES6.js @@ -6,6 +6,9 @@ var v = { //// [computedPropertyNames1_ES6.js] var v = { - get [0 + 1]() { return 0; }, - set [0 + 1](v) { } //No error + get [0 + 1]() { + return 0; + }, + set [0 + 1](v) { + } //No error }; diff --git a/tests/baselines/reference/computedPropertyNames21_ES5.js b/tests/baselines/reference/computedPropertyNames21_ES5.js index 81f95cd824d..2678cdc2286 100644 --- a/tests/baselines/reference/computedPropertyNames21_ES5.js +++ b/tests/baselines/reference/computedPropertyNames21_ES5.js @@ -13,6 +13,7 @@ var C = (function () { C.prototype.bar = function () { return 0; }; - C.prototype[this.bar()] = function () { }; + C.prototype[this.bar()] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames21_ES6.js b/tests/baselines/reference/computedPropertyNames21_ES6.js index 34a1878f689..f51f6faed24 100644 --- a/tests/baselines/reference/computedPropertyNames21_ES6.js +++ b/tests/baselines/reference/computedPropertyNames21_ES6.js @@ -13,6 +13,7 @@ var C = (function () { C.prototype.bar = function () { return 0; }; - C.prototype[this.bar()] = function () { }; + C.prototype[this.bar()] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames22_ES5.js b/tests/baselines/reference/computedPropertyNames22_ES5.js index df12193250b..b28e0ea68e2 100644 --- a/tests/baselines/reference/computedPropertyNames22_ES5.js +++ b/tests/baselines/reference/computedPropertyNames22_ES5.js @@ -14,7 +14,8 @@ var C = (function () { } C.prototype.bar = function () { var obj = (_a = {}, - _a[this.bar()] = function () { }, + _a[this.bar()] = function () { + }, _a); return 0; var _a; diff --git a/tests/baselines/reference/computedPropertyNames22_ES6.js b/tests/baselines/reference/computedPropertyNames22_ES6.js index c5d58939fc8..9872605c20e 100644 --- a/tests/baselines/reference/computedPropertyNames22_ES6.js +++ b/tests/baselines/reference/computedPropertyNames22_ES6.js @@ -14,7 +14,8 @@ var C = (function () { } C.prototype.bar = function () { var obj = { - [this.bar()]() { } + [this.bar()]() { + } }; return 0; }; diff --git a/tests/baselines/reference/computedPropertyNames23_ES5.js b/tests/baselines/reference/computedPropertyNames23_ES5.js index 9e02999738c..c3024a7fbbf 100644 --- a/tests/baselines/reference/computedPropertyNames23_ES5.js +++ b/tests/baselines/reference/computedPropertyNames23_ES5.js @@ -17,7 +17,8 @@ var C = (function () { }; C.prototype[(_a = {}, _a[this.bar()] = 1, - _a)[0]] = function () { }; + _a)[0]] = function () { + }; return C; })(); var _a; diff --git a/tests/baselines/reference/computedPropertyNames23_ES6.js b/tests/baselines/reference/computedPropertyNames23_ES6.js index ad3e35dbb25..f5687952b88 100644 --- a/tests/baselines/reference/computedPropertyNames23_ES6.js +++ b/tests/baselines/reference/computedPropertyNames23_ES6.js @@ -15,6 +15,9 @@ var C = (function () { C.prototype.bar = function () { return 0; }; - C.prototype[{ [this.bar()]: 1 }[0]] = function () { }; + C.prototype[{ + [this.bar()]: 1 + }[0]] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames24_ES5.js b/tests/baselines/reference/computedPropertyNames24_ES5.js index 5b9fcbca992..d24f406c1ad 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES5.js +++ b/tests/baselines/reference/computedPropertyNames24_ES5.js @@ -32,6 +32,7 @@ var C = (function (_super) { } // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. - C.prototype[super.bar.call(this)] = function () { }; + C.prototype[super.bar.call(this)] = function () { + }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames24_ES6.js b/tests/baselines/reference/computedPropertyNames24_ES6.js index 58eb07cfb8d..12aef633963 100644 --- a/tests/baselines/reference/computedPropertyNames24_ES6.js +++ b/tests/baselines/reference/computedPropertyNames24_ES6.js @@ -32,6 +32,7 @@ var C = (function (_super) { } // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. - C.prototype[super.bar.call(this)] = function () { }; + C.prototype[super.bar.call(this)] = function () { + }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index f8196dd1307..4bcf877c571 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -35,7 +35,8 @@ var C = (function (_super) { } C.prototype.foo = function () { var obj = (_a = {}, - _a[_super.prototype.bar.call(this)] = function () { }, + _a[_super.prototype.bar.call(this)] = function () { + }, _a); return 0; var _a; diff --git a/tests/baselines/reference/computedPropertyNames25_ES6.js b/tests/baselines/reference/computedPropertyNames25_ES6.js index 020582c9497..1a600df5040 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES6.js +++ b/tests/baselines/reference/computedPropertyNames25_ES6.js @@ -35,7 +35,8 @@ var C = (function (_super) { } C.prototype.foo = function () { var obj = { - [_super.prototype.bar.call(this)]() { } + [_super.prototype.bar.call(this)]() { + } }; return 0; }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 037bd8786e6..217a0dfc74c 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -36,7 +36,8 @@ var C = (function (_super) { // use of super in static properties initializers. C.prototype[(_a = {}, _a[super.bar.call(this)] = 1, - _a)[0]] = function () { }; + _a)[0]] = function () { + }; return C; })(Base); var _a; diff --git a/tests/baselines/reference/computedPropertyNames26_ES6.js b/tests/baselines/reference/computedPropertyNames26_ES6.js index dadc6a29e80..fc53d91e627 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES6.js +++ b/tests/baselines/reference/computedPropertyNames26_ES6.js @@ -34,6 +34,9 @@ var C = (function (_super) { } // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. - C.prototype[{ [super.bar.call(this)]: 1 }[0]] = function () { }; + C.prototype[{ + [super.bar.call(this)]: 1 + }[0]] = function () { + }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames27_ES5.js b/tests/baselines/reference/computedPropertyNames27_ES5.js index df1fed09724..2f550731dfb 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES5.js +++ b/tests/baselines/reference/computedPropertyNames27_ES5.js @@ -22,6 +22,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype[(_super.call(this), "prop")] = function () { }; + C.prototype[(_super.call(this), "prop")] = function () { + }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames27_ES6.js b/tests/baselines/reference/computedPropertyNames27_ES6.js index a78f13cda20..54a20a52200 100644 --- a/tests/baselines/reference/computedPropertyNames27_ES6.js +++ b/tests/baselines/reference/computedPropertyNames27_ES6.js @@ -22,6 +22,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype[(_super.call(this), "prop")] = function () { }; + C.prototype[(_super.call(this), "prop")] = function () { + }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index b88cb0dfaf9..418252784a2 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -27,7 +27,8 @@ var C = (function (_super) { function C() { _super.call(this); var obj = (_a = {}, - _a[(_super.call(this), "prop")] = function () { }, + _a[(_super.call(this), "prop")] = function () { + }, _a); var _a; } diff --git a/tests/baselines/reference/computedPropertyNames28_ES6.js b/tests/baselines/reference/computedPropertyNames28_ES6.js index 5656d96de87..09e1b33bf98 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES6.js +++ b/tests/baselines/reference/computedPropertyNames28_ES6.js @@ -27,7 +27,8 @@ var C = (function (_super) { function C() { _super.call(this); var obj = { - [(_super.call(this), "prop")]() { } + [(_super.call(this), "prop")]() { + } }; } return C; diff --git a/tests/baselines/reference/computedPropertyNames29_ES5.js b/tests/baselines/reference/computedPropertyNames29_ES5.js index 022c930ab67..93a80128d98 100644 --- a/tests/baselines/reference/computedPropertyNames29_ES5.js +++ b/tests/baselines/reference/computedPropertyNames29_ES5.js @@ -18,7 +18,8 @@ var C = (function () { var _this = this; (function () { var obj = (_a = {}, - _a[_this.bar()] = function () { }, + _a[_this.bar()] = function () { + }, _a); var _a; }); diff --git a/tests/baselines/reference/computedPropertyNames29_ES6.js b/tests/baselines/reference/computedPropertyNames29_ES6.js index d01b6fd3b7f..e1e6be51b21 100644 --- a/tests/baselines/reference/computedPropertyNames29_ES6.js +++ b/tests/baselines/reference/computedPropertyNames29_ES6.js @@ -17,7 +17,8 @@ var C = (function () { C.prototype.bar = function () { (() => { var obj = { - [this.bar()]() { } // needs capture + [this.bar()]() { + } // needs capture }; }); return 0; diff --git a/tests/baselines/reference/computedPropertyNames2_ES5.js b/tests/baselines/reference/computedPropertyNames2_ES5.js index 581b581d87b..97d9a673bbb 100644 --- a/tests/baselines/reference/computedPropertyNames2_ES5.js +++ b/tests/baselines/reference/computedPropertyNames2_ES5.js @@ -16,25 +16,31 @@ var accessorName = "accessor"; var C = (function () { function C() { } - C.prototype[methodName] = function () { }; - C[methodName] = function () { }; + C.prototype[methodName] = function () { + }; + C[methodName] = function () { + }; Object.defineProperty(C.prototype, accessorName, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, accessorName, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, accessorName, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C, accessorName, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames2_ES6.js b/tests/baselines/reference/computedPropertyNames2_ES6.js index b58b1a6f077..e5fcfaac8f9 100644 --- a/tests/baselines/reference/computedPropertyNames2_ES6.js +++ b/tests/baselines/reference/computedPropertyNames2_ES6.js @@ -16,25 +16,31 @@ var accessorName = "accessor"; var C = (function () { function C() { } - C.prototype[methodName] = function () { }; - C[methodName] = function () { }; + C.prototype[methodName] = function () { + }; + C[methodName] = function () { + }; Object.defineProperty(C.prototype, accessorName, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, accessorName, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, accessorName, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C, accessorName, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index fd63a192d07..b11b651a0d5 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -33,7 +33,8 @@ var C = (function (_super) { _super.call(this); (function () { var obj = (_a = {}, - _a[(_super.call(this), "prop")] = function () { }, + _a[(_super.call(this), "prop")] = function () { + }, _a); var _a; }); diff --git a/tests/baselines/reference/computedPropertyNames30_ES6.js b/tests/baselines/reference/computedPropertyNames30_ES6.js index 0c4f259fe48..c88fa98be5e 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES6.js +++ b/tests/baselines/reference/computedPropertyNames30_ES6.js @@ -36,7 +36,8 @@ var C = (function (_super) { // Ideally, we would capture this. But the reference is // illegal, and not capturing this is consistent with //treatment of other similar violations. - [(_super.call(this), "prop")]() { } + [(_super.call(this), "prop")]() { + } }; }); } diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 8a3c1a3f6c5..a079b3fa449 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -39,7 +39,8 @@ var C = (function (_super) { var _this = this; (function () { var obj = (_a = {}, - _a[_super.prototype.bar.call(_this)] = function () { }, + _a[_super.prototype.bar.call(_this)] = function () { + }, _a); var _a; }); diff --git a/tests/baselines/reference/computedPropertyNames31_ES6.js b/tests/baselines/reference/computedPropertyNames31_ES6.js index 0f7d72818fe..33f5319ded9 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES6.js +++ b/tests/baselines/reference/computedPropertyNames31_ES6.js @@ -39,7 +39,8 @@ var C = (function (_super) { var _this = this; (() => { var obj = { - [_super.prototype.bar.call(_this)]() { } // needs capture + [_super.prototype.bar.call(_this)]() { + } // needs capture }; }); return 0; diff --git a/tests/baselines/reference/computedPropertyNames32_ES5.js b/tests/baselines/reference/computedPropertyNames32_ES5.js index a0d8b066b5c..5a541202582 100644 --- a/tests/baselines/reference/computedPropertyNames32_ES5.js +++ b/tests/baselines/reference/computedPropertyNames32_ES5.js @@ -8,13 +8,16 @@ class C { } //// [computedPropertyNames32_ES5.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.prototype.bar = function () { return 0; }; - C.prototype[foo()] = function () { }; + C.prototype[foo()] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames32_ES6.js b/tests/baselines/reference/computedPropertyNames32_ES6.js index 69d2a40edce..a87f7715d89 100644 --- a/tests/baselines/reference/computedPropertyNames32_ES6.js +++ b/tests/baselines/reference/computedPropertyNames32_ES6.js @@ -8,13 +8,16 @@ class C { } //// [computedPropertyNames32_ES6.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.prototype.bar = function () { return 0; }; - C.prototype[foo()] = function () { }; + C.prototype[foo()] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames33_ES5.js b/tests/baselines/reference/computedPropertyNames33_ES5.js index 3d7c70a9256..24362351196 100644 --- a/tests/baselines/reference/computedPropertyNames33_ES5.js +++ b/tests/baselines/reference/computedPropertyNames33_ES5.js @@ -10,13 +10,16 @@ class C { } //// [computedPropertyNames33_ES5.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.prototype.bar = function () { var obj = (_a = {}, - _a[foo()] = function () { }, + _a[foo()] = function () { + }, _a); return 0; var _a; diff --git a/tests/baselines/reference/computedPropertyNames33_ES6.js b/tests/baselines/reference/computedPropertyNames33_ES6.js index 768af6fd403..03c503caec4 100644 --- a/tests/baselines/reference/computedPropertyNames33_ES6.js +++ b/tests/baselines/reference/computedPropertyNames33_ES6.js @@ -10,13 +10,16 @@ class C { } //// [computedPropertyNames33_ES6.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.prototype.bar = function () { var obj = { - [foo()]() { } + [foo()]() { + } }; return 0; }; diff --git a/tests/baselines/reference/computedPropertyNames34_ES5.js b/tests/baselines/reference/computedPropertyNames34_ES5.js index fd46b144fa5..83e757222b0 100644 --- a/tests/baselines/reference/computedPropertyNames34_ES5.js +++ b/tests/baselines/reference/computedPropertyNames34_ES5.js @@ -10,13 +10,16 @@ class C { } //// [computedPropertyNames34_ES5.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.bar = function () { var obj = (_a = {}, - _a[foo()] = function () { }, + _a[foo()] = function () { + }, _a); return 0; var _a; diff --git a/tests/baselines/reference/computedPropertyNames34_ES6.js b/tests/baselines/reference/computedPropertyNames34_ES6.js index 09cccb0e7f4..62e2e151cd3 100644 --- a/tests/baselines/reference/computedPropertyNames34_ES6.js +++ b/tests/baselines/reference/computedPropertyNames34_ES6.js @@ -10,13 +10,16 @@ class C { } //// [computedPropertyNames34_ES6.js] -function foo() { return ''; } +function foo() { + return ''; +} var C = (function () { function C() { } C.bar = function () { var obj = { - [foo()]() { } + [foo()]() { + } }; return 0; }; diff --git a/tests/baselines/reference/computedPropertyNames35_ES5.js b/tests/baselines/reference/computedPropertyNames35_ES5.js index 0804c946f1f..b55743a2d83 100644 --- a/tests/baselines/reference/computedPropertyNames35_ES5.js +++ b/tests/baselines/reference/computedPropertyNames35_ES5.js @@ -6,4 +6,6 @@ interface I { } //// [computedPropertyNames35_ES5.js] -function foo() { return ''; } +function foo() { + return ''; +} diff --git a/tests/baselines/reference/computedPropertyNames35_ES6.js b/tests/baselines/reference/computedPropertyNames35_ES6.js index 2d3f4088315..b08d7c0f312 100644 --- a/tests/baselines/reference/computedPropertyNames35_ES6.js +++ b/tests/baselines/reference/computedPropertyNames35_ES6.js @@ -6,4 +6,6 @@ interface I { } //// [computedPropertyNames35_ES6.js] -function foo() { return ''; } +function foo() { + return ''; +} diff --git a/tests/baselines/reference/computedPropertyNames36_ES5.js b/tests/baselines/reference/computedPropertyNames36_ES5.js index 5519a6d284c..fa92da7b7b6 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES5.js +++ b/tests/baselines/reference/computedPropertyNames36_ES5.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames36_ES6.js b/tests/baselines/reference/computedPropertyNames36_ES6.js index 09bab9a2630..5b71326fbc4 100644 --- a/tests/baselines/reference/computedPropertyNames36_ES6.js +++ b/tests/baselines/reference/computedPropertyNames36_ES6.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames37_ES5.js b/tests/baselines/reference/computedPropertyNames37_ES5.js index 54a7243f3fa..f185e93db3c 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES5.js +++ b/tests/baselines/reference/computedPropertyNames37_ES5.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames37_ES6.js b/tests/baselines/reference/computedPropertyNames37_ES6.js index c824f15ef54..992035f6865 100644 --- a/tests/baselines/reference/computedPropertyNames37_ES6.js +++ b/tests/baselines/reference/computedPropertyNames37_ES6.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames38_ES5.js b/tests/baselines/reference/computedPropertyNames38_ES5.js index 49af4d00d51..42115927b30 100644 --- a/tests/baselines/reference/computedPropertyNames38_ES5.js +++ b/tests/baselines/reference/computedPropertyNames38_ES5.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, 1 << 6, { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames38_ES6.js b/tests/baselines/reference/computedPropertyNames38_ES6.js index 9dde7da09de..0fdcdb1d63c 100644 --- a/tests/baselines/reference/computedPropertyNames38_ES6.js +++ b/tests/baselines/reference/computedPropertyNames38_ES6.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, 1 << 6, { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames39_ES5.js b/tests/baselines/reference/computedPropertyNames39_ES5.js index 1b8d3aab2ff..12cc55f1315 100644 --- a/tests/baselines/reference/computedPropertyNames39_ES5.js +++ b/tests/baselines/reference/computedPropertyNames39_ES5.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, 1 << 6, { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames39_ES6.js b/tests/baselines/reference/computedPropertyNames39_ES6.js index d0d21f201bb..8e458ad83d7 100644 --- a/tests/baselines/reference/computedPropertyNames39_ES6.js +++ b/tests/baselines/reference/computedPropertyNames39_ES6.js @@ -26,12 +26,15 @@ var C = (function () { } Object.defineProperty(C.prototype, 1 << 6, { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames3_ES5.js b/tests/baselines/reference/computedPropertyNames3_ES5.js index f5a063f91e6..09440d5601f 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES5.js +++ b/tests/baselines/reference/computedPropertyNames3_ES5.js @@ -14,25 +14,35 @@ var id; var C = (function () { function C() { } - C.prototype[0 + 1] = function () { }; - C[function () { }] = function () { }; + C.prototype[0 + 1] = function () { + }; + C[function () { + }] = function () { + }; Object.defineProperty(C.prototype, delete id, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, [0, 1], { - set: function (v) { }, + Object.defineProperty(C.prototype, [ + 0, + 1 + ], { + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C, id.toString(), { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames3_ES6.js b/tests/baselines/reference/computedPropertyNames3_ES6.js index 672d90d7b45..1a9c9ee465b 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES6.js +++ b/tests/baselines/reference/computedPropertyNames3_ES6.js @@ -14,25 +14,35 @@ var id; var C = (function () { function C() { } - C.prototype[0 + 1] = function () { }; - C[() => { }] = function () { }; + C.prototype[0 + 1] = function () { + }; + C[() => { + }] = function () { + }; Object.defineProperty(C.prototype, delete id, { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, [0, 1], { - set: function (v) { }, + Object.defineProperty(C.prototype, [ + 0, + 1 + ], { + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); Object.defineProperty(C, id.toString(), { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames40_ES5.js b/tests/baselines/reference/computedPropertyNames40_ES5.js index e8063762026..887c5c3847e 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES5.js +++ b/tests/baselines/reference/computedPropertyNames40_ES5.js @@ -25,7 +25,11 @@ var C = (function () { function C() { } // Computed properties - C.prototype[""] = function () { return new Foo; }; - C.prototype[""] = function () { return new Foo2; }; + C.prototype[""] = function () { + return new Foo; + }; + C.prototype[""] = function () { + return new Foo2; + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames40_ES6.js b/tests/baselines/reference/computedPropertyNames40_ES6.js index 208be7760a9..99d28688a29 100644 --- a/tests/baselines/reference/computedPropertyNames40_ES6.js +++ b/tests/baselines/reference/computedPropertyNames40_ES6.js @@ -25,7 +25,11 @@ var C = (function () { function C() { } // Computed properties - C.prototype[""] = function () { return new Foo; }; - C.prototype[""] = function () { return new Foo2; }; + C.prototype[""] = function () { + return new Foo; + }; + C.prototype[""] = function () { + return new Foo2; + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames41_ES5.js b/tests/baselines/reference/computedPropertyNames41_ES5.js index 7d7c390bf3e..b4223ec5217 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES5.js +++ b/tests/baselines/reference/computedPropertyNames41_ES5.js @@ -24,6 +24,8 @@ var C = (function () { function C() { } // Computed properties - C[""] = function () { return new Foo; }; + C[""] = function () { + return new Foo; + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames41_ES6.js b/tests/baselines/reference/computedPropertyNames41_ES6.js index 050079017c0..f0c386706a3 100644 --- a/tests/baselines/reference/computedPropertyNames41_ES6.js +++ b/tests/baselines/reference/computedPropertyNames41_ES6.js @@ -24,6 +24,8 @@ var C = (function () { function C() { } // Computed properties - C[""] = function () { return new Foo; }; + C[""] = function () { + return new Foo; + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames43_ES5.js b/tests/baselines/reference/computedPropertyNames43_ES5.js index b689f02ee98..f7faa347986 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES5.js +++ b/tests/baselines/reference/computedPropertyNames43_ES5.js @@ -41,12 +41,15 @@ var D = (function (_super) { } Object.defineProperty(D.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames43_ES6.js b/tests/baselines/reference/computedPropertyNames43_ES6.js index 4b64a4c803b..ba0c228c307 100644 --- a/tests/baselines/reference/computedPropertyNames43_ES6.js +++ b/tests/baselines/reference/computedPropertyNames43_ES6.js @@ -41,12 +41,15 @@ var D = (function (_super) { } Object.defineProperty(D.prototype, "get1", { // Computed properties - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames44_ES5.js b/tests/baselines/reference/computedPropertyNames44_ES5.js index 32d3505e252..072b3e90681 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES5.js +++ b/tests/baselines/reference/computedPropertyNames44_ES5.js @@ -32,7 +32,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "get1", { - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); @@ -44,7 +46,8 @@ var D = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames44_ES6.js b/tests/baselines/reference/computedPropertyNames44_ES6.js index 9cf11f3b337..72729054e07 100644 --- a/tests/baselines/reference/computedPropertyNames44_ES6.js +++ b/tests/baselines/reference/computedPropertyNames44_ES6.js @@ -32,7 +32,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "get1", { - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); @@ -44,7 +46,8 @@ var D = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames45_ES5.js b/tests/baselines/reference/computedPropertyNames45_ES5.js index 3d924b00b73..4389b32a835 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES5.js +++ b/tests/baselines/reference/computedPropertyNames45_ES5.js @@ -33,7 +33,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "get1", { - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); @@ -45,7 +47,8 @@ var D = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames45_ES6.js b/tests/baselines/reference/computedPropertyNames45_ES6.js index 2e7992fe260..23dccc77956 100644 --- a/tests/baselines/reference/computedPropertyNames45_ES6.js +++ b/tests/baselines/reference/computedPropertyNames45_ES6.js @@ -33,7 +33,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "get1", { - get: function () { return new Foo; }, + get: function () { + return new Foo; + }, enumerable: true, configurable: true }); @@ -45,7 +47,8 @@ var D = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(D.prototype, "set1", { - set: function (p) { }, + set: function (p) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames49_ES5.js b/tests/baselines/reference/computedPropertyNames49_ES5.js index 5f952c6f3f1..27730d56df8 100644 --- a/tests/baselines/reference/computedPropertyNames49_ES5.js +++ b/tests/baselines/reference/computedPropertyNames49_ES5.js @@ -30,21 +30,37 @@ var x = (_a = { p1: 10 }, _a.p1 = 10, - _a[1 + 1] = Object.defineProperty({ get: function () { + _a[1 + 1] = Object.defineProperty({ + get: function () { throw 10; - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ get: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + get: function () { return 10; - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ set: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + set: function () { // just throw throw 10; - }, enumerable: true, configurable: true }), - _a.foo = Object.defineProperty({ get: function () { + }, + enumerable: true, + configurable: true + }), + _a.foo = Object.defineProperty({ + get: function () { if (1 == 1) { return 10; } - }, enumerable: true, configurable: true }), + }, + enumerable: true, + configurable: true + }), _a.p2 = 20, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames50_ES5.js b/tests/baselines/reference/computedPropertyNames50_ES5.js index 32502d80e0a..4221a21a763 100644 --- a/tests/baselines/reference/computedPropertyNames50_ES5.js +++ b/tests/baselines/reference/computedPropertyNames50_ES5.js @@ -35,21 +35,37 @@ var x = (_a = { } }, _a.p1 = 10, - _a.foo = Object.defineProperty({ get: function () { + _a.foo = Object.defineProperty({ + get: function () { if (1 == 1) { return 10; } - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ get: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + get: function () { throw 10; - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ set: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + set: function () { // just throw throw 10; - }, enumerable: true, configurable: true }), - _a[1 + 1] = Object.defineProperty({ get: function () { + }, + enumerable: true, + configurable: true + }), + _a[1 + 1] = Object.defineProperty({ + get: function () { return 10; - }, enumerable: true, configurable: true }), + }, + enumerable: true, + configurable: true + }), _a.p2 = 20, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames9_ES5.js b/tests/baselines/reference/computedPropertyNames9_ES5.js index b1ac6c9e3b6..1b4fa16de2d 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES5.js +++ b/tests/baselines/reference/computedPropertyNames9_ES5.js @@ -11,7 +11,8 @@ var v = { } //// [computedPropertyNames9_ES5.js] -function f(x) { } +function f(x) { +} var v = (_a = {}, _a[f("")] = 0, _a[f(0)] = 0, diff --git a/tests/baselines/reference/computedPropertyNames9_ES6.js b/tests/baselines/reference/computedPropertyNames9_ES6.js index b0e66c81cbd..8f111935b06 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES6.js +++ b/tests/baselines/reference/computedPropertyNames9_ES6.js @@ -11,7 +11,8 @@ var v = { } //// [computedPropertyNames9_ES6.js] -function f(x) { } +function f(x) { +} var v = { [f("")]: 0, [f(0)]: 0, diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js index 1ee88351154..a74e04937c0 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js @@ -11,7 +11,11 @@ var o: I = { //// [computedPropertyNamesContextualType1_ES5.js] var o = (_a = {}, - _a["" + 0] = function (y) { return y.length; }, - _a["" + 1] = function (y) { return y.length; }, + _a["" + 0] = function (y) { + return y.length; + }, + _a["" + 1] = function (y) { + return y.length; + }, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.js index 4c4dfb9f9a6..b202d656b73 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.js @@ -11,6 +11,8 @@ var o: I = { //// [computedPropertyNamesContextualType1_ES6.js] var o = { - ["" + 0](y) { return y.length; }, + ["" + 0](y) { + return y.length; + }, ["" + 1]: y => y.length }; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js index 6be09e4bef3..b33ff276fcd 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js @@ -11,7 +11,11 @@ var o: I = { //// [computedPropertyNamesContextualType2_ES5.js] var o = (_a = {}, - _a[+"foo"] = function (y) { return y.length; }, - _a[+"bar"] = function (y) { return y.length; }, + _a[+"foo"] = function (y) { + return y.length; + }, + _a[+"bar"] = function (y) { + return y.length; + }, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.js index 1f0704ce8a7..6be2c11cc5e 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.js @@ -11,6 +11,8 @@ var o: I = { //// [computedPropertyNamesContextualType2_ES6.js] var o = { - [+"foo"](y) { return y.length; }, + [+"foo"](y) { + return y.length; + }, [+"bar"]: y => y.length }; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js index b510cda2916..c3f189a5780 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js @@ -10,7 +10,11 @@ var o: I = { //// [computedPropertyNamesContextualType3_ES5.js] var o = (_a = {}, - _a[+"foo"] = function (y) { return y.length; }, - _a[+"bar"] = function (y) { return y.length; }, + _a[+"foo"] = function (y) { + return y.length; + }, + _a[+"bar"] = function (y) { + return y.length; + }, _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.js index 08d39bbeae3..6124271a576 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.js @@ -10,6 +10,8 @@ var o: I = { //// [computedPropertyNamesContextualType3_ES6.js] var o = { - [+"foo"](y) { return y.length; }, + [+"foo"](y) { + return y.length; + }, [+"bar"]: y => y.length }; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js index f50231e3f0f..d60690a249e 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js @@ -16,12 +16,16 @@ foo({ //// [computedPropertyNamesContextualType6_ES5.js] foo((_a = { p: "", - 0: function () { } + 0: function () { + } }, _a.p = "", - _a[0] = function () { }, + _a[0] = function () { + }, _a["hi" + "bye"] = true, _a[0 + 1] = 0, - _a[+"hi"] = [0], + _a[+"hi"] = [ + 0 + ], _a)); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.js index 1360cc20028..e7218fff232 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES6.js @@ -16,8 +16,11 @@ foo({ //// [computedPropertyNamesContextualType6_ES6.js] foo({ p: "", - 0: () => { }, + 0: () => { + }, ["hi" + "bye"]: true, [0 + 1]: 0, - [+"hi"]: [0] + [+"hi"]: [ + 0 + ] }); diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js index e1c567c62d9..02c2ffa734a 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js @@ -16,12 +16,16 @@ foo({ //// [computedPropertyNamesContextualType7_ES5.js] foo((_a = { p: "", - 0: function () { } + 0: function () { + } }, _a.p = "", - _a[0] = function () { }, + _a[0] = function () { + }, _a["hi" + "bye"] = true, _a[0 + 1] = 0, - _a[+"hi"] = [0], + _a[+"hi"] = [ + 0 + ], _a)); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.js b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.js index 185ccd72ead..d6b50e93aeb 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES6.js @@ -16,8 +16,11 @@ foo({ //// [computedPropertyNamesContextualType7_ES6.js] foo({ p: "", - 0: () => { }, + 0: () => { + }, ["hi" + "bye"]: true, [0 + 1]: 0, - [+"hi"]: [0] + [+"hi"]: [ + 0 + ] }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js index 84b92f6c92d..c091003735c 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES5.js @@ -9,14 +9,18 @@ class C { var C = (function () { function C() { } - C.prototype["" + ""] = function () { }; + C.prototype["" + ""] = function () { + }; Object.defineProperty(C.prototype, "" + "", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "" + "", { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js index b7505212baf..eb7dab0b660 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1_ES6.js @@ -9,14 +9,18 @@ class C { var C = (function () { function C() { } - C.prototype["" + ""] = function () { }; + C.prototype["" + ""] = function () { + }; Object.defineProperty(C.prototype, "" + "", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "" + "", { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js index 9847ea8b7ef..22a5b0d305d 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES5.js @@ -9,14 +9,18 @@ class C { var C = (function () { function C() { } - C["" + ""] = function () { }; + C["" + ""] = function () { + }; Object.defineProperty(C, "" + "", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "" + "", { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js index 9cd90493ea6..3912113905c 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2_ES6.js @@ -9,14 +9,18 @@ class C { var C = (function () { function C() { } - C["" + ""] = function () { }; + C["" + ""] = function () { + }; Object.defineProperty(C, "" + "", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "" + "", { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js index 58c3133e6ee..047a8cdb333 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js @@ -9,9 +9,21 @@ var v = { //// [computedPropertyNamesDeclarationEmit5_ES5.js] var v = (_a = {}, _a["" + ""] = 0, - _a["" + ""] = function () { }, - _a["" + ""] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), - _a["" + ""] = Object.defineProperty({ set: function (x) { }, enumerable: true, configurable: true }), + _a["" + ""] = function () { + }, + _a["" + ""] = Object.defineProperty({ + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }), + _a["" + ""] = Object.defineProperty({ + set: function (x) { + }, + enumerable: true, + configurable: true + }), _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js index e19ac43656e..0ae3eaf62b5 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES6.js @@ -9,9 +9,13 @@ var v = { //// [computedPropertyNamesDeclarationEmit5_ES6.js] var v = { ["" + ""]: 0, - ["" + ""]() { }, - get ["" + ""]() { return 0; }, - set ["" + ""](x) { } + ["" + ""]() { + }, + get ["" + ""]() { + return 0; + }, + set ["" + ""](x) { + } }; diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.js b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.js index 1470605413a..c922b87f470 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES5.js @@ -13,6 +13,7 @@ var accessorName = "accessor"; var C = (function () { function C() { } - C.prototype[methodName] = function (v) { }; + C.prototype[methodName] = function (v) { + }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js index 1cbddb58dc2..264a6a75074 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads_ES6.js @@ -13,6 +13,7 @@ var accessorName = "accessor"; var C = (function () { function C() { } - C.prototype[methodName] = function (v) { }; + C.prototype[methodName] = function (v) { + }; return C; })(); diff --git a/tests/baselines/reference/concatError.js b/tests/baselines/reference/concatError.js index dee3d8a30e3..1b7ff27be68 100644 --- a/tests/baselines/reference/concatError.js +++ b/tests/baselines/reference/concatError.js @@ -41,7 +41,9 @@ interface Array { } */ var fa; -fa = fa.concat([0]); +fa = fa.concat([ + 0 +]); fa = fa.concat(0); /* diff --git a/tests/baselines/reference/conditionalExpressionNewLine10.js b/tests/baselines/reference/conditionalExpressionNewLine10.js index bb2f3bec231..ea1d07e1a8a 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine10.js +++ b/tests/baselines/reference/conditionalExpressionNewLine10.js @@ -8,10 +8,4 @@ var v = a : g; //// [conditionalExpressionNewLine10.js] -var v = a - ? b - ? d - : e - : c - ? f - : g; +var v = a ? b ? d : e : c ? f : g; diff --git a/tests/baselines/reference/conditionalExpressionNewLine2.js b/tests/baselines/reference/conditionalExpressionNewLine2.js index e69f2004ebc..ca997a49a1c 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine2.js +++ b/tests/baselines/reference/conditionalExpressionNewLine2.js @@ -3,5 +3,4 @@ var v = a ? b : c; //// [conditionalExpressionNewLine2.js] -var v = a - ? b : c; +var v = a ? b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine3.js b/tests/baselines/reference/conditionalExpressionNewLine3.js index 4d11f45368f..ba2f565b235 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine3.js +++ b/tests/baselines/reference/conditionalExpressionNewLine3.js @@ -3,5 +3,4 @@ var v = a ? b : c; //// [conditionalExpressionNewLine3.js] -var v = a ? - b : c; +var v = a ? b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine4.js b/tests/baselines/reference/conditionalExpressionNewLine4.js index d6532ecb15b..33e5dc11a0d 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine4.js +++ b/tests/baselines/reference/conditionalExpressionNewLine4.js @@ -3,5 +3,4 @@ var v = a ? b : c; //// [conditionalExpressionNewLine4.js] -var v = a ? b : - c; +var v = a ? b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine5.js b/tests/baselines/reference/conditionalExpressionNewLine5.js index 6fdd0735bcd..7a837a0f05e 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine5.js +++ b/tests/baselines/reference/conditionalExpressionNewLine5.js @@ -3,5 +3,4 @@ var v = a ? b : c; //// [conditionalExpressionNewLine5.js] -var v = a ? b - : c; +var v = a ? b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine6.js b/tests/baselines/reference/conditionalExpressionNewLine6.js index 94539ab891e..cd24a9b880a 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine6.js +++ b/tests/baselines/reference/conditionalExpressionNewLine6.js @@ -4,6 +4,4 @@ var v = a : c; //// [conditionalExpressionNewLine6.js] -var v = a - ? b - : c; +var v = a ? b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine7.js b/tests/baselines/reference/conditionalExpressionNewLine7.js index 5c781f7d85a..fd2176f1b01 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine7.js +++ b/tests/baselines/reference/conditionalExpressionNewLine7.js @@ -4,6 +4,4 @@ var v = a ? c; //// [conditionalExpressionNewLine7.js] -var v = a ? - b : - c; +var v = a ? b : c; diff --git a/tests/baselines/reference/conditionalExpressionNewLine8.js b/tests/baselines/reference/conditionalExpressionNewLine8.js index 61372eeadbc..1319a6df832 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine8.js +++ b/tests/baselines/reference/conditionalExpressionNewLine8.js @@ -4,6 +4,4 @@ var v = a : c ? f : g; //// [conditionalExpressionNewLine8.js] -var v = a - ? b ? d : e - : c ? f : g; +var v = a ? b ? d : e : c ? f : g; diff --git a/tests/baselines/reference/conditionalExpressionNewLine9.js b/tests/baselines/reference/conditionalExpressionNewLine9.js index 79f4606754e..ea43207859c 100644 --- a/tests/baselines/reference/conditionalExpressionNewLine9.js +++ b/tests/baselines/reference/conditionalExpressionNewLine9.js @@ -6,8 +6,4 @@ var v = a ? f : g; //// [conditionalExpressionNewLine9.js] -var v = a - ? b - ? d : e - : c - ? f : g; +var v = a ? b ? d : e : c ? f : g; diff --git a/tests/baselines/reference/conditionalExpressions2.js b/tests/baselines/reference/conditionalExpressions2.js index 6749a2c0ac0..5510a78ad6e 100644 --- a/tests/baselines/reference/conditionalExpressions2.js +++ b/tests/baselines/reference/conditionalExpressions2.js @@ -16,11 +16,22 @@ var c = false ? 1 : 0; var d = false ? false : true; var e = false ? "foo" : "bar"; var f = false ? null : undefined; -var g = true ? { g: 5 } : null; -var h = [{ h: 5 }, null]; -function i() { if (true) { - return { x: 5 }; +var g = true ? { + g: 5 +} : null; +var h = [ + { + h: 5 + }, + null +]; +function i() { + if (true) { + return { + x: 5 + }; + } + else { + return null; + } } -else { - return null; -} } diff --git a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.js b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.js index f8fbe708e1a..1cd71e68873 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.js +++ b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.js @@ -91,9 +91,15 @@ condNumber ? exprString1 : exprBoolean1; // Union 1000000000000 ? exprIsObject1 : exprIsObject2; 10000 ? exprString1 : exprBoolean1; // Union //Cond is a number type expression -function foo() { return 1; } +function foo() { + return 1; +} ; -var array = [1, 2, 3]; +var array = [ + 1, + 2, + 3 +]; 1 * 0 ? exprAny1 : exprAny2; 1 + 1 ? exprBoolean1 : exprBoolean2; "string".length ? exprNumber1 : exprNumber2; diff --git a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js index b2830e4d1d6..17f64c71421 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js +++ b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js @@ -77,7 +77,8 @@ var exprBoolean2; var exprNumber2; var exprString2; var exprIsObject2; -function foo() { } +function foo() { +} ; var C = (function () { function C() { @@ -93,12 +94,25 @@ condObject ? exprString1 : exprString2; condObject ? exprIsObject1 : exprIsObject2; condObject ? exprString1 : exprBoolean1; // union //Cond is an object type literal -(function (a) { return a.length; }) ? exprAny1 : exprAny2; -(function (a) { return a.length; }) ? exprBoolean1 : exprBoolean2; +(function (a) { + return a.length; +}) ? exprAny1 : exprAny2; +(function (a) { + return a.length; +}) ? exprBoolean1 : exprBoolean2; ({}) ? exprNumber1 : exprNumber2; -({ a: 1, b: "s" }) ? exprString1 : exprString2; -({ a: 1, b: "s" }) ? exprIsObject1 : exprIsObject2; -({ a: 1, b: "s" }) ? exprString1 : exprBoolean1; // union +({ + a: 1, + b: "s" +}) ? exprString1 : exprString2; +({ + a: 1, + b: "s" +}) ? exprIsObject1 : exprIsObject2; +({ + a: 1, + b: "s" +}) ? exprString1 : exprBoolean1; // union //Cond is an object type expression foo() ? exprAny1 : exprAny2; new Date() ? exprBoolean1 : exprBoolean2; @@ -113,12 +127,25 @@ var resultIsNumber1 = condObject ? exprNumber1 : exprNumber2; var resultIsString1 = condObject ? exprString1 : exprString2; var resultIsObject1 = condObject ? exprIsObject1 : exprIsObject2; var resultIsStringOrBoolean1 = condObject ? exprString1 : exprBoolean1; // union -var resultIsAny2 = (function (a) { return a.length; }) ? exprAny1 : exprAny2; -var resultIsBoolean2 = (function (a) { return a.length; }) ? exprBoolean1 : exprBoolean2; +var resultIsAny2 = (function (a) { + return a.length; +}) ? exprAny1 : exprAny2; +var resultIsBoolean2 = (function (a) { + return a.length; +}) ? exprBoolean1 : exprBoolean2; var resultIsNumber2 = ({}) ? exprNumber1 : exprNumber2; -var resultIsString2 = ({ a: 1, b: "s" }) ? exprString1 : exprString2; -var resultIsObject2 = ({ a: 1, b: "s" }) ? exprIsObject1 : exprIsObject2; -var resultIsStringOrBoolean2 = ({ a: 1, b: "s" }) ? exprString1 : exprBoolean1; // union +var resultIsString2 = ({ + a: 1, + b: "s" +}) ? exprString1 : exprString2; +var resultIsObject2 = ({ + a: 1, + b: "s" +}) ? exprIsObject1 : exprIsObject2; +var resultIsStringOrBoolean2 = ({ + a: 1, + b: "s" +}) ? exprString1 : exprBoolean1; // union var resultIsAny3 = foo() ? exprAny1 : exprAny2; var resultIsBoolean3 = new Date() ? exprBoolean1 : exprBoolean2; var resultIsNumber3 = new C() ? exprNumber1 : exprNumber2; diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.js b/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.js index 80cfaf97f26..30d90a8b27d 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.js +++ b/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.js @@ -88,8 +88,14 @@ condAny ? exprString1 : exprBoolean1; // union null ? exprAny1 : exprAny2; null ? exprBoolean1 : exprBoolean2; undefined ? exprNumber1 : exprNumber2; -[null, undefined] ? exprString1 : exprString2; -[null, undefined] ? exprIsObject1 : exprIsObject2; +[ + null, + undefined +] ? exprString1 : exprString2; +[ + null, + undefined +] ? exprIsObject1 : exprIsObject2; undefined ? exprString1 : exprBoolean1; // union //Cond is an any type expression x.doSomeThing() ? exprAny1 : exprAny2; @@ -108,11 +114,20 @@ var resultIsStringOrBoolean1 = condAny ? exprString1 : exprBoolean1; // union var resultIsAny2 = null ? exprAny1 : exprAny2; var resultIsBoolean2 = null ? exprBoolean1 : exprBoolean2; var resultIsNumber2 = undefined ? exprNumber1 : exprNumber2; -var resultIsString2 = [null, undefined] ? exprString1 : exprString2; -var resultIsObject2 = [null, undefined] ? exprIsObject1 : exprIsObject2; +var resultIsString2 = [ + null, + undefined +] ? exprString1 : exprString2; +var resultIsObject2 = [ + null, + undefined +] ? exprIsObject1 : exprIsObject2; var resultIsStringOrBoolean2 = null ? exprString1 : exprBoolean1; // union var resultIsStringOrBoolean3 = undefined ? exprString1 : exprBoolean1; // union -var resultIsStringOrBoolean4 = [null, undefined] ? exprString1 : exprBoolean1; // union +var resultIsStringOrBoolean4 = [ + null, + undefined +] ? exprString1 : exprBoolean1; // union var resultIsAny3 = x.doSomeThing() ? exprAny1 : exprAny2; var resultIsBoolean3 = x("x") ? exprBoolean1 : exprBoolean2; var resultIsNumber3 = x(x) ? exprNumber1 : exprNumber2; diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.js b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.js index dbd68d9f009..ce4fd985235 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.js +++ b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.js @@ -92,9 +92,15 @@ condString ? exprString1 : exprBoolean1; // union " " ? exprIsObject1 : exprIsObject2; "hello " ? exprString1 : exprBoolean1; // union //Cond is a string type expression -function foo() { return "string"; } +function foo() { + return "string"; +} ; -var array = ["1", "2", "3"]; +var array = [ + "1", + "2", + "3" +]; typeof condString ? exprAny1 : exprAny2; condString.toUpperCase ? exprBoolean1 : exprBoolean2; condString + "string" ? exprNumber1 : exprNumber2; diff --git a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js index 722310815ae..592c5a6ca10 100644 --- a/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithIdenticalBCT.js @@ -86,27 +86,59 @@ true ? x : a; var result1 = true ? x : a; //Expr1 and Expr2 are literals true ? {} : 1; -true ? { a: 1 } : { a: 2, b: 'string' }; +true ? { + a: 1 +} : { + a: 2, + b: 'string' +}; var result2 = true ? {} : 1; -var result3 = true ? { a: 1 } : { a: 2, b: 'string' }; +var result3 = true ? { + a: 1 +} : { + a: 2, + b: 'string' +}; //Contextually typed var resultIsX1 = true ? x : a; -var result4 = true ? function (m) { return m.propertyX; } : function (n) { return n.propertyA; }; +var result4 = true ? function (m) { + return m.propertyX; +} : function (n) { + return n.propertyA; +}; //Cond ? Expr1 : Expr2, Expr2 is supertype //Be Not contextually typed true ? a : x; var result5 = true ? a : x; //Expr1 and Expr2 are literals true ? 1 : {}; -true ? { a: 2, b: 'string' } : { a: 1 }; +true ? { + a: 2, + b: 'string' +} : { + a: 1 +}; var result6 = true ? 1 : {}; -var result7 = true ? { a: 2, b: 'string' } : { a: 1 }; +var result7 = true ? { + a: 2, + b: 'string' +} : { + a: 1 +}; //Contextually typed var resultIsX2 = true ? x : a; -var result8 = true ? function (m) { return m.propertyA; } : function (n) { return n.propertyX; }; +var result8 = true ? function (m) { + return m.propertyA; +} : function (n) { + return n.propertyX; +}; //Result = Cond ? Expr1 : Expr2, Result is supertype //Contextually typed var resultIsX3 = true ? a : b; -var result10 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; +var result10 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; //Expr1 and Expr2 are literals var result11 = true ? 1 : 'string'; diff --git a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js index 83262ed1301..78c7569c0fa 100644 --- a/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js +++ b/tests/baselines/reference/conditionalOperatorWithoutIdenticalBCT.js @@ -63,7 +63,23 @@ var result1 = true ? a : b; var result2 = true ? a : b; var result3 = true ? a : b; var result31 = true ? a : b; -var result4 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; -var result5 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; -var result6 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; -var result61 = true ? function (m) { return m.propertyX1; } : function (n) { return n.propertyX2; }; +var result4 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; +var result5 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; +var result6 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; +var result61 = true ? function (m) { + return m.propertyX1; +} : function (n) { + return n.propertyX2; +}; diff --git a/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js b/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js index d8a36f9e09e..e2029d1bf37 100644 --- a/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js +++ b/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js @@ -22,7 +22,8 @@ var out2 = foo2((x, y) => { //// [conditionallyDuplicateOverloadsCausedByOverloadResolution.js] var out = foo(function (x, y) { - function bar() { } + function bar() { + } return bar; }); var out2 = foo2(function (x, y) { diff --git a/tests/baselines/reference/conflictMarkerTrivia2.js b/tests/baselines/reference/conflictMarkerTrivia2.js index bbf6726b994..bbb631de388 100644 --- a/tests/baselines/reference/conflictMarkerTrivia2.js +++ b/tests/baselines/reference/conflictMarkerTrivia2.js @@ -20,6 +20,7 @@ var C = (function () { C.prototype.foo = function () { a(); }; - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); diff --git a/tests/baselines/reference/conflictingTypeAnnotatedVar.js b/tests/baselines/reference/conflictingTypeAnnotatedVar.js index 283912c487b..b44dc6f1e33 100644 --- a/tests/baselines/reference/conflictingTypeAnnotatedVar.js +++ b/tests/baselines/reference/conflictingTypeAnnotatedVar.js @@ -5,5 +5,7 @@ function foo(): number { } //// [conflictingTypeAnnotatedVar.js] var foo; -function foo() { } -function foo() { } +function foo() { +} +function foo() { +} diff --git a/tests/baselines/reference/constDeclarations-access2.js b/tests/baselines/reference/constDeclarations-access2.js index ae8dae70646..fd51c932636 100644 --- a/tests/baselines/reference/constDeclarations-access2.js +++ b/tests/baselines/reference/constDeclarations-access2.js @@ -62,9 +62,11 @@ x--; ++((x)); // OK var a = x + 1; -function f(v) { } +function f(v) { +} f(x); -if (x) { } +if (x) { +} x; (x); -x; diff --git a/tests/baselines/reference/constDeclarations-access3.js b/tests/baselines/reference/constDeclarations-access3.js index 9140da965c3..9ac4880bdd1 100644 --- a/tests/baselines/reference/constDeclarations-access3.js +++ b/tests/baselines/reference/constDeclarations-access3.js @@ -71,9 +71,11 @@ M.x--; M["x"] = 0; // OK var a = M.x + 1; -function f(v) { } +function f(v) { +} f(M.x); -if (M.x) { } +if (M.x) { +} M.x; (M.x); -M.x; diff --git a/tests/baselines/reference/constDeclarations-access4.js b/tests/baselines/reference/constDeclarations-access4.js index 608d950526a..b226e746bba 100644 --- a/tests/baselines/reference/constDeclarations-access4.js +++ b/tests/baselines/reference/constDeclarations-access4.js @@ -67,9 +67,11 @@ M.x--; M["x"] = 0; // OK var a = M.x + 1; -function f(v) { } +function f(v) { +} f(M.x); -if (M.x) { } +if (M.x) { +} M.x; (M.x); -M.x; diff --git a/tests/baselines/reference/constDeclarations-access5.js b/tests/baselines/reference/constDeclarations-access5.js index 71b8c99ae58..7acc95ad055 100644 --- a/tests/baselines/reference/constDeclarations-access5.js +++ b/tests/baselines/reference/constDeclarations-access5.js @@ -76,9 +76,11 @@ define(["require", "exports", 'constDeclarations_access_1'], function (require, m["x"] = 0; // OK var a = m.x + 1; - function f(v) { } + function f(v) { + } f(m.x); - if (m.x) { } + if (m.x) { + } m.x; (m.x); -m.x; diff --git a/tests/baselines/reference/constDeclarations-errors.js b/tests/baselines/reference/constDeclarations-errors.js index e7143f2564a..e1e68032f8d 100644 --- a/tests/baselines/reference/constDeclarations-errors.js +++ b/tests/baselines/reference/constDeclarations-errors.js @@ -21,10 +21,14 @@ for(const c10 = 0, c11; c10 < 1;) { } const c1; const c2; const c3, c4, c5, c6; // error, missing initialicer -for (const c in {}) { } +for (const c in {}) { +} // error, assigning to a const -for (const c8 = 0; c8 < 1; c8++) { } +for (const c8 = 0; c8 < 1; c8++) { +} // error, can not be unintalized -for (const c9; c9 < 1;) { } +for (const c9; c9 < 1;) { +} // error, can not be unintalized -for (const c10 = 0, c11; c10 < 1;) { } +for (const c10 = 0, c11; c10 < 1;) { +} diff --git a/tests/baselines/reference/constEnumErrors.js b/tests/baselines/reference/constEnumErrors.js index 4afd98982f0..ca5e3f87e6e 100644 --- a/tests/baselines/reference/constEnumErrors.js +++ b/tests/baselines/reference/constEnumErrors.js @@ -52,7 +52,9 @@ var y0 = E2[1]; var name = "A"; var y1 = E2[name]; var x = E2; -var y = [E2]; +var y = [ + E2 +]; function foo(t) { } foo(E2); diff --git a/tests/baselines/reference/constEnums.js b/tests/baselines/reference/constEnums.js index 4f85cc59d0e..b7077c74df1 100644 --- a/tests/baselines/reference/constEnums.js +++ b/tests/baselines/reference/constEnums.js @@ -216,8 +216,11 @@ function foo(x) { } function bar(e) { switch (e) { - case 1 /* V1 */: return 1; - case 101 /* V2 */: return 1; - case 64 /* V3 */: return 1; + case 1 /* V1 */: + return 1; + case 101 /* V2 */: + return 1; + case 64 /* V3 */: + return 1; } } diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 408b56805fb..12e84e2077f 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -31,7 +32,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -39,7 +41,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -47,7 +50,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); function foo(tagName) { diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 591d6171dbe..563b73d7e5b 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -24,7 +24,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -32,7 +33,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -40,7 +42,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -48,7 +51,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); function foo(tagName) { diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index caeb2d32ee4..3d99e07bb5e 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -30,7 +30,8 @@ var __extends = this.__extends || function (d, b) { var Constraint = (function () { function Constraint() { } - Constraint.prototype.method = function () { }; + Constraint.prototype.method = function () { + }; return Constraint; })(); var GenericBase = (function () { diff --git a/tests/baselines/reference/constraintErrors1.js b/tests/baselines/reference/constraintErrors1.js index 71723130b55..c8da89d574c 100644 --- a/tests/baselines/reference/constraintErrors1.js +++ b/tests/baselines/reference/constraintErrors1.js @@ -2,4 +2,5 @@ function foo5(test: T) { } //// [constraintErrors1.js] -function foo5(test) { } +function foo5(test) { +} diff --git a/tests/baselines/reference/constraintSatisfactionWithAny.js b/tests/baselines/reference/constraintSatisfactionWithAny.js index 06d8b17690a..924c2ab1700 100644 --- a/tests/baselines/reference/constraintSatisfactionWithAny.js +++ b/tests/baselines/reference/constraintSatisfactionWithAny.js @@ -54,10 +54,16 @@ var c8 = new C4(b); //// [constraintSatisfactionWithAny.js] // any is not a valid type argument unless there is no constraint, or the constraint is any -function foo(x) { return null; } -function foo2(x) { return null; } +function foo(x) { + return null; +} +function foo2(x) { + return null; +} //function foo3(x: T): T { return null; } -function foo4(x) { return null; } +function foo4(x) { + return null; +} var a; foo(a); foo2(a); diff --git a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js index 7850b0ebd01..5f9e902141b 100644 --- a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js +++ b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js @@ -40,7 +40,8 @@ var i2: I2<{}>; //// [constraintSatisfactionWithEmptyObject.js] // valid uses of a basic object constraint, no errors expected // Object constraint -function foo(x) { } +function foo(x) { +} var r = foo({}); var a = {}; var r = foo({}); @@ -53,7 +54,8 @@ var C = (function () { var r2 = new C({}); var i; // {} constraint -function foo2(x) { } +function foo2(x) { +} var r = foo2({}); var a = {}; var r = foo2({}); diff --git a/tests/baselines/reference/constructorArgWithGenericCallSignature.js b/tests/baselines/reference/constructorArgWithGenericCallSignature.js index ca859869850..5fa7c46124b 100644 --- a/tests/baselines/reference/constructorArgWithGenericCallSignature.js +++ b/tests/baselines/reference/constructorArgWithGenericCallSignature.js @@ -23,7 +23,8 @@ var Test; return MyClass; })(); Test.MyClass = MyClass; - function F(func) { } + function F(func) { + } Test.F = F; })(Test || (Test = {})); var func; diff --git a/tests/baselines/reference/constructorAsType.js b/tests/baselines/reference/constructorAsType.js index 9f8c14ce743..d2029e5899f 100644 --- a/tests/baselines/reference/constructorAsType.js +++ b/tests/baselines/reference/constructorAsType.js @@ -6,6 +6,10 @@ var Person2:{new() : {name:string;};}; Person = Person2; //// [constructorAsType.js] -var Person = function () { return { name: "joe" }; }; +var Person = function () { + return { + name: "joe" + }; +}; var Person2; Person = Person2; diff --git a/tests/baselines/reference/constructorOverloads1.js b/tests/baselines/reference/constructorOverloads1.js index 97f33dca862..6f834d0bf6d 100644 --- a/tests/baselines/reference/constructorOverloads1.js +++ b/tests/baselines/reference/constructorOverloads1.js @@ -25,13 +25,19 @@ f1.bar2(); var Foo = (function () { function Foo(x) { } - Foo.prototype.bar1 = function () { }; - Foo.prototype.bar2 = function () { }; + Foo.prototype.bar1 = function () { + }; + Foo.prototype.bar2 = function () { + }; return Foo; })(); var f1 = new Foo("hey"); var f2 = new Foo(0); var f3 = new Foo(f1); -var f4 = new Foo([f1, f2, f3]); +var f4 = new Foo([ + f1, + f2, + f3 +]); f1.bar1(); f1.bar2(); diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index e3eae0ed5a9..753eca4a1fb 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -35,7 +35,8 @@ var __extends = this.__extends || function (d, b) { var FooBase = (function () { function FooBase(x) { } - FooBase.prototype.bar1 = function () { }; + FooBase.prototype.bar1 = function () { + }; return FooBase; })(); var Foo = (function (_super) { @@ -43,11 +44,16 @@ var Foo = (function (_super) { function Foo(x, y) { _super.call(this, x); } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(FooBase); var f1 = new Foo("hey"); var f2 = new Foo(0); var f3 = new Foo(f1); -var f4 = new Foo([f1, f2, f3]); +var f4 = new Foo([ + f1, + f2, + f3 +]); f1.bar1(); diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index c54226745c2..382a7cd8913 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -33,11 +33,16 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { } - Foo.prototype.bar1 = function () { }; + Foo.prototype.bar1 = function () { + }; return Foo; })(FooBase); var f1 = new Foo("hey"); var f2 = new Foo(0); var f3 = new Foo(f1); -var f4 = new Foo([f1, f2, f3]); +var f4 = new Foo([ + f1, + f2, + f3 +]); f1.bar1(); diff --git a/tests/baselines/reference/constructorOverloads6.js b/tests/baselines/reference/constructorOverloads6.js index 1996449165c..aef68fcd863 100644 --- a/tests/baselines/reference/constructorOverloads6.js +++ b/tests/baselines/reference/constructorOverloads6.js @@ -28,5 +28,9 @@ f1.bar1(); var f1 = new Foo("hey"); var f2 = new Foo(0); var f3 = new Foo(f1); -var f4 = new Foo([f1, f2, f3]); +var f4 = new Foo([ + f1, + f2, + f3 +]); f1.bar1(); diff --git a/tests/baselines/reference/constructorOverloads7.js b/tests/baselines/reference/constructorOverloads7.js index 5b7e407e806..b7e152c66e1 100644 --- a/tests/baselines/reference/constructorOverloads7.js +++ b/tests/baselines/reference/constructorOverloads7.js @@ -34,4 +34,6 @@ function Point(x, y) { this.y = y; return this; } -function EF1(a, b) { return a + b; } +function EF1(a, b) { + return a + b; +} diff --git a/tests/baselines/reference/constructorParametersInVariableDeclarations.js b/tests/baselines/reference/constructorParametersInVariableDeclarations.js index 984c8c392b1..3528a9574af 100644 --- a/tests/baselines/reference/constructorParametersInVariableDeclarations.js +++ b/tests/baselines/reference/constructorParametersInVariableDeclarations.js @@ -20,16 +20,24 @@ class B { var A = (function () { function A(x) { this.a = x; - this.b = { p: x }; - this.c = function () { return x; }; + this.b = { + p: x + }; + this.c = function () { + return x; + }; } return A; })(); var B = (function () { function B() { this.a = x; - this.b = { p: x }; - this.c = function () { return x; }; + this.b = { + p: x + }; + this.c = function () { + return x; + }; var x = 1; } return B; diff --git a/tests/baselines/reference/constructorReturnsInvalidType.js b/tests/baselines/reference/constructorReturnsInvalidType.js index 7f6119cc8bd..92afb41a3fe 100644 --- a/tests/baselines/reference/constructorReturnsInvalidType.js +++ b/tests/baselines/reference/constructorReturnsInvalidType.js @@ -14,7 +14,8 @@ var X = (function () { function X() { return 1; } - X.prototype.foo = function () { }; + X.prototype.foo = function () { + }; return X; })(); var x = new X(); diff --git a/tests/baselines/reference/constructorWithAssignableReturnExpression.js b/tests/baselines/reference/constructorWithAssignableReturnExpression.js index 238f2e18aea..b56e63e8e4e 100644 --- a/tests/baselines/reference/constructorWithAssignableReturnExpression.js +++ b/tests/baselines/reference/constructorWithAssignableReturnExpression.js @@ -51,19 +51,25 @@ var D = (function () { })(); var E = (function () { function E() { - return { x: 1 }; + return { + x: 1 + }; } return E; })(); var F = (function () { function F() { - return { x: 1 }; // error + return { + x: 1 + }; // error } return F; })(); var G = (function () { function G() { - return { x: null }; + return { + x: null + }; } return G; })(); diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 16e936620d0..566213887f4 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -314,11 +314,10 @@ var TypeScriptAllInOne; Program.prototype.if = function (retValue) { if (retValue === void 0) { retValue = != 0; } return 1; - ^ retValue; + ^ retValue; bfs.TYPES(); if (retValue != 0) { - return 1 && - ; + return 1 && ; } retValue = bfs.OPERATOR; ' );; @@ -349,8 +348,7 @@ var BasicFeatures = (function () { BasicFeatures.prototype.VARIABLES = function () { var local = Number.MAX_VALUE; var min = Number.MIN_VALUE; - var inf = Number.NEGATIVE_INFINITY - - ; + var inf = Number.NEGATIVE_INFINITY - ; var nan = Number.NaN; var undef = undefined; var _\uD4A5\u7204\uC316, uE59F = local; @@ -359,16 +357,22 @@ var BasicFeatures = (function () { var local6 = local5 instanceof fs.File; var hex = 0xBADC0DE, Hex = 0XDEADBEEF; var float = 6.02e23, float2 = 6.02E-23; - var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != - ; + var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != ; var quoted = '"', quoted2 = "'"; var reg = /\w*/; - var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof: function () { return 'objLit{42}'; } }; + var objLit = { + "var": number = 42, + equals: function (x) { + return x["var"] === 42; + }, + instanceof: function () { + return 'objLit{42}'; + } + }; var weekday = 0 /* Monday */; var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; // - var any = 0 ^= - ; + var any = 0 ^= ; var bool = 0; var declare = 0; var constructor = 0; @@ -384,8 +388,7 @@ var BasicFeatures = (function () { var public = 0; var set = 0; var static = 0; - var string = 0 / > - ; + var string = 0 / > ; var yield = 0; var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; return 0; @@ -411,18 +414,24 @@ var BasicFeatures = (function () { default: break; } - for (var x in { x: 0, y: 1 }) { + for (var x in { + x: 0, + y: 1 + }) { !; try { throw null; } - catch (Exception) { } + catch (Exception) { + } } try { } finally { - try { } - catch (Exception) { } + try { + } + catch (Exception) { + } } return retVal; }; @@ -435,13 +444,17 @@ var BasicFeatures = (function () { var c = new CLASS(); var xx = c; retVal += ; - try { } - catch () { } + try { + } + catch () { + } Property; retVal += c.Member(); retVal += xx.Foo() ? 0 : 1; //anonymous type - var anony = { a: new CLASS() }; + var anony = { + a: new CLASS() + }; retVal += anony.a.d(); return retVal; }; @@ -450,7 +463,13 @@ var BasicFeatures = (function () { ///// ///// BasicFeatures.prototype.OPERATOR = function () { - var a = [1, 2, 3, 4, 5,]; /*[] bug*/ // YES [] + var a = [ + 1, + 2, + 3, + 4, + 5, + ]; /*[] bug*/ // YES [] var i = a[1]; /*[]*/ i = i + i - i * i / i % i & i | i ^ i; /*+ - * / % & | ^*/ var b = true && false || true ^ false; /*& | ^*/ @@ -486,10 +505,15 @@ var BasicFeatures = (function () { })(); var CLASS = (function () { function CLASS() { - this.d = function () { yield; 0; }; + this.d = function () { + yield; + 0; + }; } Object.defineProperty(CLASS.prototype, "Property", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); @@ -497,10 +521,11 @@ var CLASS = (function () { return 0; }; CLASS.prototype.Foo = function () { - var myEvent = function () { return 1; }; + var myEvent = function () { + return 1; + }; if (myEvent() == 1) - return true ? - : ; + return true ? : ; else return false; }; @@ -542,10 +567,10 @@ while () : string, ; rest: string[]; { - & - public; + & public; DefaultValue(value ? : string = "Hello"); - { } + { + } } var Weekdays; (function (Weekdays) { diff --git a/tests/baselines/reference/contextualSignatureInstantiation1.js b/tests/baselines/reference/contextualSignatureInstantiation1.js index 843ac5140f0..a9abab149bb 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation1.js +++ b/tests/baselines/reference/contextualSignatureInstantiation1.js @@ -8,7 +8,11 @@ var e2 = (x: string, y?: K) => x.length; var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } //// [contextualSignatureInstantiation1.js] -var e = function (x, y) { return x.length; }; +var e = function (x, y) { + return x.length; +}; var r99 = map(e); // should be {}[] for S since a generic lambda is not inferentially typed -var e2 = function (x, y) { return x.length; }; +var e2 = function (x, y) { + return x.length; +}; var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } diff --git a/tests/baselines/reference/contextualSignatureInstantiation2.js b/tests/baselines/reference/contextualSignatureInstantiation2.js index 78bc5a88856..8b29b432ce6 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation2.js +++ b/tests/baselines/reference/contextualSignatureInstantiation2.js @@ -8,6 +8,12 @@ var r23 = dot(id)(id); //// [contextualSignatureInstantiation2.js] // dot f g x = f(g(x)) var dot; -dot = function (f) { return function (g) { return function (x) { return f(g(x)); }; }; }; +dot = function (f) { + return function (g) { + return function (x) { + return f(g(x)); + }; + }; +}; var id; var r23 = dot(id)(id); diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.js b/tests/baselines/reference/contextualSignatureInstantiation3.js index 9198a02ccda..ccc5e584368 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.js +++ b/tests/baselines/reference/contextualSignatureInstantiation3.js @@ -31,9 +31,15 @@ function identity(x) { return x; } function singleton(x) { - return [x]; + return [ + x + ]; } -var xs = [1, 2, 3]; +var xs = [ + 1, + 2, + 3 +]; // Have compiler check that we get the correct types var v1; var v1 = xs.map(identity); // Error if not number[] diff --git a/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js b/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js index 726d45bffe5..bd76a746ac9 100644 --- a/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js +++ b/tests/baselines/reference/contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js @@ -8,7 +8,9 @@ var x = h("", f()); // Call should succeed and x should be string. All t //// [contextualSignatureInstantiationWithTypeParameterConstrainedToOuterTypeParameter.js] function f() { - function g(u) { return null; } + function g(u) { + return null; + } return g; } var h; diff --git a/tests/baselines/reference/contextualTypeAny.js b/tests/baselines/reference/contextualTypeAny.js index a88b353a890..1a3918ba0d2 100644 --- a/tests/baselines/reference/contextualTypeAny.js +++ b/tests/baselines/reference/contextualTypeAny.js @@ -7,5 +7,11 @@ var arr: number[] = ["", x]; //// [contextualTypeAny.js] var x; -var obj = { p: "", q: x }; -var arr = ["", x]; +var obj = { + p: "", + q: x +}; +var arr = [ + "", + x +]; diff --git a/tests/baselines/reference/contextualTypeAppliedToVarArgs.js b/tests/baselines/reference/contextualTypeAppliedToVarArgs.js index 77ce90ec737..c4e78318a9c 100644 --- a/tests/baselines/reference/contextualTypeAppliedToVarArgs.js +++ b/tests/baselines/reference/contextualTypeAppliedToVarArgs.js @@ -18,7 +18,8 @@ class Foo{ //// [contextualTypeAppliedToVarArgs.js] function delegate(instance, method, data) { - return function () { }; + return function () { + }; } var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/contextualTypeArrayReturnType.js b/tests/baselines/reference/contextualTypeArrayReturnType.js index adc568d5230..d84b93ec953 100644 --- a/tests/baselines/reference/contextualTypeArrayReturnType.js +++ b/tests/baselines/reference/contextualTypeArrayReturnType.js @@ -24,7 +24,9 @@ var style: IBookStyle = { var style = { initialLeftPageTransforms: function (width) { return [ - { 'ry': null } + { + 'ry': null + } ]; } }; diff --git a/tests/baselines/reference/contextualTypeWithTuple.js b/tests/baselines/reference/contextualTypeWithTuple.js index cfcdd13f7d0..d5c8fa83874 100644 --- a/tests/baselines/reference/contextualTypeWithTuple.js +++ b/tests/baselines/reference/contextualTypeWithTuple.js @@ -27,11 +27,36 @@ numStrTuple = unionTuple3; //// [contextualTypeWithTuple.js] // no error -var numStrTuple = [5, "hello"]; -var numStrTuple2 = [5, "foo", true]; -var numStrBoolTuple = [5, "foo", true]; -var objNumTuple = [{ a: "world" }, 5]; -var strTupleTuple = ["bar", [5, { x: 1, y: 1 }]]; +var numStrTuple = [ + 5, + "hello" +]; +var numStrTuple2 = [ + 5, + "foo", + true +]; +var numStrBoolTuple = [ + 5, + "foo", + true +]; +var objNumTuple = [ + { + a: "world" + }, + 5 +]; +var strTupleTuple = [ + "bar", + [ + 5, + { + x: 1, + y: 1 + } + ] +]; var C = (function () { function C() { } @@ -42,16 +67,36 @@ var D = (function () { } return D; })(); -var unionTuple = [new C(), "foo"]; -var unionTuple1 = [new C(), "foo"]; -var unionTuple2 = [new C(), "foo", new D()]; -var unionTuple3 = [10, "foo"]; +var unionTuple = [ + new C(), + "foo" +]; +var unionTuple1 = [ + new C(), + "foo" +]; +var unionTuple2 = [ + new C(), + "foo", + new D() +]; +var unionTuple3 = [ + 10, + "foo" +]; numStrTuple = numStrTuple2; numStrTuple = numStrBoolTuple; // error -objNumTuple = [{}, 5]; +objNumTuple = [ + {}, + 5 +]; numStrBoolTuple = numStrTuple; -var strStrTuple = ["foo", "bar", 5]; +var strStrTuple = [ + "foo", + "bar", + 5 +]; unionTuple = unionTuple1; unionTuple = unionTuple2; unionTuple2 = unionTuple; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js index e29d4720cbc..9daf108f1cd 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js @@ -40,11 +40,21 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any //When used as a contextual type, a union type U has those members that are present in any of // its constituent types, with types that are unions of the respective members in the constituent types. // With no call signature | callSignatures -var x = function (a) { return a.toString(); }; +var x = function (a) { + return a.toString(); +}; // With call signatures with different return type -var x2 = function (a) { return a.toString(); }; // Like iWithCallSignatures -var x2 = function (a) { return a; }; // Like iWithCallSignatures2 +var x2 = function (a) { + return a.toString(); +}; // Like iWithCallSignatures +var x2 = function (a) { + return a; +}; // Like iWithCallSignatures2 // With call signatures of mismatching parameter type -var x3 = function (a) { return a.toString(); }; +var x3 = function (a) { + return a.toString(); +}; // With call signature count mismatch -var x4 = function (a) { return a.toString(); }; +var x4 = function (a) { + return a.toString(); +}; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.js b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.js index 2c07f461424..7dfcb683010 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.js @@ -65,16 +65,52 @@ var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a }; // Let S be the set of types in U that has a string index signature. // If S is not empty, U has a string index signature of a union type of // the types of the string index signatures from each type in S. -var x = { z: function (a) { return a; } }; // a should be number -var x = { foo: function (a) { return a; } }; // a should be any -var x = { foo: "hello" }; -var x2 = { z: function (a) { return a.toString(); } }; // a should be number -var x2 = { z: function (a) { return a; } }; // a should be number +var x = { + z: function (a) { + return a; + } +}; // a should be number +var x = { + foo: function (a) { + return a; + } +}; // a should be any +var x = { + foo: "hello" +}; +var x2 = { + z: function (a) { + return a.toString(); + } +}; // a should be number +var x2 = { + z: function (a) { + return a; + } +}; // a should be number // Let S be the set of types in U that has a numeric index signature. // If S is not empty, U has a numeric index signature of a union type of // the types of the numeric index signatures from each type in S. -var x3 = { 1: function (a) { return a; } }; // a should be number -var x3 = { 0: function (a) { return a; } }; // a should be any -var x3 = { 0: "hello" }; -var x4 = { 1: function (a) { return a.toString(); } }; // a should be number -var x4 = { 1: function (a) { return a; } }; // a should be number +var x3 = { + 1: function (a) { + return a; + } +}; // a should be number +var x3 = { + 0: function (a) { + return a; + } +}; // a should be any +var x3 = { + 0: "hello" +}; +var x4 = { + 1: function (a) { + return a.toString(); + } +}; // a should be number +var x4 = { + 1: function (a) { + return a; + } +}; // a should be number diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeMembers.js b/tests/baselines/reference/contextualTypeWithUnionTypeMembers.js index 10672d86796..7fd30a635a8 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeMembers.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeMembers.js @@ -128,49 +128,94 @@ var i1Ori2 = i1; var i1Ori2 = i2; var i1Ori2 = { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI1: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI1: function (a) { + return a; + }, propertyOnlyInI1: "Hello" }; var i1Ori2 = { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI2: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI2: function (a) { + return a; + }, propertyOnlyInI2: "Hello" }; var i1Ori2 = { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI1: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI1: function (a) { + return a; + }, propertyOnlyInI1: "Hello", - methodOnlyInI2: function (a) { return a; }, + methodOnlyInI2: function (a) { + return a; + }, propertyOnlyInI2: "Hello" }; -var arrayI1OrI2 = [i1, i2, { +var arrayI1OrI2 = [ + i1, + i2, + { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI1: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI1: function (a) { + return a; + }, propertyOnlyInI1: "Hello" }, { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI2: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI2: function (a) { + return a; + }, propertyOnlyInI2: "Hello" - }, { + }, + { commonPropertyType: "hello", - commonMethodType: function (a) { return a; }, - commonMethodWithTypeParameter: function (a) { return a; }, - methodOnlyInI1: function (a) { return a; }, + commonMethodType: function (a) { + return a; + }, + commonMethodWithTypeParameter: function (a) { + return a; + }, + methodOnlyInI1: function (a) { + return a; + }, propertyOnlyInI1: "Hello", - methodOnlyInI2: function (a) { return a; }, + methodOnlyInI2: function (a) { + return a; + }, propertyOnlyInI2: "Hello" - }]; + } +]; var i11; var i21; var i11Ori21 = i11; @@ -191,18 +236,24 @@ var i11Ori21 = { }, commonPropertyDifferentType: 10 }; -var arrayOrI11OrI21 = [i11, i21, i11 || i21, { +var arrayOrI11OrI21 = [ + i11, + i21, + i11 || i21, + { // Like i1 commonMethodDifferentReturnType: function (a, b) { var z = a.charAt(b); return z; }, commonPropertyDifferentType: "hello" - }, { + }, + { // Like i2 commonMethodDifferentReturnType: function (a, b) { var z = a.charCodeAt(b); return z; }, commonPropertyDifferentType: 10 - }]; + } +]; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.js b/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.js index dc8f07823b6..d58b497a18d 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeObjectLiteral.js @@ -79,7 +79,9 @@ var objStrOrNum3 = { var objStrOrNum4 = { prop: strOrNumber }; -var objStrOrNum5 = { prop: strOrNumber }; +var objStrOrNum5 = { + prop: strOrNumber +}; var objStrOrNum6 = { prop: strOrNumber, anotherP: str @@ -111,5 +113,7 @@ var i11Ori21 = { }; var strOrNumber; var i11Ori21 = { - commonMethodDifferentReturnType: function (a, b) { return strOrNumber; } + commonMethodDifferentReturnType: function (a, b) { + return strOrNumber; + } }; diff --git a/tests/baselines/reference/contextualTyping.js b/tests/baselines/reference/contextualTyping.js index 75b98b16c33..b4c565c5091 100644 --- a/tests/baselines/reference/contextualTyping.js +++ b/tests/baselines/reference/contextualTyping.js @@ -249,24 +249,48 @@ var C2T5; }; })(C2T5 || (C2T5 = {})); // CONTEXT: Variable declaration -var c3t1 = (function (s) { return s; }); +var c3t1 = (function (s) { + return s; +}); var c3t2 = ({ n: 1 }); var c3t3 = []; -var c3t4 = function () { return ({}); }; -var c3t5 = function (n) { return ({}); }; -var c3t6 = function (n, s) { return ({}); }; -var c3t7 = function (n) { return n; }; -var c3t8 = function (n) { return n; }; -var c3t9 = [[], []]; -var c3t10 = [({}), ({})]; -var c3t11 = [function (n, s) { return s; }]; +var c3t4 = function () { + return ({}); +}; +var c3t5 = function (n) { + return ({}); +}; +var c3t6 = function (n, s) { + return ({}); +}; +var c3t7 = function (n) { + return n; +}; +var c3t8 = function (n) { + return n; +}; +var c3t9 = [ + [], + [] +]; +var c3t10 = [ + ({}), + ({}) +]; +var c3t11 = [ + function (n, s) { + return s; + } +]; var c3t12 = { foo: ({}) }; var c3t13 = ({ - f: function (i, s) { return s; } + f: function (i, s) { + return s; + } }); var c3t14 = ({ a: [] @@ -290,41 +314,74 @@ var C5T5; })(C5T5 || (C5T5 = {})); // CONTEXT: Variable assignment var c6t5; -c6t5 = function (n) { return ({}); }; +c6t5 = function (n) { + return ({}); +}; // CONTEXT: Array index assignment var c7t2; -c7t2[0] = ({ n: 1 }); +c7t2[0] = ({ + n: 1 +}); var objc8 = ({}); -objc8.t1 = (function (s) { return s; }); +objc8.t1 = (function (s) { + return s; +}); objc8.t2 = ({ n: 1 }); objc8.t3 = []; -objc8.t4 = function () { return ({}); }; -objc8.t5 = function (n) { return ({}); }; -objc8.t6 = function (n, s) { return ({}); }; -objc8.t7 = function (n) { return n; }; -objc8.t8 = function (n) { return n; }; -objc8.t9 = [[], []]; -objc8.t10 = [({}), ({})]; -objc8.t11 = [function (n, s) { return s; }]; +objc8.t4 = function () { + return ({}); +}; +objc8.t5 = function (n) { + return ({}); +}; +objc8.t6 = function (n, s) { + return ({}); +}; +objc8.t7 = function (n) { + return n; +}; +objc8.t8 = function (n) { + return n; +}; +objc8.t9 = [ + [], + [] +]; +objc8.t10 = [ + ({}), + ({}) +]; +objc8.t11 = [ + function (n, s) { + return s; + } +]; objc8.t12 = { foo: ({}) }; objc8.t13 = ({ - f: function (i, s) { return s; } + f: function (i, s) { + return s; + } }); objc8.t14 = ({ a: [] }); // CONTEXT: Function call -function c9t5(f) { } +function c9t5(f) { +} ; c9t5(function (n) { return ({}); }); // CONTEXT: Return statement -var c10t5 = function () { return function (n) { return ({}); }; }; +var c10t5 = function () { + return function (n) { + return ({}); + }; +}; // CONTEXT: Newing a class var C11t5 = (function () { function C11t5(f) { @@ -332,31 +389,59 @@ var C11t5 = (function () { return C11t5; })(); ; -var i = new C11t5(function (n) { return ({}); }); +var i = new C11t5(function (n) { + return ({}); +}); // CONTEXT: Type annotated expression -var c12t1 = (function (s) { return s; }); +var c12t1 = (function (s) { + return s; +}); var c12t2 = ({ n: 1 }); var c12t3 = []; -var c12t4 = function () { return ({}); }; -var c12t5 = function (n) { return ({}); }; -var c12t6 = function (n, s) { return ({}); }; -var c12t7 = function (n) { return n; }; -var c12t8 = function (n) { return n; }; -var c12t9 = [[], []]; -var c12t10 = [({}), ({})]; -var c12t11 = [function (n, s) { return s; }]; +var c12t4 = function () { + return ({}); +}; +var c12t5 = function (n) { + return ({}); +}; +var c12t6 = function (n, s) { + return ({}); +}; +var c12t7 = function (n) { + return n; +}; +var c12t8 = function (n) { + return n; +}; +var c12t9 = [ + [], + [] +]; +var c12t10 = [ + ({}), + ({}) +]; +var c12t11 = [ + function (n, s) { + return s; + } +]; var c12t12 = { foo: ({}) }; var c12t13 = ({ - f: function (i, s) { return s; } + f: function (i, s) { + return s; + } }); var c12t14 = ({ a: [] }); -function EF1(a, b) { return a + b; } +function EF1(a, b) { + return a + b; +} var efv = EF1(1, 2); function Point(x, y) { this.x = x; diff --git a/tests/baselines/reference/contextualTyping.js.map b/tests/baselines/reference/contextualTyping.js.map index a8835dc965d..0b38517f9cc 100644 --- a/tests/baselines/reference/contextualTyping.js.map +++ b/tests/baselines/reference/contextualTyping.js.map @@ -1,2 +1,2 @@ //// [contextualTyping.js.map] -{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":["C1T5","C1T5.constructor","C2T5","C4T5","C4T5.constructor","C5T5","c9t5","C11t5","C11t5.constructor","EF1","Point"],"mappings":"AAaA,AADA,sCAAsC;;IACtCA;QACIC,QAAGA,GAAqCA,UAASA,CAACA;YAC9C,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IAADD,WAACA;AAADA,CAACA,AAJD,IAIC;AAGD,AADA,uCAAuC;AACvC,IAAO,IAAI,CAIV;AAJD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAGA,GAAqCA,UAASA,CAACA;QACzD,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EAJM,IAAI,KAAJ,IAAI,QAIV;AAGD,AADA,gCAAgC;IAC5B,IAAI,GAA0B,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAGF,AADA,qCAAqC;;IAGjCC;QACIC,IAAIA,CAACA,GAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;YACpB,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IACLD,WAACA;AAADA,CAACA,AAPD,IAOC;AAGD,AADA,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAqCA,CAACA;IACjDA,QAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;QACf,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EALM,IAAI,KAAJ,IAAI,QAKV;AAGD,AADA,+BAA+B;IAC3B,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAG9D,AADA,kCAAkC;IAC9B,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,AADA,yBAAyB;cACX,CAAsB,IAAGC,CAACA;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,MAAM,CAAO,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAGH,AADA,4BAA4B;IACxB,KAAK,GAA8B,cAAa,MAAM,CAAC,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAG/F,AADA,0BAA0B;;IACZC,eAAYA,CAAsBA;IAAIC,CAACA;IAACD,YAACA;AAADA,CAACA,AAAvD,IAAuD;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAGrD,AADA,qCAAqC;IACjC,KAAK,GAA2B,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,cAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,IAAI,MAAM,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,aAAa,CAAC,EAAC,CAAC,IAAIE,MAAMA,CAACA,CAACA,GAACA,CAACA,CAACA,CAACA,CAACA;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,eAAe,CAAC,EAAE,CAAC;IACfC,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IACXA,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IAEXA,MAAMA,CAACA,IAAIA,CAACA;AAChBA,CAACA;AAED,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} \ No newline at end of file +{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":["C1T5","C1T5.constructor","C2T5","C4T5","C4T5.constructor","C5T5","c9t5","C11t5","C11t5.constructor","EF1","Point"],"mappings":"AAaA,AADA,sCAAsC;;IACtCA;QACIC,QAAGA,GAAqCA,UAASA,CAACA;YAC9C,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IAADD,WAACA;AAADA,CAACA,AAJD,IAIC;AAGD,AADA,uCAAuC;AACvC,IAAO,IAAI,CAIV;AAJD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAGA,GAAqCA,UAASA,CAACA;QACzD,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EAJM,IAAI,KAAJ,IAAI,QAIV;AAGD,AADA,gCAAgC;IAC5B,IAAI,GAA0B,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe;IAAC,EAAE;IAAC,EAAE;CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW;IAAO,CAAC,EAAE,CAAC;IAAO,CAAC,EAAE,CAAC;CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC;IAAC,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAGF,AADA,qCAAqC;;IAGjCC;QACIC,IAAIA,CAACA,GAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;YACpB,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IACLD,WAACA;AAADA,CAACA,AAPD,IAOC;AAGD,AADA,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAqCA,CAACA;IACjDA,QAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;QACf,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EALM,IAAI,KAAJ,IAAI,QAKV;AAGD,AADA,+BAA+B;IAC3B,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAG9D,AADA,kCAAkC;IAC9B,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC;IAAC,CAAC,EAAE,CAAC;CAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG;IAAC,EAAE;IAAC,EAAE;CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG;IAAO,CAAC,EAAE,CAAC;IAAO,CAAC,EAAE,CAAC;CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG;IAAC,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,AADA,yBAAyB;cACX,CAAsB;AAAGC,CAACA;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,MAAM,CAAO,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAGH,AADA,4BAA4B;IACxB,KAAK,GAA8B;IAAa,MAAM,CAAC,UAAS,CAAC;QAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;IAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAG/F,AADA,0BAA0B;;IACZC,eAAYA,CAAsBA;IAAIC,CAACA;IAACD,YAACA;AAADA,CAACA,AAAvD,IAAuD;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAGrD,AADA,qCAAqC;IACjC,KAAK,GAA2B,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB;IAAC,EAAE;IAAC,EAAE;CAAC,CAAC;AACjC,IAAI,MAAM,GAAY;IAAO,CAAC,EAAE,CAAC;IAAO,CAAC,EAAE,CAAC;CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC;IAAC,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,aAAa,CAAC,EAAC,CAAC;IAAIE,MAAMA,CAACA,CAACA,GAACA,CAACA,CAACA;AAACA,CAACA;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,eAAe,CAAC,EAAE,CAAC;IACfC,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IACXA,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IAEXA,MAAMA,CAACA,IAAIA,CAACA;AAChBA,CAACA;AAED,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping.sourcemap.txt b/tests/baselines/reference/contextualTyping.sourcemap.txt index 085f6a439ff..225aa3285ff 100644 --- a/tests/baselines/reference/contextualTyping.sourcemap.txt +++ b/tests/baselines/reference/contextualTyping.sourcemap.txt @@ -259,7 +259,6 @@ sourceFile:contextualTyping.ts 1-> 2 > 3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^-> 1-> > >// CONTEXT: Variable declaration @@ -270,71 +269,76 @@ sourceFile:contextualTyping.ts 2 >Emitted(17, 1) Source(27, 1) + SourceIndex(0) 3 >Emitted(17, 33) Source(27, 33) + SourceIndex(0) --- ->>>var c3t1 = (function (s) { return s; }); -1->^^^^ +>>>var c3t1 = (function (s) { +1 >^^^^ 2 > ^^^^ 3 > ^^^ 4 > ^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -1-> +1 > >var 2 > c3t1 3 > : (s: string) => string = 4 > ( 5 > function( 6 > s -7 > ) { -8 > return -9 > -10> s -11> -12> -13> } -14> ) -15> ; -1->Emitted(18, 5) Source(28, 5) + SourceIndex(0) +1 >Emitted(18, 5) Source(28, 5) + SourceIndex(0) 2 >Emitted(18, 9) Source(28, 9) + SourceIndex(0) 3 >Emitted(18, 12) Source(28, 35) + SourceIndex(0) 4 >Emitted(18, 13) Source(28, 36) + SourceIndex(0) 5 >Emitted(18, 23) Source(28, 45) + SourceIndex(0) 6 >Emitted(18, 24) Source(28, 46) + SourceIndex(0) -7 >Emitted(18, 28) Source(28, 50) + SourceIndex(0) -8 >Emitted(18, 34) Source(28, 56) + SourceIndex(0) -9 >Emitted(18, 35) Source(28, 57) + SourceIndex(0) -10>Emitted(18, 36) Source(28, 58) + SourceIndex(0) -11>Emitted(18, 37) Source(28, 58) + SourceIndex(0) -12>Emitted(18, 38) Source(28, 59) + SourceIndex(0) -13>Emitted(18, 39) Source(28, 60) + SourceIndex(0) -14>Emitted(18, 40) Source(28, 61) + SourceIndex(0) -15>Emitted(18, 41) Source(28, 62) + SourceIndex(0) +--- +>>> return s; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > +1 >Emitted(19, 5) Source(28, 50) + SourceIndex(0) +2 >Emitted(19, 11) Source(28, 56) + SourceIndex(0) +3 >Emitted(19, 12) Source(28, 57) + SourceIndex(0) +4 >Emitted(19, 13) Source(28, 58) + SourceIndex(0) +5 >Emitted(19, 14) Source(28, 58) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^-> +1 > +2 >} +3 > ) +4 > ; +1 >Emitted(20, 1) Source(28, 59) + SourceIndex(0) +2 >Emitted(20, 2) Source(28, 60) + SourceIndex(0) +3 >Emitted(20, 3) Source(28, 61) + SourceIndex(0) +4 >Emitted(20, 4) Source(28, 62) + SourceIndex(0) --- >>>var c3t2 = ({ -1 > +1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^ -1 > +1-> > 2 >var 3 > c3t2 4 > = 5 > ( -1 >Emitted(19, 1) Source(29, 1) + SourceIndex(0) -2 >Emitted(19, 5) Source(29, 5) + SourceIndex(0) -3 >Emitted(19, 9) Source(29, 9) + SourceIndex(0) -4 >Emitted(19, 12) Source(29, 18) + SourceIndex(0) -5 >Emitted(19, 13) Source(29, 19) + SourceIndex(0) +1->Emitted(21, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(21, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(21, 9) Source(29, 9) + SourceIndex(0) +4 >Emitted(21, 12) Source(29, 18) + SourceIndex(0) +5 >Emitted(21, 13) Source(29, 19) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -346,10 +350,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(20, 5) Source(30, 5) + SourceIndex(0) -2 >Emitted(20, 6) Source(30, 6) + SourceIndex(0) -3 >Emitted(20, 8) Source(30, 8) + SourceIndex(0) -4 >Emitted(20, 9) Source(30, 9) + SourceIndex(0) +1 >Emitted(22, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(22, 6) Source(30, 6) + SourceIndex(0) +3 >Emitted(22, 8) Source(30, 8) + SourceIndex(0) +4 >Emitted(22, 9) Source(30, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -360,9 +364,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(21, 2) Source(31, 2) + SourceIndex(0) -2 >Emitted(21, 3) Source(31, 3) + SourceIndex(0) -3 >Emitted(21, 4) Source(31, 3) + SourceIndex(0) +1 >Emitted(23, 2) Source(31, 2) + SourceIndex(0) +2 >Emitted(23, 3) Source(31, 3) + SourceIndex(0) +3 >Emitted(23, 4) Source(31, 3) + SourceIndex(0) --- >>>var c3t3 = []; 1-> @@ -371,7 +375,7 @@ sourceFile:contextualTyping.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^-> 1-> > 2 >var @@ -379,77 +383,71 @@ sourceFile:contextualTyping.ts 4 > : number[] = 5 > [] 6 > ; -1->Emitted(22, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(22, 5) Source(32, 5) + SourceIndex(0) -3 >Emitted(22, 9) Source(32, 9) + SourceIndex(0) -4 >Emitted(22, 12) Source(32, 22) + SourceIndex(0) -5 >Emitted(22, 14) Source(32, 24) + SourceIndex(0) -6 >Emitted(22, 15) Source(32, 25) + SourceIndex(0) +1->Emitted(24, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(24, 5) Source(32, 5) + SourceIndex(0) +3 >Emitted(24, 9) Source(32, 9) + SourceIndex(0) +4 >Emitted(24, 12) Source(32, 22) + SourceIndex(0) +5 >Emitted(24, 14) Source(32, 24) + SourceIndex(0) +6 >Emitted(24, 15) Source(32, 25) + SourceIndex(0) --- ->>>var c3t4 = function () { return ({}); }; +>>>var c3t4 = function () { 1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^^^^^ -7 > ^ -8 > ^ -9 > ^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^^-> +5 > ^^^^^^-> 1-> > 2 >var 3 > c3t4 4 > : () => IFoo = -5 > function() { -6 > return -7 > -8 > ( -9 > {} -10> ) -11> -12> -13> } -14> ; -1->Emitted(23, 1) Source(33, 1) + SourceIndex(0) -2 >Emitted(23, 5) Source(33, 5) + SourceIndex(0) -3 >Emitted(23, 9) Source(33, 9) + SourceIndex(0) -4 >Emitted(23, 12) Source(33, 24) + SourceIndex(0) -5 >Emitted(23, 26) Source(33, 37) + SourceIndex(0) -6 >Emitted(23, 32) Source(33, 43) + SourceIndex(0) -7 >Emitted(23, 33) Source(33, 50) + SourceIndex(0) -8 >Emitted(23, 34) Source(33, 51) + SourceIndex(0) -9 >Emitted(23, 36) Source(33, 53) + SourceIndex(0) -10>Emitted(23, 37) Source(33, 54) + SourceIndex(0) -11>Emitted(23, 38) Source(33, 54) + SourceIndex(0) -12>Emitted(23, 39) Source(33, 55) + SourceIndex(0) -13>Emitted(23, 40) Source(33, 56) + SourceIndex(0) -14>Emitted(23, 41) Source(33, 57) + SourceIndex(0) +1->Emitted(25, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(25, 5) Source(33, 5) + SourceIndex(0) +3 >Emitted(25, 9) Source(33, 9) + SourceIndex(0) +4 >Emitted(25, 12) Source(33, 24) + SourceIndex(0) --- ->>>var c3t5 = function (n) { return ({}); }; +>>> return ({}); +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1->function() { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1->Emitted(26, 5) Source(33, 37) + SourceIndex(0) +2 >Emitted(26, 11) Source(33, 43) + SourceIndex(0) +3 >Emitted(26, 12) Source(33, 50) + SourceIndex(0) +4 >Emitted(26, 13) Source(33, 51) + SourceIndex(0) +5 >Emitted(26, 15) Source(33, 53) + SourceIndex(0) +6 >Emitted(26, 16) Source(33, 54) + SourceIndex(0) +7 >Emitted(26, 17) Source(33, 54) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(27, 1) Source(33, 55) + SourceIndex(0) +2 >Emitted(27, 2) Source(33, 56) + SourceIndex(0) +3 >Emitted(27, 3) Source(33, 57) + SourceIndex(0) +--- +>>>var c3t5 = function (n) { 1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^^^^-> 1-> > 2 >var @@ -457,34 +455,49 @@ sourceFile:contextualTyping.ts 4 > : (n: number) => IFoo = 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> ( -11> {} -12> ) -13> -14> -15> } -16> ; -1->Emitted(24, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(24, 5) Source(34, 5) + SourceIndex(0) -3 >Emitted(24, 9) Source(34, 9) + SourceIndex(0) -4 >Emitted(24, 12) Source(34, 33) + SourceIndex(0) -5 >Emitted(24, 22) Source(34, 42) + SourceIndex(0) -6 >Emitted(24, 23) Source(34, 43) + SourceIndex(0) -7 >Emitted(24, 27) Source(34, 47) + SourceIndex(0) -8 >Emitted(24, 33) Source(34, 53) + SourceIndex(0) -9 >Emitted(24, 34) Source(34, 60) + SourceIndex(0) -10>Emitted(24, 35) Source(34, 61) + SourceIndex(0) -11>Emitted(24, 37) Source(34, 63) + SourceIndex(0) -12>Emitted(24, 38) Source(34, 64) + SourceIndex(0) -13>Emitted(24, 39) Source(34, 64) + SourceIndex(0) -14>Emitted(24, 40) Source(34, 65) + SourceIndex(0) -15>Emitted(24, 41) Source(34, 66) + SourceIndex(0) -16>Emitted(24, 42) Source(34, 67) + SourceIndex(0) +1->Emitted(28, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(28, 5) Source(34, 5) + SourceIndex(0) +3 >Emitted(28, 9) Source(34, 9) + SourceIndex(0) +4 >Emitted(28, 12) Source(34, 33) + SourceIndex(0) +5 >Emitted(28, 22) Source(34, 42) + SourceIndex(0) +6 >Emitted(28, 23) Source(34, 43) + SourceIndex(0) --- ->>>var c3t6 = function (n, s) { return ({}); }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(29, 5) Source(34, 47) + SourceIndex(0) +2 >Emitted(29, 11) Source(34, 53) + SourceIndex(0) +3 >Emitted(29, 12) Source(34, 60) + SourceIndex(0) +4 >Emitted(29, 13) Source(34, 61) + SourceIndex(0) +5 >Emitted(29, 15) Source(34, 63) + SourceIndex(0) +6 >Emitted(29, 16) Source(34, 64) + SourceIndex(0) +7 >Emitted(29, 17) Source(34, 64) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(30, 1) Source(34, 65) + SourceIndex(0) +2 >Emitted(30, 2) Source(34, 66) + SourceIndex(0) +3 >Emitted(30, 3) Source(34, 67) + SourceIndex(0) +--- +>>>var c3t6 = function (n, s) { 1-> 2 >^^^^ 3 > ^^^^ @@ -493,16 +506,6 @@ sourceFile:contextualTyping.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^^ -10> ^^^^^^ -11> ^ -12> ^ -13> ^^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ 1-> > 2 >var @@ -512,52 +515,58 @@ sourceFile:contextualTyping.ts 6 > n 7 > , 8 > s -9 > ) { -10> return -11> -12> ( -13> {} -14> ) -15> -16> -17> } -18> ; -1->Emitted(25, 1) Source(35, 1) + SourceIndex(0) -2 >Emitted(25, 5) Source(35, 5) + SourceIndex(0) -3 >Emitted(25, 9) Source(35, 9) + SourceIndex(0) -4 >Emitted(25, 12) Source(35, 44) + SourceIndex(0) -5 >Emitted(25, 22) Source(35, 53) + SourceIndex(0) -6 >Emitted(25, 23) Source(35, 54) + SourceIndex(0) -7 >Emitted(25, 25) Source(35, 56) + SourceIndex(0) -8 >Emitted(25, 26) Source(35, 57) + SourceIndex(0) -9 >Emitted(25, 30) Source(35, 61) + SourceIndex(0) -10>Emitted(25, 36) Source(35, 67) + SourceIndex(0) -11>Emitted(25, 37) Source(35, 74) + SourceIndex(0) -12>Emitted(25, 38) Source(35, 75) + SourceIndex(0) -13>Emitted(25, 40) Source(35, 77) + SourceIndex(0) -14>Emitted(25, 41) Source(35, 78) + SourceIndex(0) -15>Emitted(25, 42) Source(35, 78) + SourceIndex(0) -16>Emitted(25, 43) Source(35, 79) + SourceIndex(0) -17>Emitted(25, 44) Source(35, 80) + SourceIndex(0) -18>Emitted(25, 45) Source(35, 81) + SourceIndex(0) +1->Emitted(31, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(31, 5) Source(35, 5) + SourceIndex(0) +3 >Emitted(31, 9) Source(35, 9) + SourceIndex(0) +4 >Emitted(31, 12) Source(35, 44) + SourceIndex(0) +5 >Emitted(31, 22) Source(35, 53) + SourceIndex(0) +6 >Emitted(31, 23) Source(35, 54) + SourceIndex(0) +7 >Emitted(31, 25) Source(35, 56) + SourceIndex(0) +8 >Emitted(31, 26) Source(35, 57) + SourceIndex(0) --- ->>>var c3t7 = function (n) { return n; }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(32, 5) Source(35, 61) + SourceIndex(0) +2 >Emitted(32, 11) Source(35, 67) + SourceIndex(0) +3 >Emitted(32, 12) Source(35, 74) + SourceIndex(0) +4 >Emitted(32, 13) Source(35, 75) + SourceIndex(0) +5 >Emitted(32, 15) Source(35, 77) + SourceIndex(0) +6 >Emitted(32, 16) Source(35, 78) + SourceIndex(0) +7 >Emitted(32, 17) Source(35, 78) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(33, 1) Source(35, 79) + SourceIndex(0) +2 >Emitted(33, 2) Source(35, 80) + SourceIndex(0) +3 >Emitted(33, 3) Source(35, 81) + SourceIndex(0) +--- +>>>var c3t7 = function (n) { +1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^-> -1 > +1-> > 2 >var 3 > c3t7 @@ -567,44 +576,49 @@ sourceFile:contextualTyping.ts > } = 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> n -11> ; -12> -13> } -14> ; -1 >Emitted(26, 1) Source(36, 1) + SourceIndex(0) -2 >Emitted(26, 5) Source(36, 5) + SourceIndex(0) -3 >Emitted(26, 9) Source(36, 9) + SourceIndex(0) -4 >Emitted(26, 12) Source(39, 5) + SourceIndex(0) -5 >Emitted(26, 22) Source(39, 14) + SourceIndex(0) -6 >Emitted(26, 23) Source(39, 15) + SourceIndex(0) -7 >Emitted(26, 27) Source(39, 19) + SourceIndex(0) -8 >Emitted(26, 33) Source(39, 25) + SourceIndex(0) -9 >Emitted(26, 34) Source(39, 26) + SourceIndex(0) -10>Emitted(26, 35) Source(39, 27) + SourceIndex(0) -11>Emitted(26, 36) Source(39, 28) + SourceIndex(0) -12>Emitted(26, 37) Source(39, 29) + SourceIndex(0) -13>Emitted(26, 38) Source(39, 30) + SourceIndex(0) -14>Emitted(26, 39) Source(39, 31) + SourceIndex(0) +1->Emitted(34, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(34, 5) Source(36, 5) + SourceIndex(0) +3 >Emitted(34, 9) Source(36, 9) + SourceIndex(0) +4 >Emitted(34, 12) Source(39, 5) + SourceIndex(0) +5 >Emitted(34, 22) Source(39, 14) + SourceIndex(0) +6 >Emitted(34, 23) Source(39, 15) + SourceIndex(0) --- ->>>var c3t8 = function (n) { return n; }; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > ; +1 >Emitted(35, 5) Source(39, 19) + SourceIndex(0) +2 >Emitted(35, 11) Source(39, 25) + SourceIndex(0) +3 >Emitted(35, 12) Source(39, 26) + SourceIndex(0) +4 >Emitted(35, 13) Source(39, 27) + SourceIndex(0) +5 >Emitted(35, 14) Source(39, 28) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(36, 1) Source(39, 29) + SourceIndex(0) +2 >Emitted(36, 2) Source(39, 30) + SourceIndex(0) +3 >Emitted(36, 3) Source(39, 31) + SourceIndex(0) +--- +>>>var c3t8 = function (n) { 1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1-> > > @@ -613,181 +627,218 @@ sourceFile:contextualTyping.ts 4 > : (n: number, s: string) => number = 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> n -11> ; -12> -13> } -14> ; -1->Emitted(27, 1) Source(41, 1) + SourceIndex(0) -2 >Emitted(27, 5) Source(41, 5) + SourceIndex(0) -3 >Emitted(27, 9) Source(41, 9) + SourceIndex(0) -4 >Emitted(27, 12) Source(41, 46) + SourceIndex(0) -5 >Emitted(27, 22) Source(41, 55) + SourceIndex(0) -6 >Emitted(27, 23) Source(41, 56) + SourceIndex(0) -7 >Emitted(27, 27) Source(41, 60) + SourceIndex(0) -8 >Emitted(27, 33) Source(41, 66) + SourceIndex(0) -9 >Emitted(27, 34) Source(41, 67) + SourceIndex(0) -10>Emitted(27, 35) Source(41, 68) + SourceIndex(0) -11>Emitted(27, 36) Source(41, 69) + SourceIndex(0) -12>Emitted(27, 37) Source(41, 70) + SourceIndex(0) -13>Emitted(27, 38) Source(41, 71) + SourceIndex(0) -14>Emitted(27, 39) Source(41, 72) + SourceIndex(0) +1->Emitted(37, 1) Source(41, 1) + SourceIndex(0) +2 >Emitted(37, 5) Source(41, 5) + SourceIndex(0) +3 >Emitted(37, 9) Source(41, 9) + SourceIndex(0) +4 >Emitted(37, 12) Source(41, 46) + SourceIndex(0) +5 >Emitted(37, 22) Source(41, 55) + SourceIndex(0) +6 >Emitted(37, 23) Source(41, 56) + SourceIndex(0) --- ->>>var c3t9 = [[], []]; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > ; +1 >Emitted(38, 5) Source(41, 60) + SourceIndex(0) +2 >Emitted(38, 11) Source(41, 66) + SourceIndex(0) +3 >Emitted(38, 12) Source(41, 67) + SourceIndex(0) +4 >Emitted(38, 13) Source(41, 68) + SourceIndex(0) +5 >Emitted(38, 14) Source(41, 69) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(39, 1) Source(41, 70) + SourceIndex(0) +2 >Emitted(39, 2) Source(41, 71) + SourceIndex(0) +3 >Emitted(39, 3) Source(41, 72) + SourceIndex(0) +--- +>>>var c3t9 = [ +1-> 2 >^^^^ 3 > ^^^^ 4 > ^^^ -5 > ^ -6 > ^^ -7 > ^^ -8 > ^^ -9 > ^ -10> ^ -11> ^^^^^^-> -1 > +1-> > 2 >var 3 > c3t9 4 > : number[][] = -5 > [ -6 > [] -7 > , -8 > [] -9 > ] -10> ; -1 >Emitted(28, 1) Source(42, 1) + SourceIndex(0) -2 >Emitted(28, 5) Source(42, 5) + SourceIndex(0) -3 >Emitted(28, 9) Source(42, 9) + SourceIndex(0) -4 >Emitted(28, 12) Source(42, 24) + SourceIndex(0) -5 >Emitted(28, 13) Source(42, 25) + SourceIndex(0) -6 >Emitted(28, 15) Source(42, 27) + SourceIndex(0) -7 >Emitted(28, 17) Source(42, 28) + SourceIndex(0) -8 >Emitted(28, 19) Source(42, 30) + SourceIndex(0) -9 >Emitted(28, 20) Source(42, 31) + SourceIndex(0) -10>Emitted(28, 21) Source(42, 32) + SourceIndex(0) +1->Emitted(40, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(40, 5) Source(42, 5) + SourceIndex(0) +3 >Emitted(40, 9) Source(42, 9) + SourceIndex(0) +4 >Emitted(40, 12) Source(42, 24) + SourceIndex(0) --- ->>>var c3t10 = [({}), ({})]; +>>> [], +1 >^^^^ +2 > ^^ +3 > ^-> +1 >[ +2 > [] +1 >Emitted(41, 5) Source(42, 25) + SourceIndex(0) +2 >Emitted(41, 7) Source(42, 27) + SourceIndex(0) +--- +>>> [] +1->^^^^ +2 > ^^ +1->, +2 > [] +1->Emitted(42, 5) Source(42, 28) + SourceIndex(0) +2 >Emitted(42, 7) Source(42, 30) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(43, 2) Source(42, 31) + SourceIndex(0) +2 >Emitted(43, 3) Source(42, 32) + SourceIndex(0) +--- +>>>var c3t10 = [ 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ -5 > ^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^ -12> ^ -13> ^ -14> ^ -15> ^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >var 3 > c3t10 4 > : IFoo[] = -5 > [ -6 > ( -7 > {} -8 > ) -9 > , -10> ( -11> {} -12> ) -13> ] -14> ; -1->Emitted(29, 1) Source(43, 1) + SourceIndex(0) -2 >Emitted(29, 5) Source(43, 5) + SourceIndex(0) -3 >Emitted(29, 10) Source(43, 10) + SourceIndex(0) -4 >Emitted(29, 13) Source(43, 21) + SourceIndex(0) -5 >Emitted(29, 14) Source(43, 28) + SourceIndex(0) -6 >Emitted(29, 15) Source(43, 29) + SourceIndex(0) -7 >Emitted(29, 17) Source(43, 31) + SourceIndex(0) -8 >Emitted(29, 18) Source(43, 32) + SourceIndex(0) -9 >Emitted(29, 20) Source(43, 39) + SourceIndex(0) -10>Emitted(29, 21) Source(43, 40) + SourceIndex(0) -11>Emitted(29, 23) Source(43, 42) + SourceIndex(0) -12>Emitted(29, 24) Source(43, 43) + SourceIndex(0) -13>Emitted(29, 25) Source(43, 44) + SourceIndex(0) -14>Emitted(29, 26) Source(43, 45) + SourceIndex(0) +1->Emitted(44, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(44, 5) Source(43, 5) + SourceIndex(0) +3 >Emitted(44, 10) Source(43, 10) + SourceIndex(0) +4 >Emitted(44, 13) Source(43, 21) + SourceIndex(0) --- ->>>var c3t11 = [function (n, s) { return s; }]; +>>> ({}), +1 >^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^-> +1 >[ +2 > ( +3 > {} +4 > ) +1 >Emitted(45, 5) Source(43, 28) + SourceIndex(0) +2 >Emitted(45, 6) Source(43, 29) + SourceIndex(0) +3 >Emitted(45, 8) Source(43, 31) + SourceIndex(0) +4 >Emitted(45, 9) Source(43, 32) + SourceIndex(0) +--- +>>> ({}) +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +1->, +2 > ( +3 > {} +4 > ) +1->Emitted(46, 5) Source(43, 39) + SourceIndex(0) +2 >Emitted(46, 6) Source(43, 40) + SourceIndex(0) +3 >Emitted(46, 8) Source(43, 42) + SourceIndex(0) +4 >Emitted(46, 9) Source(43, 43) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(47, 2) Source(43, 44) + SourceIndex(0) +2 >Emitted(47, 3) Source(43, 45) + SourceIndex(0) +--- +>>>var c3t11 = [ 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ -5 > ^ -6 > ^^^^^^^^^^ -7 > ^ -8 > ^^ -9 > ^ -10> ^^^^ -11> ^^^^^^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ +5 > ^^^^^^^^^^-> 1-> > 2 >var 3 > c3t11 4 > : {(n: number, s: string): string;}[] = -5 > [ -6 > function( -7 > n -8 > , -9 > s -10> ) { -11> return -12> -13> s -14> ; -15> -16> } -17> ] -18> ; -1->Emitted(30, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(44, 5) + SourceIndex(0) -3 >Emitted(30, 10) Source(44, 10) + SourceIndex(0) -4 >Emitted(30, 13) Source(44, 50) + SourceIndex(0) -5 >Emitted(30, 14) Source(44, 51) + SourceIndex(0) -6 >Emitted(30, 24) Source(44, 60) + SourceIndex(0) -7 >Emitted(30, 25) Source(44, 61) + SourceIndex(0) -8 >Emitted(30, 27) Source(44, 63) + SourceIndex(0) -9 >Emitted(30, 28) Source(44, 64) + SourceIndex(0) -10>Emitted(30, 32) Source(44, 68) + SourceIndex(0) -11>Emitted(30, 38) Source(44, 74) + SourceIndex(0) -12>Emitted(30, 39) Source(44, 75) + SourceIndex(0) -13>Emitted(30, 40) Source(44, 76) + SourceIndex(0) -14>Emitted(30, 41) Source(44, 77) + SourceIndex(0) -15>Emitted(30, 42) Source(44, 78) + SourceIndex(0) -16>Emitted(30, 43) Source(44, 79) + SourceIndex(0) -17>Emitted(30, 44) Source(44, 80) + SourceIndex(0) -18>Emitted(30, 45) Source(44, 81) + SourceIndex(0) +1->Emitted(48, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(48, 5) Source(44, 5) + SourceIndex(0) +3 >Emitted(48, 10) Source(44, 10) + SourceIndex(0) +4 >Emitted(48, 13) Source(44, 50) + SourceIndex(0) +--- +>>> function (n, s) { +1->^^^^ +2 > ^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +1->[ +2 > function( +3 > n +4 > , +5 > s +1->Emitted(49, 5) Source(44, 51) + SourceIndex(0) +2 >Emitted(49, 15) Source(44, 60) + SourceIndex(0) +3 >Emitted(49, 16) Source(44, 61) + SourceIndex(0) +4 >Emitted(49, 18) Source(44, 63) + SourceIndex(0) +5 >Emitted(49, 19) Source(44, 64) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(50, 9) Source(44, 68) + SourceIndex(0) +2 >Emitted(50, 15) Source(44, 74) + SourceIndex(0) +3 >Emitted(50, 16) Source(44, 75) + SourceIndex(0) +4 >Emitted(50, 17) Source(44, 76) + SourceIndex(0) +5 >Emitted(50, 18) Source(44, 77) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(51, 5) Source(44, 78) + SourceIndex(0) +2 >Emitted(51, 6) Source(44, 79) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(52, 2) Source(44, 80) + SourceIndex(0) +2 >Emitted(52, 3) Source(44, 81) + SourceIndex(0) --- >>>var c3t12 = { -1 > +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^^-> -1 > +1-> > 2 >var 3 > c3t12 4 > : IBar = -1 >Emitted(31, 1) Source(45, 1) + SourceIndex(0) -2 >Emitted(31, 5) Source(45, 5) + SourceIndex(0) -3 >Emitted(31, 10) Source(45, 10) + SourceIndex(0) -4 >Emitted(31, 13) Source(45, 19) + SourceIndex(0) +1->Emitted(53, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(53, 5) Source(45, 5) + SourceIndex(0) +3 >Emitted(53, 10) Source(45, 10) + SourceIndex(0) +4 >Emitted(53, 13) Source(45, 19) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -803,12 +854,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(32, 5) Source(46, 5) + SourceIndex(0) -2 >Emitted(32, 8) Source(46, 8) + SourceIndex(0) -3 >Emitted(32, 10) Source(46, 16) + SourceIndex(0) -4 >Emitted(32, 11) Source(46, 17) + SourceIndex(0) -5 >Emitted(32, 13) Source(46, 19) + SourceIndex(0) -6 >Emitted(32, 14) Source(46, 20) + SourceIndex(0) +1->Emitted(54, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(54, 8) Source(46, 8) + SourceIndex(0) +3 >Emitted(54, 10) Source(46, 16) + SourceIndex(0) +4 >Emitted(54, 11) Source(46, 17) + SourceIndex(0) +5 >Emitted(54, 13) Source(46, 19) + SourceIndex(0) +6 >Emitted(54, 14) Source(46, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -817,8 +868,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(33, 2) Source(47, 2) + SourceIndex(0) -2 >Emitted(33, 3) Source(47, 2) + SourceIndex(0) +1 >Emitted(55, 2) Source(47, 2) + SourceIndex(0) +2 >Emitted(55, 3) Source(47, 2) + SourceIndex(0) --- >>>var c3t13 = ({ 1-> @@ -826,20 +877,20 @@ sourceFile:contextualTyping.ts 3 > ^^^^^ 4 > ^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^-> 1-> > 2 >var 3 > c3t13 4 > = 5 > ( -1->Emitted(34, 1) Source(48, 1) + SourceIndex(0) -2 >Emitted(34, 5) Source(48, 5) + SourceIndex(0) -3 >Emitted(34, 10) Source(48, 10) + SourceIndex(0) -4 >Emitted(34, 13) Source(48, 19) + SourceIndex(0) -5 >Emitted(34, 14) Source(48, 20) + SourceIndex(0) +1->Emitted(56, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(56, 5) Source(48, 5) + SourceIndex(0) +3 >Emitted(56, 10) Source(48, 10) + SourceIndex(0) +4 >Emitted(56, 13) Source(48, 19) + SourceIndex(0) +5 >Emitted(56, 14) Source(48, 20) + SourceIndex(0) --- ->>> f: function (i, s) { return s; } +>>> f: function (i, s) { 1->^^^^ 2 > ^ 3 > ^^ @@ -847,13 +898,6 @@ sourceFile:contextualTyping.ts 5 > ^ 6 > ^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1->{ > 2 > f @@ -862,27 +906,38 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -8 > ) { -9 > return -10> -11> s -12> ; -13> -14> } -1->Emitted(35, 5) Source(49, 5) + SourceIndex(0) -2 >Emitted(35, 6) Source(49, 6) + SourceIndex(0) -3 >Emitted(35, 8) Source(49, 8) + SourceIndex(0) -4 >Emitted(35, 18) Source(49, 17) + SourceIndex(0) -5 >Emitted(35, 19) Source(49, 18) + SourceIndex(0) -6 >Emitted(35, 21) Source(49, 20) + SourceIndex(0) -7 >Emitted(35, 22) Source(49, 21) + SourceIndex(0) -8 >Emitted(35, 26) Source(49, 25) + SourceIndex(0) -9 >Emitted(35, 32) Source(49, 31) + SourceIndex(0) -10>Emitted(35, 33) Source(49, 32) + SourceIndex(0) -11>Emitted(35, 34) Source(49, 33) + SourceIndex(0) -12>Emitted(35, 35) Source(49, 34) + SourceIndex(0) -13>Emitted(35, 36) Source(49, 35) + SourceIndex(0) -14>Emitted(35, 37) Source(49, 36) + SourceIndex(0) +1->Emitted(57, 5) Source(49, 5) + SourceIndex(0) +2 >Emitted(57, 6) Source(49, 6) + SourceIndex(0) +3 >Emitted(57, 8) Source(49, 8) + SourceIndex(0) +4 >Emitted(57, 18) Source(49, 17) + SourceIndex(0) +5 >Emitted(57, 19) Source(49, 18) + SourceIndex(0) +6 >Emitted(57, 21) Source(49, 20) + SourceIndex(0) +7 >Emitted(57, 22) Source(49, 21) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(58, 9) Source(49, 25) + SourceIndex(0) +2 >Emitted(58, 15) Source(49, 31) + SourceIndex(0) +3 >Emitted(58, 16) Source(49, 32) + SourceIndex(0) +4 >Emitted(58, 17) Source(49, 33) + SourceIndex(0) +5 >Emitted(58, 18) Source(49, 34) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(59, 5) Source(49, 35) + SourceIndex(0) +2 >Emitted(59, 6) Source(49, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -893,9 +948,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(36, 2) Source(50, 2) + SourceIndex(0) -2 >Emitted(36, 3) Source(50, 3) + SourceIndex(0) -3 >Emitted(36, 4) Source(50, 3) + SourceIndex(0) +1 >Emitted(60, 2) Source(50, 2) + SourceIndex(0) +2 >Emitted(60, 3) Source(50, 3) + SourceIndex(0) +3 >Emitted(60, 4) Source(50, 3) + SourceIndex(0) --- >>>var c3t14 = ({ 1-> @@ -909,11 +964,11 @@ sourceFile:contextualTyping.ts 3 > c3t14 4 > = 5 > ( -1->Emitted(37, 1) Source(51, 1) + SourceIndex(0) -2 >Emitted(37, 5) Source(51, 5) + SourceIndex(0) -3 >Emitted(37, 10) Source(51, 10) + SourceIndex(0) -4 >Emitted(37, 13) Source(51, 19) + SourceIndex(0) -5 >Emitted(37, 14) Source(51, 20) + SourceIndex(0) +1->Emitted(61, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(61, 5) Source(51, 5) + SourceIndex(0) +3 >Emitted(61, 10) Source(51, 10) + SourceIndex(0) +4 >Emitted(61, 13) Source(51, 19) + SourceIndex(0) +5 >Emitted(61, 14) Source(51, 20) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -925,10 +980,10 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(38, 5) Source(52, 5) + SourceIndex(0) -2 >Emitted(38, 6) Source(52, 6) + SourceIndex(0) -3 >Emitted(38, 8) Source(52, 8) + SourceIndex(0) -4 >Emitted(38, 10) Source(52, 10) + SourceIndex(0) +1 >Emitted(62, 5) Source(52, 5) + SourceIndex(0) +2 >Emitted(62, 6) Source(52, 6) + SourceIndex(0) +3 >Emitted(62, 8) Source(52, 8) + SourceIndex(0) +4 >Emitted(62, 10) Source(52, 10) + SourceIndex(0) --- >>>}); 1 >^ @@ -939,9 +994,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(39, 2) Source(53, 2) + SourceIndex(0) -2 >Emitted(39, 3) Source(53, 3) + SourceIndex(0) -3 >Emitted(39, 4) Source(53, 3) + SourceIndex(0) +1 >Emitted(63, 2) Source(53, 2) + SourceIndex(0) +2 >Emitted(63, 3) Source(53, 3) + SourceIndex(0) +3 >Emitted(63, 4) Source(53, 3) + SourceIndex(0) --- >>>// CONTEXT: Class property assignment 1-> @@ -953,9 +1008,9 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Class property assignment -1->Emitted(40, 1) Source(56, 1) + SourceIndex(0) -2 >Emitted(40, 1) Source(55, 1) + SourceIndex(0) -3 >Emitted(40, 38) Source(55, 38) + SourceIndex(0) +1->Emitted(64, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(64, 1) Source(55, 1) + SourceIndex(0) +3 >Emitted(64, 38) Source(55, 38) + SourceIndex(0) --- >>>var C4T5 = (function () { >>> function C4T5() { @@ -965,7 +1020,7 @@ sourceFile:contextualTyping.ts >class C4T5 { > foo: (i: number, s: string) => string; > -1 >Emitted(42, 5) Source(58, 5) + SourceIndex(0) name (C4T5) +1 >Emitted(66, 5) Source(58, 5) + SourceIndex(0) name (C4T5) --- >>> this.foo = function (i, s) { 1->^^^^^^^^ @@ -987,15 +1042,15 @@ sourceFile:contextualTyping.ts 7 > i 8 > , 9 > s -1->Emitted(43, 9) Source(59, 9) + SourceIndex(0) name (C4T5.constructor) -2 >Emitted(43, 13) Source(59, 13) + SourceIndex(0) name (C4T5.constructor) -3 >Emitted(43, 14) Source(59, 14) + SourceIndex(0) name (C4T5.constructor) -4 >Emitted(43, 17) Source(59, 17) + SourceIndex(0) name (C4T5.constructor) -5 >Emitted(43, 20) Source(59, 20) + SourceIndex(0) name (C4T5.constructor) -6 >Emitted(43, 30) Source(59, 29) + SourceIndex(0) name (C4T5.constructor) -7 >Emitted(43, 31) Source(59, 30) + SourceIndex(0) name (C4T5.constructor) -8 >Emitted(43, 33) Source(59, 32) + SourceIndex(0) name (C4T5.constructor) -9 >Emitted(43, 34) Source(59, 33) + SourceIndex(0) name (C4T5.constructor) +1->Emitted(67, 9) Source(59, 9) + SourceIndex(0) name (C4T5.constructor) +2 >Emitted(67, 13) Source(59, 13) + SourceIndex(0) name (C4T5.constructor) +3 >Emitted(67, 14) Source(59, 14) + SourceIndex(0) name (C4T5.constructor) +4 >Emitted(67, 17) Source(59, 17) + SourceIndex(0) name (C4T5.constructor) +5 >Emitted(67, 20) Source(59, 20) + SourceIndex(0) name (C4T5.constructor) +6 >Emitted(67, 30) Source(59, 29) + SourceIndex(0) name (C4T5.constructor) +7 >Emitted(67, 31) Source(59, 30) + SourceIndex(0) name (C4T5.constructor) +8 >Emitted(67, 33) Source(59, 32) + SourceIndex(0) name (C4T5.constructor) +9 >Emitted(67, 34) Source(59, 33) + SourceIndex(0) name (C4T5.constructor) --- >>> return s; 1 >^^^^^^^^^^^^ @@ -1009,11 +1064,11 @@ sourceFile:contextualTyping.ts 3 > 4 > s 5 > ; -1 >Emitted(44, 13) Source(60, 13) + SourceIndex(0) -2 >Emitted(44, 19) Source(60, 19) + SourceIndex(0) -3 >Emitted(44, 20) Source(60, 20) + SourceIndex(0) -4 >Emitted(44, 21) Source(60, 21) + SourceIndex(0) -5 >Emitted(44, 22) Source(60, 22) + SourceIndex(0) +1 >Emitted(68, 13) Source(60, 13) + SourceIndex(0) +2 >Emitted(68, 19) Source(60, 19) + SourceIndex(0) +3 >Emitted(68, 20) Source(60, 20) + SourceIndex(0) +4 >Emitted(68, 21) Source(60, 21) + SourceIndex(0) +5 >Emitted(68, 22) Source(60, 22) + SourceIndex(0) --- >>> }; 1 >^^^^^^^^ @@ -1023,9 +1078,9 @@ sourceFile:contextualTyping.ts > 2 > } 3 > -1 >Emitted(45, 9) Source(61, 9) + SourceIndex(0) -2 >Emitted(45, 10) Source(61, 10) + SourceIndex(0) -3 >Emitted(45, 11) Source(61, 10) + SourceIndex(0) name (C4T5.constructor) +1 >Emitted(69, 9) Source(61, 9) + SourceIndex(0) +2 >Emitted(69, 10) Source(61, 10) + SourceIndex(0) +3 >Emitted(69, 11) Source(61, 10) + SourceIndex(0) name (C4T5.constructor) --- >>> } 1 >^^^^ @@ -1034,8 +1089,8 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(46, 5) Source(62, 5) + SourceIndex(0) name (C4T5.constructor) -2 >Emitted(46, 6) Source(62, 6) + SourceIndex(0) name (C4T5.constructor) +1 >Emitted(70, 5) Source(62, 5) + SourceIndex(0) name (C4T5.constructor) +2 >Emitted(70, 6) Source(62, 6) + SourceIndex(0) name (C4T5.constructor) --- >>> return C4T5; 1->^^^^ @@ -1043,8 +1098,8 @@ sourceFile:contextualTyping.ts 1-> > 2 > } -1->Emitted(47, 5) Source(63, 1) + SourceIndex(0) name (C4T5) -2 >Emitted(47, 16) Source(63, 2) + SourceIndex(0) name (C4T5) +1->Emitted(71, 5) Source(63, 1) + SourceIndex(0) name (C4T5) +2 >Emitted(71, 16) Source(63, 2) + SourceIndex(0) name (C4T5) --- >>>})(); 1 > @@ -1063,10 +1118,10 @@ sourceFile:contextualTyping.ts > } > } > } -1 >Emitted(48, 1) Source(63, 1) + SourceIndex(0) name (C4T5) -2 >Emitted(48, 2) Source(63, 2) + SourceIndex(0) name (C4T5) -3 >Emitted(48, 2) Source(56, 1) + SourceIndex(0) -4 >Emitted(48, 6) Source(63, 2) + SourceIndex(0) +1 >Emitted(72, 1) Source(63, 1) + SourceIndex(0) name (C4T5) +2 >Emitted(72, 2) Source(63, 2) + SourceIndex(0) name (C4T5) +3 >Emitted(72, 2) Source(56, 1) + SourceIndex(0) +4 >Emitted(72, 6) Source(63, 2) + SourceIndex(0) --- >>>// CONTEXT: Module property assignment 1-> @@ -1078,9 +1133,9 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Module property assignment -1->Emitted(49, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(49, 1) Source(65, 1) + SourceIndex(0) -3 >Emitted(49, 39) Source(65, 39) + SourceIndex(0) +1->Emitted(73, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(73, 1) Source(65, 1) + SourceIndex(0) +3 >Emitted(73, 39) Source(65, 39) + SourceIndex(0) --- >>>var C5T5; 1 > @@ -1098,10 +1153,10 @@ sourceFile:contextualTyping.ts > return s; > } > } -1 >Emitted(50, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(50, 5) Source(66, 8) + SourceIndex(0) -3 >Emitted(50, 9) Source(66, 12) + SourceIndex(0) -4 >Emitted(50, 10) Source(71, 2) + SourceIndex(0) +1 >Emitted(74, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(74, 5) Source(66, 8) + SourceIndex(0) +3 >Emitted(74, 9) Source(66, 12) + SourceIndex(0) +4 >Emitted(74, 10) Source(71, 2) + SourceIndex(0) --- >>>(function (C5T5) { 1-> @@ -1114,11 +1169,11 @@ sourceFile:contextualTyping.ts 3 > C5T5 4 > 5 > { -1->Emitted(51, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(51, 12) Source(66, 8) + SourceIndex(0) -3 >Emitted(51, 16) Source(66, 12) + SourceIndex(0) -4 >Emitted(51, 18) Source(66, 13) + SourceIndex(0) -5 >Emitted(51, 19) Source(66, 14) + SourceIndex(0) +1->Emitted(75, 1) Source(66, 1) + SourceIndex(0) +2 >Emitted(75, 12) Source(66, 8) + SourceIndex(0) +3 >Emitted(75, 16) Source(66, 12) + SourceIndex(0) +4 >Emitted(75, 18) Source(66, 13) + SourceIndex(0) +5 >Emitted(75, 19) Source(66, 14) + SourceIndex(0) --- >>> C5T5.foo; 1 >^^^^ @@ -1129,9 +1184,9 @@ sourceFile:contextualTyping.ts > export var 2 > foo: (i: number, s: string) => string 3 > ; -1 >Emitted(52, 5) Source(67, 16) + SourceIndex(0) name (C5T5) -2 >Emitted(52, 13) Source(67, 53) + SourceIndex(0) name (C5T5) -3 >Emitted(52, 14) Source(67, 54) + SourceIndex(0) name (C5T5) +1 >Emitted(76, 5) Source(67, 16) + SourceIndex(0) name (C5T5) +2 >Emitted(76, 13) Source(67, 53) + SourceIndex(0) name (C5T5) +3 >Emitted(76, 14) Source(67, 54) + SourceIndex(0) name (C5T5) --- >>> C5T5.foo = function (i, s) { 1->^^^^ @@ -1149,13 +1204,13 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -1->Emitted(53, 5) Source(68, 5) + SourceIndex(0) name (C5T5) -2 >Emitted(53, 13) Source(68, 8) + SourceIndex(0) name (C5T5) -3 >Emitted(53, 16) Source(68, 11) + SourceIndex(0) name (C5T5) -4 >Emitted(53, 26) Source(68, 20) + SourceIndex(0) name (C5T5) -5 >Emitted(53, 27) Source(68, 21) + SourceIndex(0) name (C5T5) -6 >Emitted(53, 29) Source(68, 23) + SourceIndex(0) name (C5T5) -7 >Emitted(53, 30) Source(68, 24) + SourceIndex(0) name (C5T5) +1->Emitted(77, 5) Source(68, 5) + SourceIndex(0) name (C5T5) +2 >Emitted(77, 13) Source(68, 8) + SourceIndex(0) name (C5T5) +3 >Emitted(77, 16) Source(68, 11) + SourceIndex(0) name (C5T5) +4 >Emitted(77, 26) Source(68, 20) + SourceIndex(0) name (C5T5) +5 >Emitted(77, 27) Source(68, 21) + SourceIndex(0) name (C5T5) +6 >Emitted(77, 29) Source(68, 23) + SourceIndex(0) name (C5T5) +7 >Emitted(77, 30) Source(68, 24) + SourceIndex(0) name (C5T5) --- >>> return s; 1 >^^^^^^^^ @@ -1169,11 +1224,11 @@ sourceFile:contextualTyping.ts 3 > 4 > s 5 > ; -1 >Emitted(54, 9) Source(69, 9) + SourceIndex(0) -2 >Emitted(54, 15) Source(69, 15) + SourceIndex(0) -3 >Emitted(54, 16) Source(69, 16) + SourceIndex(0) -4 >Emitted(54, 17) Source(69, 17) + SourceIndex(0) -5 >Emitted(54, 18) Source(69, 18) + SourceIndex(0) +1 >Emitted(78, 9) Source(69, 9) + SourceIndex(0) +2 >Emitted(78, 15) Source(69, 15) + SourceIndex(0) +3 >Emitted(78, 16) Source(69, 16) + SourceIndex(0) +4 >Emitted(78, 17) Source(69, 17) + SourceIndex(0) +5 >Emitted(78, 18) Source(69, 18) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -1184,9 +1239,9 @@ sourceFile:contextualTyping.ts > 2 > } 3 > -1 >Emitted(55, 5) Source(70, 5) + SourceIndex(0) -2 >Emitted(55, 6) Source(70, 6) + SourceIndex(0) -3 >Emitted(55, 7) Source(70, 6) + SourceIndex(0) name (C5T5) +1 >Emitted(79, 5) Source(70, 5) + SourceIndex(0) +2 >Emitted(79, 6) Source(70, 6) + SourceIndex(0) +3 >Emitted(79, 7) Source(70, 6) + SourceIndex(0) name (C5T5) --- >>>})(C5T5 || (C5T5 = {})); 1-> @@ -1210,13 +1265,13 @@ sourceFile:contextualTyping.ts > return s; > } > } -1->Emitted(56, 1) Source(71, 1) + SourceIndex(0) name (C5T5) -2 >Emitted(56, 2) Source(71, 2) + SourceIndex(0) name (C5T5) -3 >Emitted(56, 4) Source(66, 8) + SourceIndex(0) -4 >Emitted(56, 8) Source(66, 12) + SourceIndex(0) -5 >Emitted(56, 13) Source(66, 8) + SourceIndex(0) -6 >Emitted(56, 17) Source(66, 12) + SourceIndex(0) -7 >Emitted(56, 25) Source(71, 2) + SourceIndex(0) +1->Emitted(80, 1) Source(71, 1) + SourceIndex(0) name (C5T5) +2 >Emitted(80, 2) Source(71, 2) + SourceIndex(0) name (C5T5) +3 >Emitted(80, 4) Source(66, 8) + SourceIndex(0) +4 >Emitted(80, 8) Source(66, 12) + SourceIndex(0) +5 >Emitted(80, 13) Source(66, 8) + SourceIndex(0) +6 >Emitted(80, 17) Source(66, 12) + SourceIndex(0) +7 >Emitted(80, 25) Source(71, 2) + SourceIndex(0) --- >>>// CONTEXT: Variable assignment 1-> @@ -1228,99 +1283,104 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Variable assignment -1->Emitted(57, 1) Source(74, 1) + SourceIndex(0) -2 >Emitted(57, 1) Source(73, 1) + SourceIndex(0) -3 >Emitted(57, 32) Source(73, 32) + SourceIndex(0) +1->Emitted(81, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(81, 1) Source(73, 1) + SourceIndex(0) +3 >Emitted(81, 32) Source(73, 32) + SourceIndex(0) --- >>>var c6t5; 1 >^^^^ 2 > ^^^^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - >var -2 > c6t5: (n: number) => IFoo -3 > ; -1 >Emitted(58, 5) Source(74, 5) + SourceIndex(0) -2 >Emitted(58, 9) Source(74, 30) + SourceIndex(0) -3 >Emitted(58, 10) Source(74, 31) + SourceIndex(0) ---- ->>>c6t5 = function (n) { return ({}); }; -1-> -2 >^^^^ -3 > ^^^ -4 > ^^^^^^^^^^ -5 > ^ -6 > ^^^^ -7 > ^^^^^^ -8 > ^ -9 > ^ -10> ^^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -1-> - > -2 >c6t5 -3 > = <(n: number) => IFoo> -4 > function( -5 > n -6 > ) { -7 > return -8 > -9 > ( -10> {} -11> ) -12> -13> -14> } -15> ; -1->Emitted(59, 1) Source(75, 1) + SourceIndex(0) -2 >Emitted(59, 5) Source(75, 5) + SourceIndex(0) -3 >Emitted(59, 8) Source(75, 29) + SourceIndex(0) -4 >Emitted(59, 18) Source(75, 38) + SourceIndex(0) -5 >Emitted(59, 19) Source(75, 39) + SourceIndex(0) -6 >Emitted(59, 23) Source(75, 43) + SourceIndex(0) -7 >Emitted(59, 29) Source(75, 49) + SourceIndex(0) -8 >Emitted(59, 30) Source(75, 56) + SourceIndex(0) -9 >Emitted(59, 31) Source(75, 57) + SourceIndex(0) -10>Emitted(59, 33) Source(75, 59) + SourceIndex(0) -11>Emitted(59, 34) Source(75, 60) + SourceIndex(0) -12>Emitted(59, 35) Source(75, 60) + SourceIndex(0) -13>Emitted(59, 36) Source(75, 61) + SourceIndex(0) -14>Emitted(59, 37) Source(75, 62) + SourceIndex(0) -15>Emitted(59, 38) Source(75, 63) + SourceIndex(0) ---- ->>>// CONTEXT: Array index assignment -1 > -2 > -3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > - > - >// CONTEXT: Array index assignment - > -2 > -3 >// CONTEXT: Array index assignment -1 >Emitted(60, 1) Source(78, 1) + SourceIndex(0) -2 >Emitted(60, 1) Source(77, 1) + SourceIndex(0) -3 >Emitted(60, 35) Source(77, 35) + SourceIndex(0) ---- ->>>var c7t2; -1 >^^^^ -2 > ^^^^ -3 > ^ 4 > ^^^^^^^^^^^^^-> +1 > + >var +2 > c6t5: (n: number) => IFoo +3 > ; +1 >Emitted(82, 5) Source(74, 5) + SourceIndex(0) +2 >Emitted(82, 9) Source(74, 30) + SourceIndex(0) +3 >Emitted(82, 10) Source(74, 31) + SourceIndex(0) +--- +>>>c6t5 = function (n) { +1-> +2 >^^^^ +3 > ^^^ +4 > ^^^^^^^^^^ +5 > ^ +1-> + > +2 >c6t5 +3 > = <(n: number) => IFoo> +4 > function( +5 > n +1->Emitted(83, 1) Source(75, 1) + SourceIndex(0) +2 >Emitted(83, 5) Source(75, 5) + SourceIndex(0) +3 >Emitted(83, 8) Source(75, 29) + SourceIndex(0) +4 >Emitted(83, 18) Source(75, 38) + SourceIndex(0) +5 >Emitted(83, 19) Source(75, 39) + SourceIndex(0) +--- +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(84, 5) Source(75, 43) + SourceIndex(0) +2 >Emitted(84, 11) Source(75, 49) + SourceIndex(0) +3 >Emitted(84, 12) Source(75, 56) + SourceIndex(0) +4 >Emitted(84, 13) Source(75, 57) + SourceIndex(0) +5 >Emitted(84, 15) Source(75, 59) + SourceIndex(0) +6 >Emitted(84, 16) Source(75, 60) + SourceIndex(0) +7 >Emitted(84, 17) Source(75, 60) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(85, 1) Source(75, 61) + SourceIndex(0) +2 >Emitted(85, 2) Source(75, 62) + SourceIndex(0) +3 >Emitted(85, 3) Source(75, 63) + SourceIndex(0) +--- +>>>// CONTEXT: Array index assignment +1-> +2 > +3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> + > + >// CONTEXT: Array index assignment + > +2 > +3 >// CONTEXT: Array index assignment +1->Emitted(86, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(86, 1) Source(77, 1) + SourceIndex(0) +3 >Emitted(86, 35) Source(77, 35) + SourceIndex(0) +--- +>>>var c7t2; +1 >^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^-> 1 > >var 2 > c7t2: IFoo[] 3 > ; -1 >Emitted(61, 5) Source(78, 5) + SourceIndex(0) -2 >Emitted(61, 9) Source(78, 17) + SourceIndex(0) -3 >Emitted(61, 10) Source(78, 18) + SourceIndex(0) +1 >Emitted(87, 5) Source(78, 5) + SourceIndex(0) +2 >Emitted(87, 9) Source(78, 17) + SourceIndex(0) +3 >Emitted(87, 10) Source(78, 18) + SourceIndex(0) --- ->>>c7t2[0] = ({ n: 1 }); +>>>c7t2[0] = ({ 1-> 2 >^^^^ 3 > ^ @@ -1328,13 +1388,6 @@ sourceFile:contextualTyping.ts 5 > ^ 6 > ^^^ 7 > ^ -8 > ^^ -9 > ^ -10> ^^ -11> ^ -12> ^^ -13> ^ -14> ^ 1-> > 2 >c7t2 @@ -1343,30 +1396,42 @@ sourceFile:contextualTyping.ts 5 > ] 6 > = 7 > ( -8 > { -9 > n -10> : -11> 1 -12> } -13> ) -14> ; -1->Emitted(62, 1) Source(79, 1) + SourceIndex(0) -2 >Emitted(62, 5) Source(79, 5) + SourceIndex(0) -3 >Emitted(62, 6) Source(79, 6) + SourceIndex(0) -4 >Emitted(62, 7) Source(79, 7) + SourceIndex(0) -5 >Emitted(62, 8) Source(79, 8) + SourceIndex(0) -6 >Emitted(62, 11) Source(79, 17) + SourceIndex(0) -7 >Emitted(62, 12) Source(79, 18) + SourceIndex(0) -8 >Emitted(62, 14) Source(79, 19) + SourceIndex(0) -9 >Emitted(62, 15) Source(79, 20) + SourceIndex(0) -10>Emitted(62, 17) Source(79, 22) + SourceIndex(0) -11>Emitted(62, 18) Source(79, 23) + SourceIndex(0) -12>Emitted(62, 20) Source(79, 24) + SourceIndex(0) -13>Emitted(62, 21) Source(79, 25) + SourceIndex(0) -14>Emitted(62, 22) Source(79, 26) + SourceIndex(0) +1->Emitted(88, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(88, 5) Source(79, 5) + SourceIndex(0) +3 >Emitted(88, 6) Source(79, 6) + SourceIndex(0) +4 >Emitted(88, 7) Source(79, 7) + SourceIndex(0) +5 >Emitted(88, 8) Source(79, 8) + SourceIndex(0) +6 >Emitted(88, 11) Source(79, 17) + SourceIndex(0) +7 >Emitted(88, 12) Source(79, 18) + SourceIndex(0) +--- +>>> n: 1 +1 >^^^^ +2 > ^ +3 > ^^ +4 > ^ +1 >{ +2 > n +3 > : +4 > 1 +1 >Emitted(89, 5) Source(79, 19) + SourceIndex(0) +2 >Emitted(89, 6) Source(79, 20) + SourceIndex(0) +3 >Emitted(89, 8) Source(79, 22) + SourceIndex(0) +4 >Emitted(89, 9) Source(79, 23) + SourceIndex(0) +--- +>>>}); +1 >^ +2 > ^ +3 > ^ +4 > ^^^^^^^^^^^^^^^-> +1 >} +2 > ) +3 > ; +1 >Emitted(90, 2) Source(79, 24) + SourceIndex(0) +2 >Emitted(90, 3) Source(79, 25) + SourceIndex(0) +3 >Emitted(90, 4) Source(79, 26) + SourceIndex(0) --- >>>var objc8 = ({}); -1 > +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ @@ -1374,8 +1439,8 @@ sourceFile:contextualTyping.ts 6 > ^^ 7 > ^ 8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > +9 > ^^^^^^^^^^-> +1-> > >// CONTEXT: Object property assignment >interface IPlaceHolder { @@ -1424,16 +1489,16 @@ sourceFile:contextualTyping.ts 6 > {} 7 > ) 8 > ; -1 >Emitted(63, 1) Source(102, 1) + SourceIndex(0) -2 >Emitted(63, 5) Source(102, 5) + SourceIndex(0) -3 >Emitted(63, 10) Source(102, 10) + SourceIndex(0) -4 >Emitted(63, 13) Source(120, 19) + SourceIndex(0) -5 >Emitted(63, 14) Source(120, 20) + SourceIndex(0) -6 >Emitted(63, 16) Source(120, 22) + SourceIndex(0) -7 >Emitted(63, 17) Source(120, 23) + SourceIndex(0) -8 >Emitted(63, 18) Source(120, 24) + SourceIndex(0) +1->Emitted(91, 1) Source(102, 1) + SourceIndex(0) +2 >Emitted(91, 5) Source(102, 5) + SourceIndex(0) +3 >Emitted(91, 10) Source(102, 10) + SourceIndex(0) +4 >Emitted(91, 13) Source(120, 19) + SourceIndex(0) +5 >Emitted(91, 14) Source(120, 20) + SourceIndex(0) +6 >Emitted(91, 16) Source(120, 22) + SourceIndex(0) +7 >Emitted(91, 17) Source(120, 23) + SourceIndex(0) +8 >Emitted(91, 18) Source(120, 24) + SourceIndex(0) --- ->>>objc8.t1 = (function (s) { return s; }); +>>>objc8.t1 = (function (s) { 1-> 2 >^^^^^ 3 > ^ @@ -1442,15 +1507,6 @@ sourceFile:contextualTyping.ts 6 > ^ 7 > ^^^^^^^^^^ 8 > ^ -9 > ^^^^ -10> ^^^^^^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ 1-> > > @@ -1461,53 +1517,67 @@ sourceFile:contextualTyping.ts 6 > ( 7 > function( 8 > s -9 > ) { -10> return -11> -12> s -13> -14> -15> } -16> ) -17> ; -1->Emitted(64, 1) Source(122, 1) + SourceIndex(0) -2 >Emitted(64, 6) Source(122, 6) + SourceIndex(0) -3 >Emitted(64, 7) Source(122, 7) + SourceIndex(0) -4 >Emitted(64, 9) Source(122, 9) + SourceIndex(0) -5 >Emitted(64, 12) Source(122, 12) + SourceIndex(0) -6 >Emitted(64, 13) Source(122, 13) + SourceIndex(0) -7 >Emitted(64, 23) Source(122, 22) + SourceIndex(0) -8 >Emitted(64, 24) Source(122, 23) + SourceIndex(0) -9 >Emitted(64, 28) Source(122, 27) + SourceIndex(0) -10>Emitted(64, 34) Source(122, 33) + SourceIndex(0) -11>Emitted(64, 35) Source(122, 34) + SourceIndex(0) -12>Emitted(64, 36) Source(122, 35) + SourceIndex(0) -13>Emitted(64, 37) Source(122, 35) + SourceIndex(0) -14>Emitted(64, 38) Source(122, 36) + SourceIndex(0) -15>Emitted(64, 39) Source(122, 37) + SourceIndex(0) -16>Emitted(64, 40) Source(122, 38) + SourceIndex(0) -17>Emitted(64, 41) Source(122, 39) + SourceIndex(0) +1->Emitted(92, 1) Source(122, 1) + SourceIndex(0) +2 >Emitted(92, 6) Source(122, 6) + SourceIndex(0) +3 >Emitted(92, 7) Source(122, 7) + SourceIndex(0) +4 >Emitted(92, 9) Source(122, 9) + SourceIndex(0) +5 >Emitted(92, 12) Source(122, 12) + SourceIndex(0) +6 >Emitted(92, 13) Source(122, 13) + SourceIndex(0) +7 >Emitted(92, 23) Source(122, 22) + SourceIndex(0) +8 >Emitted(92, 24) Source(122, 23) + SourceIndex(0) +--- +>>> return s; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > +1 >Emitted(93, 5) Source(122, 27) + SourceIndex(0) +2 >Emitted(93, 11) Source(122, 33) + SourceIndex(0) +3 >Emitted(93, 12) Source(122, 34) + SourceIndex(0) +4 >Emitted(93, 13) Source(122, 35) + SourceIndex(0) +5 >Emitted(93, 14) Source(122, 35) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^-> +1 > +2 >} +3 > ) +4 > ; +1 >Emitted(94, 1) Source(122, 36) + SourceIndex(0) +2 >Emitted(94, 2) Source(122, 37) + SourceIndex(0) +3 >Emitted(94, 3) Source(122, 38) + SourceIndex(0) +4 >Emitted(94, 4) Source(122, 39) + SourceIndex(0) --- >>>objc8.t2 = ({ -1 > +1-> 2 >^^^^^ 3 > ^ 4 > ^^ 5 > ^^^ 6 > ^ -1 > +1-> > 2 >objc8 3 > . 4 > t2 5 > = 6 > ( -1 >Emitted(65, 1) Source(123, 1) + SourceIndex(0) -2 >Emitted(65, 6) Source(123, 6) + SourceIndex(0) -3 >Emitted(65, 7) Source(123, 7) + SourceIndex(0) -4 >Emitted(65, 9) Source(123, 9) + SourceIndex(0) -5 >Emitted(65, 12) Source(123, 18) + SourceIndex(0) -6 >Emitted(65, 13) Source(123, 19) + SourceIndex(0) +1->Emitted(95, 1) Source(123, 1) + SourceIndex(0) +2 >Emitted(95, 6) Source(123, 6) + SourceIndex(0) +3 >Emitted(95, 7) Source(123, 7) + SourceIndex(0) +4 >Emitted(95, 9) Source(123, 9) + SourceIndex(0) +5 >Emitted(95, 12) Source(123, 18) + SourceIndex(0) +6 >Emitted(95, 13) Source(123, 19) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -1519,10 +1589,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(66, 5) Source(124, 5) + SourceIndex(0) -2 >Emitted(66, 6) Source(124, 6) + SourceIndex(0) -3 >Emitted(66, 8) Source(124, 8) + SourceIndex(0) -4 >Emitted(66, 9) Source(124, 9) + SourceIndex(0) +1 >Emitted(96, 5) Source(124, 5) + SourceIndex(0) +2 >Emitted(96, 6) Source(124, 6) + SourceIndex(0) +3 >Emitted(96, 8) Source(124, 8) + SourceIndex(0) +4 >Emitted(96, 9) Source(124, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -1533,9 +1603,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > ; -1 >Emitted(67, 2) Source(125, 2) + SourceIndex(0) -2 >Emitted(67, 3) Source(125, 3) + SourceIndex(0) -3 >Emitted(67, 4) Source(125, 4) + SourceIndex(0) +1 >Emitted(97, 2) Source(125, 2) + SourceIndex(0) +2 >Emitted(97, 3) Source(125, 3) + SourceIndex(0) +3 >Emitted(97, 4) Source(125, 4) + SourceIndex(0) --- >>>objc8.t3 = []; 1-> @@ -1545,7 +1615,7 @@ sourceFile:contextualTyping.ts 5 > ^^^ 6 > ^^ 7 > ^ -8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +8 > ^^^^^^^^^^^-> 1-> > 2 >objc8 @@ -1554,64 +1624,69 @@ sourceFile:contextualTyping.ts 5 > = 6 > [] 7 > ; -1->Emitted(68, 1) Source(126, 1) + SourceIndex(0) -2 >Emitted(68, 6) Source(126, 6) + SourceIndex(0) -3 >Emitted(68, 7) Source(126, 7) + SourceIndex(0) -4 >Emitted(68, 9) Source(126, 9) + SourceIndex(0) -5 >Emitted(68, 12) Source(126, 12) + SourceIndex(0) -6 >Emitted(68, 14) Source(126, 14) + SourceIndex(0) -7 >Emitted(68, 15) Source(126, 15) + SourceIndex(0) +1->Emitted(98, 1) Source(126, 1) + SourceIndex(0) +2 >Emitted(98, 6) Source(126, 6) + SourceIndex(0) +3 >Emitted(98, 7) Source(126, 7) + SourceIndex(0) +4 >Emitted(98, 9) Source(126, 9) + SourceIndex(0) +5 >Emitted(98, 12) Source(126, 12) + SourceIndex(0) +6 >Emitted(98, 14) Source(126, 14) + SourceIndex(0) +7 >Emitted(98, 15) Source(126, 15) + SourceIndex(0) --- ->>>objc8.t4 = function () { return ({}); }; +>>>objc8.t4 = function () { 1-> 2 >^^^^^ 3 > ^ 4 > ^^ 5 > ^^^ -6 > ^^^^^^^^^^^^^^ -7 > ^^^^^^ -8 > ^ -9 > ^ -10> ^^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^^-> +6 > ^^^^^^-> 1-> > 2 >objc8 3 > . 4 > t4 5 > = -6 > function() { -7 > return -8 > -9 > ( -10> {} -11> ) -12> -13> -14> } -15> ; -1->Emitted(69, 1) Source(127, 1) + SourceIndex(0) -2 >Emitted(69, 6) Source(127, 6) + SourceIndex(0) -3 >Emitted(69, 7) Source(127, 7) + SourceIndex(0) -4 >Emitted(69, 9) Source(127, 9) + SourceIndex(0) -5 >Emitted(69, 12) Source(127, 12) + SourceIndex(0) -6 >Emitted(69, 26) Source(127, 25) + SourceIndex(0) -7 >Emitted(69, 32) Source(127, 31) + SourceIndex(0) -8 >Emitted(69, 33) Source(127, 38) + SourceIndex(0) -9 >Emitted(69, 34) Source(127, 39) + SourceIndex(0) -10>Emitted(69, 36) Source(127, 41) + SourceIndex(0) -11>Emitted(69, 37) Source(127, 42) + SourceIndex(0) -12>Emitted(69, 38) Source(127, 42) + SourceIndex(0) -13>Emitted(69, 39) Source(127, 43) + SourceIndex(0) -14>Emitted(69, 40) Source(127, 44) + SourceIndex(0) -15>Emitted(69, 41) Source(127, 45) + SourceIndex(0) +1->Emitted(99, 1) Source(127, 1) + SourceIndex(0) +2 >Emitted(99, 6) Source(127, 6) + SourceIndex(0) +3 >Emitted(99, 7) Source(127, 7) + SourceIndex(0) +4 >Emitted(99, 9) Source(127, 9) + SourceIndex(0) +5 >Emitted(99, 12) Source(127, 12) + SourceIndex(0) --- ->>>objc8.t5 = function (n) { return ({}); }; +>>> return ({}); +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1->function() { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1->Emitted(100, 5) Source(127, 25) + SourceIndex(0) +2 >Emitted(100, 11) Source(127, 31) + SourceIndex(0) +3 >Emitted(100, 12) Source(127, 38) + SourceIndex(0) +4 >Emitted(100, 13) Source(127, 39) + SourceIndex(0) +5 >Emitted(100, 15) Source(127, 41) + SourceIndex(0) +6 >Emitted(100, 16) Source(127, 42) + SourceIndex(0) +7 >Emitted(100, 17) Source(127, 42) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(101, 1) Source(127, 43) + SourceIndex(0) +2 >Emitted(101, 2) Source(127, 44) + SourceIndex(0) +3 >Emitted(101, 3) Source(127, 45) + SourceIndex(0) +--- +>>>objc8.t5 = function (n) { 1-> 2 >^^^^^ 3 > ^ @@ -1619,17 +1694,6 @@ sourceFile:contextualTyping.ts 5 > ^^^ 6 > ^^^^^^^^^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^^^^-> 1-> > 2 >objc8 @@ -1638,35 +1702,50 @@ sourceFile:contextualTyping.ts 5 > = 6 > function( 7 > n -8 > ) { -9 > return -10> -11> ( -12> {} -13> ) -14> -15> -16> } -17> ; -1->Emitted(70, 1) Source(128, 1) + SourceIndex(0) -2 >Emitted(70, 6) Source(128, 6) + SourceIndex(0) -3 >Emitted(70, 7) Source(128, 7) + SourceIndex(0) -4 >Emitted(70, 9) Source(128, 9) + SourceIndex(0) -5 >Emitted(70, 12) Source(128, 12) + SourceIndex(0) -6 >Emitted(70, 22) Source(128, 21) + SourceIndex(0) -7 >Emitted(70, 23) Source(128, 22) + SourceIndex(0) -8 >Emitted(70, 27) Source(128, 26) + SourceIndex(0) -9 >Emitted(70, 33) Source(128, 32) + SourceIndex(0) -10>Emitted(70, 34) Source(128, 39) + SourceIndex(0) -11>Emitted(70, 35) Source(128, 40) + SourceIndex(0) -12>Emitted(70, 37) Source(128, 42) + SourceIndex(0) -13>Emitted(70, 38) Source(128, 43) + SourceIndex(0) -14>Emitted(70, 39) Source(128, 43) + SourceIndex(0) -15>Emitted(70, 40) Source(128, 44) + SourceIndex(0) -16>Emitted(70, 41) Source(128, 45) + SourceIndex(0) -17>Emitted(70, 42) Source(128, 46) + SourceIndex(0) +1->Emitted(102, 1) Source(128, 1) + SourceIndex(0) +2 >Emitted(102, 6) Source(128, 6) + SourceIndex(0) +3 >Emitted(102, 7) Source(128, 7) + SourceIndex(0) +4 >Emitted(102, 9) Source(128, 9) + SourceIndex(0) +5 >Emitted(102, 12) Source(128, 12) + SourceIndex(0) +6 >Emitted(102, 22) Source(128, 21) + SourceIndex(0) +7 >Emitted(102, 23) Source(128, 22) + SourceIndex(0) --- ->>>objc8.t6 = function (n, s) { return ({}); }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(103, 5) Source(128, 26) + SourceIndex(0) +2 >Emitted(103, 11) Source(128, 32) + SourceIndex(0) +3 >Emitted(103, 12) Source(128, 39) + SourceIndex(0) +4 >Emitted(103, 13) Source(128, 40) + SourceIndex(0) +5 >Emitted(103, 15) Source(128, 42) + SourceIndex(0) +6 >Emitted(103, 16) Source(128, 43) + SourceIndex(0) +7 >Emitted(103, 17) Source(128, 43) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(104, 1) Source(128, 44) + SourceIndex(0) +2 >Emitted(104, 2) Source(128, 45) + SourceIndex(0) +3 >Emitted(104, 3) Source(128, 46) + SourceIndex(0) +--- +>>>objc8.t6 = function (n, s) { 1-> 2 >^^^^^ 3 > ^ @@ -1676,16 +1755,6 @@ sourceFile:contextualTyping.ts 7 > ^ 8 > ^^ 9 > ^ -10> ^^^^ -11> ^^^^^^ -12> ^ -13> ^ -14> ^^ -15> ^ -16> ^ -17> ^ -18> ^ -19> ^ 1-> > 2 >objc8 @@ -1696,86 +1765,105 @@ sourceFile:contextualTyping.ts 7 > n 8 > , 9 > s -10> ) { -11> return -12> -13> ( -14> {} -15> ) -16> -17> -18> } -19> ; -1->Emitted(71, 1) Source(129, 1) + SourceIndex(0) -2 >Emitted(71, 6) Source(129, 6) + SourceIndex(0) -3 >Emitted(71, 7) Source(129, 7) + SourceIndex(0) -4 >Emitted(71, 9) Source(129, 9) + SourceIndex(0) -5 >Emitted(71, 12) Source(129, 12) + SourceIndex(0) -6 >Emitted(71, 22) Source(129, 21) + SourceIndex(0) -7 >Emitted(71, 23) Source(129, 22) + SourceIndex(0) -8 >Emitted(71, 25) Source(129, 24) + SourceIndex(0) -9 >Emitted(71, 26) Source(129, 25) + SourceIndex(0) -10>Emitted(71, 30) Source(129, 29) + SourceIndex(0) -11>Emitted(71, 36) Source(129, 35) + SourceIndex(0) -12>Emitted(71, 37) Source(129, 42) + SourceIndex(0) -13>Emitted(71, 38) Source(129, 43) + SourceIndex(0) -14>Emitted(71, 40) Source(129, 45) + SourceIndex(0) -15>Emitted(71, 41) Source(129, 46) + SourceIndex(0) -16>Emitted(71, 42) Source(129, 46) + SourceIndex(0) -17>Emitted(71, 43) Source(129, 47) + SourceIndex(0) -18>Emitted(71, 44) Source(129, 48) + SourceIndex(0) -19>Emitted(71, 45) Source(129, 49) + SourceIndex(0) +1->Emitted(105, 1) Source(129, 1) + SourceIndex(0) +2 >Emitted(105, 6) Source(129, 6) + SourceIndex(0) +3 >Emitted(105, 7) Source(129, 7) + SourceIndex(0) +4 >Emitted(105, 9) Source(129, 9) + SourceIndex(0) +5 >Emitted(105, 12) Source(129, 12) + SourceIndex(0) +6 >Emitted(105, 22) Source(129, 21) + SourceIndex(0) +7 >Emitted(105, 23) Source(129, 22) + SourceIndex(0) +8 >Emitted(105, 25) Source(129, 24) + SourceIndex(0) +9 >Emitted(105, 26) Source(129, 25) + SourceIndex(0) --- ->>>objc8.t7 = function (n) { return n; }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(106, 5) Source(129, 29) + SourceIndex(0) +2 >Emitted(106, 11) Source(129, 35) + SourceIndex(0) +3 >Emitted(106, 12) Source(129, 42) + SourceIndex(0) +4 >Emitted(106, 13) Source(129, 43) + SourceIndex(0) +5 >Emitted(106, 15) Source(129, 45) + SourceIndex(0) +6 >Emitted(106, 16) Source(129, 46) + SourceIndex(0) +7 >Emitted(106, 17) Source(129, 46) + SourceIndex(0) +--- +>>>}; 1 > -2 >^^^^^ -3 > ^ -4 > ^^ -5 > ^^^ -6 > ^^^^^^^^^^ -7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^-> -1 > - > -2 >objc8 -3 > . -4 > t7 -5 > = -6 > function( -7 > n: number -8 > ) { -9 > return -10> -11> n -12> -13> -14> } -15> ; -1 >Emitted(72, 1) Source(130, 1) + SourceIndex(0) -2 >Emitted(72, 6) Source(130, 6) + SourceIndex(0) -3 >Emitted(72, 7) Source(130, 7) + SourceIndex(0) -4 >Emitted(72, 9) Source(130, 9) + SourceIndex(0) -5 >Emitted(72, 12) Source(130, 12) + SourceIndex(0) -6 >Emitted(72, 22) Source(130, 21) + SourceIndex(0) -7 >Emitted(72, 23) Source(130, 30) + SourceIndex(0) -8 >Emitted(72, 27) Source(130, 34) + SourceIndex(0) -9 >Emitted(72, 33) Source(130, 40) + SourceIndex(0) -10>Emitted(72, 34) Source(130, 41) + SourceIndex(0) -11>Emitted(72, 35) Source(130, 42) + SourceIndex(0) -12>Emitted(72, 36) Source(130, 42) + SourceIndex(0) -13>Emitted(72, 37) Source(130, 43) + SourceIndex(0) -14>Emitted(72, 38) Source(130, 44) + SourceIndex(0) -15>Emitted(72, 39) Source(130, 45) + SourceIndex(0) +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(107, 1) Source(129, 47) + SourceIndex(0) +2 >Emitted(107, 2) Source(129, 48) + SourceIndex(0) +3 >Emitted(107, 3) Source(129, 49) + SourceIndex(0) --- ->>>objc8.t8 = function (n) { return n; }; +>>>objc8.t7 = function (n) { +1-> +2 >^^^^^ +3 > ^ +4 > ^^ +5 > ^^^ +6 > ^^^^^^^^^^ +7 > ^ +1-> + > +2 >objc8 +3 > . +4 > t7 +5 > = +6 > function( +7 > n: number +1->Emitted(108, 1) Source(130, 1) + SourceIndex(0) +2 >Emitted(108, 6) Source(130, 6) + SourceIndex(0) +3 >Emitted(108, 7) Source(130, 7) + SourceIndex(0) +4 >Emitted(108, 9) Source(130, 9) + SourceIndex(0) +5 >Emitted(108, 12) Source(130, 12) + SourceIndex(0) +6 >Emitted(108, 22) Source(130, 21) + SourceIndex(0) +7 >Emitted(108, 23) Source(130, 30) + SourceIndex(0) +--- +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > +1 >Emitted(109, 5) Source(130, 34) + SourceIndex(0) +2 >Emitted(109, 11) Source(130, 40) + SourceIndex(0) +3 >Emitted(109, 12) Source(130, 41) + SourceIndex(0) +4 >Emitted(109, 13) Source(130, 42) + SourceIndex(0) +5 >Emitted(109, 14) Source(130, 42) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(110, 1) Source(130, 43) + SourceIndex(0) +2 >Emitted(110, 2) Source(130, 44) + SourceIndex(0) +3 >Emitted(110, 3) Source(130, 45) + SourceIndex(0) +--- +>>>objc8.t8 = function (n) { 1-> 2 >^^^^^ 3 > ^ @@ -1783,14 +1871,6 @@ sourceFile:contextualTyping.ts 5 > ^^^ 6 > ^^^^^^^^^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ 1-> > > @@ -1800,194 +1880,231 @@ sourceFile:contextualTyping.ts 5 > = 6 > function( 7 > n -8 > ) { -9 > return -10> -11> n -12> ; -13> -14> } -15> ; -1->Emitted(73, 1) Source(132, 1) + SourceIndex(0) -2 >Emitted(73, 6) Source(132, 6) + SourceIndex(0) -3 >Emitted(73, 7) Source(132, 7) + SourceIndex(0) -4 >Emitted(73, 9) Source(132, 9) + SourceIndex(0) -5 >Emitted(73, 12) Source(132, 12) + SourceIndex(0) -6 >Emitted(73, 22) Source(132, 21) + SourceIndex(0) -7 >Emitted(73, 23) Source(132, 22) + SourceIndex(0) -8 >Emitted(73, 27) Source(132, 26) + SourceIndex(0) -9 >Emitted(73, 33) Source(132, 32) + SourceIndex(0) -10>Emitted(73, 34) Source(132, 33) + SourceIndex(0) -11>Emitted(73, 35) Source(132, 34) + SourceIndex(0) -12>Emitted(73, 36) Source(132, 35) + SourceIndex(0) -13>Emitted(73, 37) Source(132, 36) + SourceIndex(0) -14>Emitted(73, 38) Source(132, 37) + SourceIndex(0) -15>Emitted(73, 39) Source(132, 38) + SourceIndex(0) +1->Emitted(111, 1) Source(132, 1) + SourceIndex(0) +2 >Emitted(111, 6) Source(132, 6) + SourceIndex(0) +3 >Emitted(111, 7) Source(132, 7) + SourceIndex(0) +4 >Emitted(111, 9) Source(132, 9) + SourceIndex(0) +5 >Emitted(111, 12) Source(132, 12) + SourceIndex(0) +6 >Emitted(111, 22) Source(132, 21) + SourceIndex(0) +7 >Emitted(111, 23) Source(132, 22) + SourceIndex(0) --- ->>>objc8.t9 = [[], []]; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > ; +1 >Emitted(112, 5) Source(132, 26) + SourceIndex(0) +2 >Emitted(112, 11) Source(132, 32) + SourceIndex(0) +3 >Emitted(112, 12) Source(132, 33) + SourceIndex(0) +4 >Emitted(112, 13) Source(132, 34) + SourceIndex(0) +5 >Emitted(112, 14) Source(132, 35) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(113, 1) Source(132, 36) + SourceIndex(0) +2 >Emitted(113, 2) Source(132, 37) + SourceIndex(0) +3 >Emitted(113, 3) Source(132, 38) + SourceIndex(0) +--- +>>>objc8.t9 = [ +1-> 2 >^^^^^ 3 > ^ 4 > ^^ 5 > ^^^ -6 > ^ -7 > ^^ -8 > ^^ -9 > ^^ -10> ^ -11> ^ -12> ^^^^^^-> -1 > +1-> > 2 >objc8 3 > . 4 > t9 5 > = -6 > [ -7 > [] -8 > , -9 > [] -10> ] -11> ; -1 >Emitted(74, 1) Source(133, 1) + SourceIndex(0) -2 >Emitted(74, 6) Source(133, 6) + SourceIndex(0) -3 >Emitted(74, 7) Source(133, 7) + SourceIndex(0) -4 >Emitted(74, 9) Source(133, 9) + SourceIndex(0) -5 >Emitted(74, 12) Source(133, 12) + SourceIndex(0) -6 >Emitted(74, 13) Source(133, 13) + SourceIndex(0) -7 >Emitted(74, 15) Source(133, 15) + SourceIndex(0) -8 >Emitted(74, 17) Source(133, 16) + SourceIndex(0) -9 >Emitted(74, 19) Source(133, 18) + SourceIndex(0) -10>Emitted(74, 20) Source(133, 19) + SourceIndex(0) -11>Emitted(74, 21) Source(133, 20) + SourceIndex(0) +1->Emitted(114, 1) Source(133, 1) + SourceIndex(0) +2 >Emitted(114, 6) Source(133, 6) + SourceIndex(0) +3 >Emitted(114, 7) Source(133, 7) + SourceIndex(0) +4 >Emitted(114, 9) Source(133, 9) + SourceIndex(0) +5 >Emitted(114, 12) Source(133, 12) + SourceIndex(0) --- ->>>objc8.t10 = [({}), ({})]; +>>> [], +1 >^^^^ +2 > ^^ +3 > ^-> +1 >[ +2 > [] +1 >Emitted(115, 5) Source(133, 13) + SourceIndex(0) +2 >Emitted(115, 7) Source(133, 15) + SourceIndex(0) +--- +>>> [] +1->^^^^ +2 > ^^ +1->, +2 > [] +1->Emitted(116, 5) Source(133, 16) + SourceIndex(0) +2 >Emitted(116, 7) Source(133, 18) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(117, 2) Source(133, 19) + SourceIndex(0) +2 >Emitted(117, 3) Source(133, 20) + SourceIndex(0) +--- +>>>objc8.t10 = [ 1-> 2 >^^^^^ 3 > ^ 4 > ^^^ 5 > ^^^ -6 > ^ -7 > ^ -8 > ^^ -9 > ^ -10> ^^ -11> ^ -12> ^^ -13> ^ -14> ^ -15> ^ -16> ^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >objc8 3 > . 4 > t10 5 > = -6 > [ -7 > ( -8 > {} -9 > ) -10> , -11> ( -12> {} -13> ) -14> ] -15> ; -1->Emitted(75, 1) Source(134, 1) + SourceIndex(0) -2 >Emitted(75, 6) Source(134, 6) + SourceIndex(0) -3 >Emitted(75, 7) Source(134, 7) + SourceIndex(0) -4 >Emitted(75, 10) Source(134, 10) + SourceIndex(0) -5 >Emitted(75, 13) Source(134, 13) + SourceIndex(0) -6 >Emitted(75, 14) Source(134, 20) + SourceIndex(0) -7 >Emitted(75, 15) Source(134, 21) + SourceIndex(0) -8 >Emitted(75, 17) Source(134, 23) + SourceIndex(0) -9 >Emitted(75, 18) Source(134, 24) + SourceIndex(0) -10>Emitted(75, 20) Source(134, 31) + SourceIndex(0) -11>Emitted(75, 21) Source(134, 32) + SourceIndex(0) -12>Emitted(75, 23) Source(134, 34) + SourceIndex(0) -13>Emitted(75, 24) Source(134, 35) + SourceIndex(0) -14>Emitted(75, 25) Source(134, 36) + SourceIndex(0) -15>Emitted(75, 26) Source(134, 37) + SourceIndex(0) +1->Emitted(118, 1) Source(134, 1) + SourceIndex(0) +2 >Emitted(118, 6) Source(134, 6) + SourceIndex(0) +3 >Emitted(118, 7) Source(134, 7) + SourceIndex(0) +4 >Emitted(118, 10) Source(134, 10) + SourceIndex(0) +5 >Emitted(118, 13) Source(134, 13) + SourceIndex(0) --- ->>>objc8.t11 = [function (n, s) { return s; }]; +>>> ({}), +1 >^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^-> +1 >[ +2 > ( +3 > {} +4 > ) +1 >Emitted(119, 5) Source(134, 20) + SourceIndex(0) +2 >Emitted(119, 6) Source(134, 21) + SourceIndex(0) +3 >Emitted(119, 8) Source(134, 23) + SourceIndex(0) +4 >Emitted(119, 9) Source(134, 24) + SourceIndex(0) +--- +>>> ({}) +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +1->, +2 > ( +3 > {} +4 > ) +1->Emitted(120, 5) Source(134, 31) + SourceIndex(0) +2 >Emitted(120, 6) Source(134, 32) + SourceIndex(0) +3 >Emitted(120, 8) Source(134, 34) + SourceIndex(0) +4 >Emitted(120, 9) Source(134, 35) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(121, 2) Source(134, 36) + SourceIndex(0) +2 >Emitted(121, 3) Source(134, 37) + SourceIndex(0) +--- +>>>objc8.t11 = [ 1-> 2 >^^^^^ 3 > ^ 4 > ^^^ 5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^^^ -12> ^^^^^^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ -19> ^ +6 > ^^^^^^^^^^-> 1-> > 2 >objc8 3 > . 4 > t11 5 > = -6 > [ -7 > function( -8 > n -9 > , -10> s -11> ) { -12> return -13> -14> s -15> ; -16> -17> } -18> ] -19> ; -1->Emitted(76, 1) Source(135, 1) + SourceIndex(0) -2 >Emitted(76, 6) Source(135, 6) + SourceIndex(0) -3 >Emitted(76, 7) Source(135, 7) + SourceIndex(0) -4 >Emitted(76, 10) Source(135, 10) + SourceIndex(0) -5 >Emitted(76, 13) Source(135, 13) + SourceIndex(0) -6 >Emitted(76, 14) Source(135, 14) + SourceIndex(0) -7 >Emitted(76, 24) Source(135, 23) + SourceIndex(0) -8 >Emitted(76, 25) Source(135, 24) + SourceIndex(0) -9 >Emitted(76, 27) Source(135, 26) + SourceIndex(0) -10>Emitted(76, 28) Source(135, 27) + SourceIndex(0) -11>Emitted(76, 32) Source(135, 31) + SourceIndex(0) -12>Emitted(76, 38) Source(135, 37) + SourceIndex(0) -13>Emitted(76, 39) Source(135, 38) + SourceIndex(0) -14>Emitted(76, 40) Source(135, 39) + SourceIndex(0) -15>Emitted(76, 41) Source(135, 40) + SourceIndex(0) -16>Emitted(76, 42) Source(135, 41) + SourceIndex(0) -17>Emitted(76, 43) Source(135, 42) + SourceIndex(0) -18>Emitted(76, 44) Source(135, 43) + SourceIndex(0) -19>Emitted(76, 45) Source(135, 44) + SourceIndex(0) +1->Emitted(122, 1) Source(135, 1) + SourceIndex(0) +2 >Emitted(122, 6) Source(135, 6) + SourceIndex(0) +3 >Emitted(122, 7) Source(135, 7) + SourceIndex(0) +4 >Emitted(122, 10) Source(135, 10) + SourceIndex(0) +5 >Emitted(122, 13) Source(135, 13) + SourceIndex(0) +--- +>>> function (n, s) { +1->^^^^ +2 > ^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +1->[ +2 > function( +3 > n +4 > , +5 > s +1->Emitted(123, 5) Source(135, 14) + SourceIndex(0) +2 >Emitted(123, 15) Source(135, 23) + SourceIndex(0) +3 >Emitted(123, 16) Source(135, 24) + SourceIndex(0) +4 >Emitted(123, 18) Source(135, 26) + SourceIndex(0) +5 >Emitted(123, 19) Source(135, 27) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(124, 9) Source(135, 31) + SourceIndex(0) +2 >Emitted(124, 15) Source(135, 37) + SourceIndex(0) +3 >Emitted(124, 16) Source(135, 38) + SourceIndex(0) +4 >Emitted(124, 17) Source(135, 39) + SourceIndex(0) +5 >Emitted(124, 18) Source(135, 40) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(125, 5) Source(135, 41) + SourceIndex(0) +2 >Emitted(125, 6) Source(135, 42) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(126, 2) Source(135, 43) + SourceIndex(0) +2 >Emitted(126, 3) Source(135, 44) + SourceIndex(0) --- >>>objc8.t12 = { -1 > +1-> 2 >^^^^^ 3 > ^ 4 > ^^^ 5 > ^^^ 6 > ^^-> -1 > +1-> > 2 >objc8 3 > . 4 > t12 5 > = -1 >Emitted(77, 1) Source(136, 1) + SourceIndex(0) -2 >Emitted(77, 6) Source(136, 6) + SourceIndex(0) -3 >Emitted(77, 7) Source(136, 7) + SourceIndex(0) -4 >Emitted(77, 10) Source(136, 10) + SourceIndex(0) -5 >Emitted(77, 13) Source(136, 13) + SourceIndex(0) +1->Emitted(127, 1) Source(136, 1) + SourceIndex(0) +2 >Emitted(127, 6) Source(136, 6) + SourceIndex(0) +3 >Emitted(127, 7) Source(136, 7) + SourceIndex(0) +4 >Emitted(127, 10) Source(136, 10) + SourceIndex(0) +5 >Emitted(127, 13) Source(136, 13) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -2003,12 +2120,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(78, 5) Source(137, 5) + SourceIndex(0) -2 >Emitted(78, 8) Source(137, 8) + SourceIndex(0) -3 >Emitted(78, 10) Source(137, 16) + SourceIndex(0) -4 >Emitted(78, 11) Source(137, 17) + SourceIndex(0) -5 >Emitted(78, 13) Source(137, 19) + SourceIndex(0) -6 >Emitted(78, 14) Source(137, 20) + SourceIndex(0) +1->Emitted(128, 5) Source(137, 5) + SourceIndex(0) +2 >Emitted(128, 8) Source(137, 8) + SourceIndex(0) +3 >Emitted(128, 10) Source(137, 16) + SourceIndex(0) +4 >Emitted(128, 11) Source(137, 17) + SourceIndex(0) +5 >Emitted(128, 13) Source(137, 19) + SourceIndex(0) +6 >Emitted(128, 14) Source(137, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -2017,8 +2134,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(79, 2) Source(138, 2) + SourceIndex(0) -2 >Emitted(79, 3) Source(138, 2) + SourceIndex(0) +1 >Emitted(129, 2) Source(138, 2) + SourceIndex(0) +2 >Emitted(129, 3) Source(138, 2) + SourceIndex(0) --- >>>objc8.t13 = ({ 1-> @@ -2027,7 +2144,7 @@ sourceFile:contextualTyping.ts 4 > ^^^ 5 > ^^^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^-> 1-> > 2 >objc8 @@ -2035,14 +2152,14 @@ sourceFile:contextualTyping.ts 4 > t13 5 > = 6 > ( -1->Emitted(80, 1) Source(139, 1) + SourceIndex(0) -2 >Emitted(80, 6) Source(139, 6) + SourceIndex(0) -3 >Emitted(80, 7) Source(139, 7) + SourceIndex(0) -4 >Emitted(80, 10) Source(139, 10) + SourceIndex(0) -5 >Emitted(80, 13) Source(139, 19) + SourceIndex(0) -6 >Emitted(80, 14) Source(139, 20) + SourceIndex(0) +1->Emitted(130, 1) Source(139, 1) + SourceIndex(0) +2 >Emitted(130, 6) Source(139, 6) + SourceIndex(0) +3 >Emitted(130, 7) Source(139, 7) + SourceIndex(0) +4 >Emitted(130, 10) Source(139, 10) + SourceIndex(0) +5 >Emitted(130, 13) Source(139, 19) + SourceIndex(0) +6 >Emitted(130, 14) Source(139, 20) + SourceIndex(0) --- ->>> f: function (i, s) { return s; } +>>> f: function (i, s) { 1->^^^^ 2 > ^ 3 > ^^ @@ -2050,13 +2167,6 @@ sourceFile:contextualTyping.ts 5 > ^ 6 > ^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1->{ > 2 > f @@ -2065,27 +2175,38 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -8 > ) { -9 > return -10> -11> s -12> ; -13> -14> } -1->Emitted(81, 5) Source(140, 5) + SourceIndex(0) -2 >Emitted(81, 6) Source(140, 6) + SourceIndex(0) -3 >Emitted(81, 8) Source(140, 8) + SourceIndex(0) -4 >Emitted(81, 18) Source(140, 17) + SourceIndex(0) -5 >Emitted(81, 19) Source(140, 18) + SourceIndex(0) -6 >Emitted(81, 21) Source(140, 20) + SourceIndex(0) -7 >Emitted(81, 22) Source(140, 21) + SourceIndex(0) -8 >Emitted(81, 26) Source(140, 25) + SourceIndex(0) -9 >Emitted(81, 32) Source(140, 31) + SourceIndex(0) -10>Emitted(81, 33) Source(140, 32) + SourceIndex(0) -11>Emitted(81, 34) Source(140, 33) + SourceIndex(0) -12>Emitted(81, 35) Source(140, 34) + SourceIndex(0) -13>Emitted(81, 36) Source(140, 35) + SourceIndex(0) -14>Emitted(81, 37) Source(140, 36) + SourceIndex(0) +1->Emitted(131, 5) Source(140, 5) + SourceIndex(0) +2 >Emitted(131, 6) Source(140, 6) + SourceIndex(0) +3 >Emitted(131, 8) Source(140, 8) + SourceIndex(0) +4 >Emitted(131, 18) Source(140, 17) + SourceIndex(0) +5 >Emitted(131, 19) Source(140, 18) + SourceIndex(0) +6 >Emitted(131, 21) Source(140, 20) + SourceIndex(0) +7 >Emitted(131, 22) Source(140, 21) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(132, 9) Source(140, 25) + SourceIndex(0) +2 >Emitted(132, 15) Source(140, 31) + SourceIndex(0) +3 >Emitted(132, 16) Source(140, 32) + SourceIndex(0) +4 >Emitted(132, 17) Source(140, 33) + SourceIndex(0) +5 >Emitted(132, 18) Source(140, 34) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(133, 5) Source(140, 35) + SourceIndex(0) +2 >Emitted(133, 6) Source(140, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -2096,9 +2217,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(82, 2) Source(141, 2) + SourceIndex(0) -2 >Emitted(82, 3) Source(141, 3) + SourceIndex(0) -3 >Emitted(82, 4) Source(141, 3) + SourceIndex(0) +1 >Emitted(134, 2) Source(141, 2) + SourceIndex(0) +2 >Emitted(134, 3) Source(141, 3) + SourceIndex(0) +3 >Emitted(134, 4) Source(141, 3) + SourceIndex(0) --- >>>objc8.t14 = ({ 1-> @@ -2114,12 +2235,12 @@ sourceFile:contextualTyping.ts 4 > t14 5 > = 6 > ( -1->Emitted(83, 1) Source(142, 1) + SourceIndex(0) -2 >Emitted(83, 6) Source(142, 6) + SourceIndex(0) -3 >Emitted(83, 7) Source(142, 7) + SourceIndex(0) -4 >Emitted(83, 10) Source(142, 10) + SourceIndex(0) -5 >Emitted(83, 13) Source(142, 19) + SourceIndex(0) -6 >Emitted(83, 14) Source(142, 20) + SourceIndex(0) +1->Emitted(135, 1) Source(142, 1) + SourceIndex(0) +2 >Emitted(135, 6) Source(142, 6) + SourceIndex(0) +3 >Emitted(135, 7) Source(142, 7) + SourceIndex(0) +4 >Emitted(135, 10) Source(142, 10) + SourceIndex(0) +5 >Emitted(135, 13) Source(142, 19) + SourceIndex(0) +6 >Emitted(135, 14) Source(142, 20) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -2131,10 +2252,10 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(84, 5) Source(143, 5) + SourceIndex(0) -2 >Emitted(84, 6) Source(143, 6) + SourceIndex(0) -3 >Emitted(84, 8) Source(143, 8) + SourceIndex(0) -4 >Emitted(84, 10) Source(143, 10) + SourceIndex(0) +1 >Emitted(136, 5) Source(143, 5) + SourceIndex(0) +2 >Emitted(136, 6) Source(143, 6) + SourceIndex(0) +3 >Emitted(136, 8) Source(143, 8) + SourceIndex(0) +4 >Emitted(136, 10) Source(143, 10) + SourceIndex(0) --- >>>}); 1 >^ @@ -2145,9 +2266,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(85, 2) Source(144, 2) + SourceIndex(0) -2 >Emitted(85, 3) Source(144, 3) + SourceIndex(0) -3 >Emitted(85, 4) Source(144, 3) + SourceIndex(0) +1 >Emitted(137, 2) Source(144, 2) + SourceIndex(0) +2 >Emitted(137, 3) Source(144, 3) + SourceIndex(0) +3 >Emitted(137, 4) Source(144, 3) + SourceIndex(0) --- >>>// CONTEXT: Function call 1-> @@ -2158,33 +2279,36 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Function call -1->Emitted(86, 1) Source(146, 1) + SourceIndex(0) -2 >Emitted(86, 1) Source(145, 1) + SourceIndex(0) -3 >Emitted(86, 26) Source(145, 26) + SourceIndex(0) +1->Emitted(138, 1) Source(146, 1) + SourceIndex(0) +2 >Emitted(138, 1) Source(145, 1) + SourceIndex(0) +3 >Emitted(138, 26) Source(145, 26) + SourceIndex(0) --- ->>>function c9t5(f) { } +>>>function c9t5(f) { 1 >^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^ -4 > ^ 1 > >function c9t5( 2 > f: (n: number) => IFoo -3 > ) { -4 > } -1 >Emitted(87, 15) Source(146, 15) + SourceIndex(0) -2 >Emitted(87, 16) Source(146, 37) + SourceIndex(0) -3 >Emitted(87, 20) Source(146, 40) + SourceIndex(0) name (c9t5) -4 >Emitted(87, 21) Source(146, 41) + SourceIndex(0) name (c9t5) +1 >Emitted(139, 15) Source(146, 15) + SourceIndex(0) +2 >Emitted(139, 16) Source(146, 37) + SourceIndex(0) --- ->>>; +>>>} 1 > 2 >^ +3 > ^-> +1 >) { +2 >} +1 >Emitted(140, 1) Source(146, 40) + SourceIndex(0) name (c9t5) +2 >Emitted(140, 2) Source(146, 41) + SourceIndex(0) name (c9t5) +--- +>>>; +1-> +2 >^ 3 > ^^^^^^^^^^^^^^^^^^^-> -1 > +1-> 2 >; -1 >Emitted(88, 1) Source(146, 41) + SourceIndex(0) -2 >Emitted(88, 2) Source(146, 42) + SourceIndex(0) +1->Emitted(141, 1) Source(146, 41) + SourceIndex(0) +2 >Emitted(141, 2) Source(146, 42) + SourceIndex(0) --- >>>c9t5(function (n) { 1-> @@ -2199,11 +2323,11 @@ sourceFile:contextualTyping.ts 3 > ( 4 > function( 5 > n -1->Emitted(89, 1) Source(147, 1) + SourceIndex(0) -2 >Emitted(89, 5) Source(147, 5) + SourceIndex(0) -3 >Emitted(89, 6) Source(147, 6) + SourceIndex(0) -4 >Emitted(89, 16) Source(147, 15) + SourceIndex(0) -5 >Emitted(89, 17) Source(147, 16) + SourceIndex(0) +1->Emitted(142, 1) Source(147, 1) + SourceIndex(0) +2 >Emitted(142, 5) Source(147, 5) + SourceIndex(0) +3 >Emitted(142, 6) Source(147, 6) + SourceIndex(0) +4 >Emitted(142, 16) Source(147, 15) + SourceIndex(0) +5 >Emitted(142, 17) Source(147, 16) + SourceIndex(0) --- >>> return ({}); 1->^^^^ @@ -2221,13 +2345,13 @@ sourceFile:contextualTyping.ts 5 > {} 6 > ) 7 > ; -1->Emitted(90, 5) Source(148, 5) + SourceIndex(0) -2 >Emitted(90, 11) Source(148, 11) + SourceIndex(0) -3 >Emitted(90, 12) Source(148, 18) + SourceIndex(0) -4 >Emitted(90, 13) Source(148, 19) + SourceIndex(0) -5 >Emitted(90, 15) Source(148, 21) + SourceIndex(0) -6 >Emitted(90, 16) Source(148, 22) + SourceIndex(0) -7 >Emitted(90, 17) Source(148, 23) + SourceIndex(0) +1->Emitted(143, 5) Source(148, 5) + SourceIndex(0) +2 >Emitted(143, 11) Source(148, 11) + SourceIndex(0) +3 >Emitted(143, 12) Source(148, 18) + SourceIndex(0) +4 >Emitted(143, 13) Source(148, 19) + SourceIndex(0) +5 >Emitted(143, 15) Source(148, 21) + SourceIndex(0) +6 >Emitted(143, 16) Source(148, 22) + SourceIndex(0) +7 >Emitted(143, 17) Source(148, 23) + SourceIndex(0) --- >>>}); 1 > @@ -2240,106 +2364,115 @@ sourceFile:contextualTyping.ts 2 >} 3 > ) 4 > ; -1 >Emitted(91, 1) Source(149, 1) + SourceIndex(0) -2 >Emitted(91, 2) Source(149, 2) + SourceIndex(0) -3 >Emitted(91, 3) Source(149, 3) + SourceIndex(0) -4 >Emitted(91, 4) Source(149, 4) + SourceIndex(0) +1 >Emitted(144, 1) Source(149, 1) + SourceIndex(0) +2 >Emitted(144, 2) Source(149, 2) + SourceIndex(0) +3 >Emitted(144, 3) Source(149, 3) + SourceIndex(0) +4 >Emitted(144, 4) Source(149, 4) + SourceIndex(0) --- >>>// CONTEXT: Return statement 1-> 2 > 3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > >// CONTEXT: Return statement > 2 > 3 >// CONTEXT: Return statement -1->Emitted(92, 1) Source(152, 1) + SourceIndex(0) -2 >Emitted(92, 1) Source(151, 1) + SourceIndex(0) -3 >Emitted(92, 29) Source(151, 29) + SourceIndex(0) +1->Emitted(145, 1) Source(152, 1) + SourceIndex(0) +2 >Emitted(145, 1) Source(151, 1) + SourceIndex(0) +3 >Emitted(145, 29) Source(151, 29) + SourceIndex(0) --- ->>>var c10t5 = function () { return function (n) { return ({}); }; }; -1->^^^^ +>>>var c10t5 = function () { +1 >^^^^ 2 > ^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^^^^^^^ -8 > ^ -9 > ^^^^ -10> ^^^^^^ -11> ^ -12> ^ -13> ^^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ -19> ^ -20> ^ -21> ^ -1-> +4 > ^^^^^^^^^^^^^^-> +1 > >var 2 > c10t5 3 > : () => (n: number) => IFoo = -4 > function() { -5 > return -6 > -7 > function( -8 > n -9 > ) { -10> return -11> -12> ( -13> {} -14> ) -15> -16> -17> } -18> -19> -20> } -21> ; -1->Emitted(93, 5) Source(152, 5) + SourceIndex(0) -2 >Emitted(93, 10) Source(152, 10) + SourceIndex(0) -3 >Emitted(93, 13) Source(152, 40) + SourceIndex(0) -4 >Emitted(93, 27) Source(152, 53) + SourceIndex(0) -5 >Emitted(93, 33) Source(152, 59) + SourceIndex(0) -6 >Emitted(93, 34) Source(152, 60) + SourceIndex(0) -7 >Emitted(93, 44) Source(152, 69) + SourceIndex(0) -8 >Emitted(93, 45) Source(152, 70) + SourceIndex(0) -9 >Emitted(93, 49) Source(152, 74) + SourceIndex(0) -10>Emitted(93, 55) Source(152, 80) + SourceIndex(0) -11>Emitted(93, 56) Source(152, 87) + SourceIndex(0) -12>Emitted(93, 57) Source(152, 88) + SourceIndex(0) -13>Emitted(93, 59) Source(152, 90) + SourceIndex(0) -14>Emitted(93, 60) Source(152, 91) + SourceIndex(0) -15>Emitted(93, 61) Source(152, 91) + SourceIndex(0) -16>Emitted(93, 62) Source(152, 92) + SourceIndex(0) -17>Emitted(93, 63) Source(152, 93) + SourceIndex(0) -18>Emitted(93, 64) Source(152, 93) + SourceIndex(0) -19>Emitted(93, 65) Source(152, 94) + SourceIndex(0) -20>Emitted(93, 66) Source(152, 95) + SourceIndex(0) -21>Emitted(93, 67) Source(152, 96) + SourceIndex(0) +1 >Emitted(146, 5) Source(152, 5) + SourceIndex(0) +2 >Emitted(146, 10) Source(152, 10) + SourceIndex(0) +3 >Emitted(146, 13) Source(152, 40) + SourceIndex(0) +--- +>>> return function (n) { +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^^^^^ +5 > ^ +1->function() { +2 > return +3 > +4 > function( +5 > n +1->Emitted(147, 5) Source(152, 53) + SourceIndex(0) +2 >Emitted(147, 11) Source(152, 59) + SourceIndex(0) +3 >Emitted(147, 12) Source(152, 60) + SourceIndex(0) +4 >Emitted(147, 22) Source(152, 69) + SourceIndex(0) +5 >Emitted(147, 23) Source(152, 70) + SourceIndex(0) +--- +>>> return ({}); +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(148, 9) Source(152, 74) + SourceIndex(0) +2 >Emitted(148, 15) Source(152, 80) + SourceIndex(0) +3 >Emitted(148, 16) Source(152, 87) + SourceIndex(0) +4 >Emitted(148, 17) Source(152, 88) + SourceIndex(0) +5 >Emitted(148, 19) Source(152, 90) + SourceIndex(0) +6 >Emitted(148, 20) Source(152, 91) + SourceIndex(0) +7 >Emitted(148, 21) Source(152, 91) + SourceIndex(0) +--- +>>> }; +1 >^^^^ +2 > ^ +3 > ^ +1 > +2 > } +3 > +1 >Emitted(149, 5) Source(152, 92) + SourceIndex(0) +2 >Emitted(149, 6) Source(152, 93) + SourceIndex(0) +3 >Emitted(149, 7) Source(152, 93) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(150, 1) Source(152, 94) + SourceIndex(0) +2 >Emitted(150, 2) Source(152, 95) + SourceIndex(0) +3 >Emitted(150, 3) Source(152, 96) + SourceIndex(0) --- >>>// CONTEXT: Newing a class -1 > +1-> 2 > 3 >^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 > ^-> -1 > +1-> > >// CONTEXT: Newing a class > 2 > 3 >// CONTEXT: Newing a class -1 >Emitted(94, 1) Source(155, 1) + SourceIndex(0) -2 >Emitted(94, 1) Source(154, 1) + SourceIndex(0) -3 >Emitted(94, 27) Source(154, 27) + SourceIndex(0) +1->Emitted(151, 1) Source(155, 1) + SourceIndex(0) +2 >Emitted(151, 1) Source(154, 1) + SourceIndex(0) +3 >Emitted(151, 27) Source(154, 27) + SourceIndex(0) --- >>>var C11t5 = (function () { >>> function C11t5(f) { @@ -2350,9 +2483,9 @@ sourceFile:contextualTyping.ts >class C11t5 { 2 > constructor( 3 > f: (n: number) => IFoo -1->Emitted(96, 5) Source(155, 15) + SourceIndex(0) name (C11t5) -2 >Emitted(96, 20) Source(155, 27) + SourceIndex(0) name (C11t5) -3 >Emitted(96, 21) Source(155, 49) + SourceIndex(0) name (C11t5) +1->Emitted(153, 5) Source(155, 15) + SourceIndex(0) name (C11t5) +2 >Emitted(153, 20) Source(155, 27) + SourceIndex(0) name (C11t5) +3 >Emitted(153, 21) Source(155, 49) + SourceIndex(0) name (C11t5) --- >>> } 1 >^^^^ @@ -2360,16 +2493,16 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(97, 5) Source(155, 53) + SourceIndex(0) name (C11t5.constructor) -2 >Emitted(97, 6) Source(155, 54) + SourceIndex(0) name (C11t5.constructor) +1 >Emitted(154, 5) Source(155, 53) + SourceIndex(0) name (C11t5.constructor) +2 >Emitted(154, 6) Source(155, 54) + SourceIndex(0) name (C11t5.constructor) --- >>> return C11t5; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(98, 5) Source(155, 55) + SourceIndex(0) name (C11t5) -2 >Emitted(98, 17) Source(155, 56) + SourceIndex(0) name (C11t5) +1->Emitted(155, 5) Source(155, 55) + SourceIndex(0) name (C11t5) +2 >Emitted(155, 17) Source(155, 56) + SourceIndex(0) name (C11t5) --- >>>})(); 1 > @@ -2380,21 +2513,21 @@ sourceFile:contextualTyping.ts 2 >} 3 > 4 > class C11t5 { constructor(f: (n: number) => IFoo) { } } -1 >Emitted(99, 1) Source(155, 55) + SourceIndex(0) name (C11t5) -2 >Emitted(99, 2) Source(155, 56) + SourceIndex(0) name (C11t5) -3 >Emitted(99, 2) Source(155, 1) + SourceIndex(0) -4 >Emitted(99, 6) Source(155, 56) + SourceIndex(0) +1 >Emitted(156, 1) Source(155, 55) + SourceIndex(0) name (C11t5) +2 >Emitted(156, 2) Source(155, 56) + SourceIndex(0) name (C11t5) +3 >Emitted(156, 2) Source(155, 1) + SourceIndex(0) +4 >Emitted(156, 6) Source(155, 56) + SourceIndex(0) --- >>>; 1 > 2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >; -1 >Emitted(100, 1) Source(155, 56) + SourceIndex(0) -2 >Emitted(100, 2) Source(155, 57) + SourceIndex(0) +1 >Emitted(157, 1) Source(155, 56) + SourceIndex(0) +2 >Emitted(157, 2) Source(155, 57) + SourceIndex(0) --- ->>>var i = new C11t5(function (n) { return ({}); }); +>>>var i = new C11t5(function (n) { 1-> 2 >^^^^ 3 > ^ @@ -2404,17 +2537,6 @@ sourceFile:contextualTyping.ts 7 > ^ 8 > ^^^^^^^^^^ 9 > ^ -10> ^^^^ -11> ^^^^^^ -12> ^ -13> ^ -14> ^^ -15> ^ -16> ^ -17> ^ -18> ^ -19> ^ -20> ^ 1-> > 2 >var @@ -2425,118 +2547,138 @@ sourceFile:contextualTyping.ts 7 > ( 8 > function( 9 > n -10> ) { -11> return -12> -13> ( -14> {} -15> ) -16> -17> -18> } -19> ) -20> ; -1->Emitted(101, 1) Source(156, 1) + SourceIndex(0) -2 >Emitted(101, 5) Source(156, 5) + SourceIndex(0) -3 >Emitted(101, 6) Source(156, 6) + SourceIndex(0) -4 >Emitted(101, 9) Source(156, 9) + SourceIndex(0) -5 >Emitted(101, 13) Source(156, 13) + SourceIndex(0) -6 >Emitted(101, 18) Source(156, 18) + SourceIndex(0) -7 >Emitted(101, 19) Source(156, 19) + SourceIndex(0) -8 >Emitted(101, 29) Source(156, 28) + SourceIndex(0) -9 >Emitted(101, 30) Source(156, 29) + SourceIndex(0) -10>Emitted(101, 34) Source(156, 33) + SourceIndex(0) -11>Emitted(101, 40) Source(156, 39) + SourceIndex(0) -12>Emitted(101, 41) Source(156, 46) + SourceIndex(0) -13>Emitted(101, 42) Source(156, 47) + SourceIndex(0) -14>Emitted(101, 44) Source(156, 49) + SourceIndex(0) -15>Emitted(101, 45) Source(156, 50) + SourceIndex(0) -16>Emitted(101, 46) Source(156, 50) + SourceIndex(0) -17>Emitted(101, 47) Source(156, 51) + SourceIndex(0) -18>Emitted(101, 48) Source(156, 52) + SourceIndex(0) -19>Emitted(101, 49) Source(156, 53) + SourceIndex(0) -20>Emitted(101, 50) Source(156, 54) + SourceIndex(0) +1->Emitted(158, 1) Source(156, 1) + SourceIndex(0) +2 >Emitted(158, 5) Source(156, 5) + SourceIndex(0) +3 >Emitted(158, 6) Source(156, 6) + SourceIndex(0) +4 >Emitted(158, 9) Source(156, 9) + SourceIndex(0) +5 >Emitted(158, 13) Source(156, 13) + SourceIndex(0) +6 >Emitted(158, 18) Source(156, 18) + SourceIndex(0) +7 >Emitted(158, 19) Source(156, 19) + SourceIndex(0) +8 >Emitted(158, 29) Source(156, 28) + SourceIndex(0) +9 >Emitted(158, 30) Source(156, 29) + SourceIndex(0) +--- +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(159, 5) Source(156, 33) + SourceIndex(0) +2 >Emitted(159, 11) Source(156, 39) + SourceIndex(0) +3 >Emitted(159, 12) Source(156, 46) + SourceIndex(0) +4 >Emitted(159, 13) Source(156, 47) + SourceIndex(0) +5 >Emitted(159, 15) Source(156, 49) + SourceIndex(0) +6 >Emitted(159, 16) Source(156, 50) + SourceIndex(0) +7 >Emitted(159, 17) Source(156, 50) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ) +4 > ; +1 >Emitted(160, 1) Source(156, 51) + SourceIndex(0) +2 >Emitted(160, 2) Source(156, 52) + SourceIndex(0) +3 >Emitted(160, 3) Source(156, 53) + SourceIndex(0) +4 >Emitted(160, 4) Source(156, 54) + SourceIndex(0) --- >>>// CONTEXT: Type annotated expression -1 > +1-> 2 > 3 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^-> -1 > +1-> > >// CONTEXT: Type annotated expression > 2 > 3 >// CONTEXT: Type annotated expression -1 >Emitted(102, 1) Source(159, 1) + SourceIndex(0) -2 >Emitted(102, 1) Source(158, 1) + SourceIndex(0) -3 >Emitted(102, 38) Source(158, 38) + SourceIndex(0) +1->Emitted(161, 1) Source(159, 1) + SourceIndex(0) +2 >Emitted(161, 1) Source(158, 1) + SourceIndex(0) +3 >Emitted(161, 38) Source(158, 38) + SourceIndex(0) --- ->>>var c12t1 = (function (s) { return s; }); -1->^^^^ +>>>var c12t1 = (function (s) { +1 >^^^^ 2 > ^^^^^ 3 > ^^^ 4 > ^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^ -1-> +1 > >var 2 > c12t1 3 > = <(s: string) => string> 4 > ( 5 > function( 6 > s -7 > ) { -8 > return -9 > -10> s -11> -12> -13> } -14> ) -15> ; -1->Emitted(103, 5) Source(159, 5) + SourceIndex(0) -2 >Emitted(103, 10) Source(159, 10) + SourceIndex(0) -3 >Emitted(103, 13) Source(159, 37) + SourceIndex(0) -4 >Emitted(103, 14) Source(159, 38) + SourceIndex(0) -5 >Emitted(103, 24) Source(159, 47) + SourceIndex(0) -6 >Emitted(103, 25) Source(159, 48) + SourceIndex(0) -7 >Emitted(103, 29) Source(159, 52) + SourceIndex(0) -8 >Emitted(103, 35) Source(159, 58) + SourceIndex(0) -9 >Emitted(103, 36) Source(159, 59) + SourceIndex(0) -10>Emitted(103, 37) Source(159, 60) + SourceIndex(0) -11>Emitted(103, 38) Source(159, 60) + SourceIndex(0) -12>Emitted(103, 39) Source(159, 61) + SourceIndex(0) -13>Emitted(103, 40) Source(159, 62) + SourceIndex(0) -14>Emitted(103, 41) Source(159, 63) + SourceIndex(0) -15>Emitted(103, 42) Source(159, 64) + SourceIndex(0) +1 >Emitted(162, 5) Source(159, 5) + SourceIndex(0) +2 >Emitted(162, 10) Source(159, 10) + SourceIndex(0) +3 >Emitted(162, 13) Source(159, 37) + SourceIndex(0) +4 >Emitted(162, 14) Source(159, 38) + SourceIndex(0) +5 >Emitted(162, 24) Source(159, 47) + SourceIndex(0) +6 >Emitted(162, 25) Source(159, 48) + SourceIndex(0) +--- +>>> return s; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > +1 >Emitted(163, 5) Source(159, 52) + SourceIndex(0) +2 >Emitted(163, 11) Source(159, 58) + SourceIndex(0) +3 >Emitted(163, 12) Source(159, 59) + SourceIndex(0) +4 >Emitted(163, 13) Source(159, 60) + SourceIndex(0) +5 >Emitted(163, 14) Source(159, 60) + SourceIndex(0) +--- +>>>}); +1 > +2 >^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^-> +1 > +2 >} +3 > ) +4 > ; +1 >Emitted(164, 1) Source(159, 61) + SourceIndex(0) +2 >Emitted(164, 2) Source(159, 62) + SourceIndex(0) +3 >Emitted(164, 3) Source(159, 63) + SourceIndex(0) +4 >Emitted(164, 4) Source(159, 64) + SourceIndex(0) --- >>>var c12t2 = ({ -1 > +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^ -1 > +1-> > 2 >var 3 > c12t2 4 > = 5 > ( -1 >Emitted(104, 1) Source(160, 1) + SourceIndex(0) -2 >Emitted(104, 5) Source(160, 5) + SourceIndex(0) -3 >Emitted(104, 10) Source(160, 10) + SourceIndex(0) -4 >Emitted(104, 13) Source(160, 20) + SourceIndex(0) -5 >Emitted(104, 14) Source(160, 21) + SourceIndex(0) +1->Emitted(165, 1) Source(160, 1) + SourceIndex(0) +2 >Emitted(165, 5) Source(160, 5) + SourceIndex(0) +3 >Emitted(165, 10) Source(160, 10) + SourceIndex(0) +4 >Emitted(165, 13) Source(160, 20) + SourceIndex(0) +5 >Emitted(165, 14) Source(160, 21) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -2548,10 +2690,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(105, 5) Source(161, 5) + SourceIndex(0) -2 >Emitted(105, 6) Source(161, 6) + SourceIndex(0) -3 >Emitted(105, 8) Source(161, 8) + SourceIndex(0) -4 >Emitted(105, 9) Source(161, 9) + SourceIndex(0) +1 >Emitted(166, 5) Source(161, 5) + SourceIndex(0) +2 >Emitted(166, 6) Source(161, 6) + SourceIndex(0) +3 >Emitted(166, 8) Source(161, 8) + SourceIndex(0) +4 >Emitted(166, 9) Source(161, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -2562,9 +2704,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > ; -1 >Emitted(106, 2) Source(162, 2) + SourceIndex(0) -2 >Emitted(106, 3) Source(162, 3) + SourceIndex(0) -3 >Emitted(106, 4) Source(162, 4) + SourceIndex(0) +1 >Emitted(167, 2) Source(162, 2) + SourceIndex(0) +2 >Emitted(167, 3) Source(162, 3) + SourceIndex(0) +3 >Emitted(167, 4) Source(162, 4) + SourceIndex(0) --- >>>var c12t3 = []; 1-> @@ -2573,7 +2715,7 @@ sourceFile:contextualTyping.ts 4 > ^^^ 5 > ^^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^-> 1-> > 2 >var @@ -2581,77 +2723,71 @@ sourceFile:contextualTyping.ts 4 > = 5 > [] 6 > ; -1->Emitted(107, 1) Source(163, 1) + SourceIndex(0) -2 >Emitted(107, 5) Source(163, 5) + SourceIndex(0) -3 >Emitted(107, 10) Source(163, 10) + SourceIndex(0) -4 >Emitted(107, 13) Source(163, 24) + SourceIndex(0) -5 >Emitted(107, 15) Source(163, 26) + SourceIndex(0) -6 >Emitted(107, 16) Source(163, 27) + SourceIndex(0) +1->Emitted(168, 1) Source(163, 1) + SourceIndex(0) +2 >Emitted(168, 5) Source(163, 5) + SourceIndex(0) +3 >Emitted(168, 10) Source(163, 10) + SourceIndex(0) +4 >Emitted(168, 13) Source(163, 24) + SourceIndex(0) +5 >Emitted(168, 15) Source(163, 26) + SourceIndex(0) +6 >Emitted(168, 16) Source(163, 27) + SourceIndex(0) --- ->>>var c12t4 = function () { return ({}); }; +>>>var c12t4 = function () { 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^^^^^ -7 > ^ -8 > ^ -9 > ^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^^-> +5 > ^^^^^-> 1-> > 2 >var 3 > c12t4 4 > = <() => IFoo> -5 > function() { -6 > return -7 > -8 > ( -9 > {} -10> ) -11> -12> -13> } -14> ; -1->Emitted(108, 1) Source(164, 1) + SourceIndex(0) -2 >Emitted(108, 5) Source(164, 5) + SourceIndex(0) -3 >Emitted(108, 10) Source(164, 10) + SourceIndex(0) -4 >Emitted(108, 13) Source(164, 26) + SourceIndex(0) -5 >Emitted(108, 27) Source(164, 39) + SourceIndex(0) -6 >Emitted(108, 33) Source(164, 45) + SourceIndex(0) -7 >Emitted(108, 34) Source(164, 52) + SourceIndex(0) -8 >Emitted(108, 35) Source(164, 53) + SourceIndex(0) -9 >Emitted(108, 37) Source(164, 55) + SourceIndex(0) -10>Emitted(108, 38) Source(164, 56) + SourceIndex(0) -11>Emitted(108, 39) Source(164, 56) + SourceIndex(0) -12>Emitted(108, 40) Source(164, 57) + SourceIndex(0) -13>Emitted(108, 41) Source(164, 58) + SourceIndex(0) -14>Emitted(108, 42) Source(164, 59) + SourceIndex(0) +1->Emitted(169, 1) Source(164, 1) + SourceIndex(0) +2 >Emitted(169, 5) Source(164, 5) + SourceIndex(0) +3 >Emitted(169, 10) Source(164, 10) + SourceIndex(0) +4 >Emitted(169, 13) Source(164, 26) + SourceIndex(0) --- ->>>var c12t5 = function (n) { return ({}); }; +>>> return ({}); +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1->function() { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1->Emitted(170, 5) Source(164, 39) + SourceIndex(0) +2 >Emitted(170, 11) Source(164, 45) + SourceIndex(0) +3 >Emitted(170, 12) Source(164, 52) + SourceIndex(0) +4 >Emitted(170, 13) Source(164, 53) + SourceIndex(0) +5 >Emitted(170, 15) Source(164, 55) + SourceIndex(0) +6 >Emitted(170, 16) Source(164, 56) + SourceIndex(0) +7 >Emitted(170, 17) Source(164, 56) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(171, 1) Source(164, 57) + SourceIndex(0) +2 >Emitted(171, 2) Source(164, 58) + SourceIndex(0) +3 >Emitted(171, 3) Source(164, 59) + SourceIndex(0) +--- +>>>var c12t5 = function (n) { 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^^^^-> 1-> > 2 >var @@ -2659,34 +2795,49 @@ sourceFile:contextualTyping.ts 4 > = <(n: number) => IFoo> 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> ( -11> {} -12> ) -13> -14> -15> } -16> ; -1->Emitted(109, 1) Source(165, 1) + SourceIndex(0) -2 >Emitted(109, 5) Source(165, 5) + SourceIndex(0) -3 >Emitted(109, 10) Source(165, 10) + SourceIndex(0) -4 >Emitted(109, 13) Source(165, 35) + SourceIndex(0) -5 >Emitted(109, 23) Source(165, 44) + SourceIndex(0) -6 >Emitted(109, 24) Source(165, 45) + SourceIndex(0) -7 >Emitted(109, 28) Source(165, 49) + SourceIndex(0) -8 >Emitted(109, 34) Source(165, 55) + SourceIndex(0) -9 >Emitted(109, 35) Source(165, 62) + SourceIndex(0) -10>Emitted(109, 36) Source(165, 63) + SourceIndex(0) -11>Emitted(109, 38) Source(165, 65) + SourceIndex(0) -12>Emitted(109, 39) Source(165, 66) + SourceIndex(0) -13>Emitted(109, 40) Source(165, 66) + SourceIndex(0) -14>Emitted(109, 41) Source(165, 67) + SourceIndex(0) -15>Emitted(109, 42) Source(165, 68) + SourceIndex(0) -16>Emitted(109, 43) Source(165, 69) + SourceIndex(0) +1->Emitted(172, 1) Source(165, 1) + SourceIndex(0) +2 >Emitted(172, 5) Source(165, 5) + SourceIndex(0) +3 >Emitted(172, 10) Source(165, 10) + SourceIndex(0) +4 >Emitted(172, 13) Source(165, 35) + SourceIndex(0) +5 >Emitted(172, 23) Source(165, 44) + SourceIndex(0) +6 >Emitted(172, 24) Source(165, 45) + SourceIndex(0) --- ->>>var c12t6 = function (n, s) { return ({}); }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(173, 5) Source(165, 49) + SourceIndex(0) +2 >Emitted(173, 11) Source(165, 55) + SourceIndex(0) +3 >Emitted(173, 12) Source(165, 62) + SourceIndex(0) +4 >Emitted(173, 13) Source(165, 63) + SourceIndex(0) +5 >Emitted(173, 15) Source(165, 65) + SourceIndex(0) +6 >Emitted(173, 16) Source(165, 66) + SourceIndex(0) +7 >Emitted(173, 17) Source(165, 66) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(174, 1) Source(165, 67) + SourceIndex(0) +2 >Emitted(174, 2) Source(165, 68) + SourceIndex(0) +3 >Emitted(174, 3) Source(165, 69) + SourceIndex(0) +--- +>>>var c12t6 = function (n, s) { 1-> 2 >^^^^ 3 > ^^^^^ @@ -2695,16 +2846,6 @@ sourceFile:contextualTyping.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^^ -10> ^^^^^^ -11> ^ -12> ^ -13> ^^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ 1-> > 2 >var @@ -2714,52 +2855,58 @@ sourceFile:contextualTyping.ts 6 > n 7 > , 8 > s -9 > ) { -10> return -11> -12> ( -13> {} -14> ) -15> -16> -17> } -18> ; -1->Emitted(110, 1) Source(166, 1) + SourceIndex(0) -2 >Emitted(110, 5) Source(166, 5) + SourceIndex(0) -3 >Emitted(110, 10) Source(166, 10) + SourceIndex(0) -4 >Emitted(110, 13) Source(166, 46) + SourceIndex(0) -5 >Emitted(110, 23) Source(166, 55) + SourceIndex(0) -6 >Emitted(110, 24) Source(166, 56) + SourceIndex(0) -7 >Emitted(110, 26) Source(166, 58) + SourceIndex(0) -8 >Emitted(110, 27) Source(166, 59) + SourceIndex(0) -9 >Emitted(110, 31) Source(166, 63) + SourceIndex(0) -10>Emitted(110, 37) Source(166, 69) + SourceIndex(0) -11>Emitted(110, 38) Source(166, 76) + SourceIndex(0) -12>Emitted(110, 39) Source(166, 77) + SourceIndex(0) -13>Emitted(110, 41) Source(166, 79) + SourceIndex(0) -14>Emitted(110, 42) Source(166, 80) + SourceIndex(0) -15>Emitted(110, 43) Source(166, 80) + SourceIndex(0) -16>Emitted(110, 44) Source(166, 81) + SourceIndex(0) -17>Emitted(110, 45) Source(166, 82) + SourceIndex(0) -18>Emitted(110, 46) Source(166, 83) + SourceIndex(0) +1->Emitted(175, 1) Source(166, 1) + SourceIndex(0) +2 >Emitted(175, 5) Source(166, 5) + SourceIndex(0) +3 >Emitted(175, 10) Source(166, 10) + SourceIndex(0) +4 >Emitted(175, 13) Source(166, 46) + SourceIndex(0) +5 >Emitted(175, 23) Source(166, 55) + SourceIndex(0) +6 >Emitted(175, 24) Source(166, 56) + SourceIndex(0) +7 >Emitted(175, 26) Source(166, 58) + SourceIndex(0) +8 >Emitted(175, 27) Source(166, 59) + SourceIndex(0) --- ->>>var c12t7 = function (n) { return n; }; +>>> return ({}); +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1 >) { +2 > return +3 > +4 > ( +5 > {} +6 > ) +7 > +1 >Emitted(176, 5) Source(166, 63) + SourceIndex(0) +2 >Emitted(176, 11) Source(166, 69) + SourceIndex(0) +3 >Emitted(176, 12) Source(166, 76) + SourceIndex(0) +4 >Emitted(176, 13) Source(166, 77) + SourceIndex(0) +5 >Emitted(176, 15) Source(166, 79) + SourceIndex(0) +6 >Emitted(176, 16) Source(166, 80) + SourceIndex(0) +7 >Emitted(176, 17) Source(166, 80) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(177, 1) Source(166, 81) + SourceIndex(0) +2 >Emitted(177, 2) Source(166, 82) + SourceIndex(0) +3 >Emitted(177, 3) Source(166, 83) + SourceIndex(0) +--- +>>>var c12t7 = function (n) { +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ -15> ^-> -1 > +1-> > 2 >var 3 > c12t7 @@ -2769,44 +2916,49 @@ sourceFile:contextualTyping.ts > }> 5 > function( 6 > n:number -7 > ) { -8 > return -9 > -10> n -11> -12> -13> } -14> ; -1 >Emitted(111, 1) Source(167, 1) + SourceIndex(0) -2 >Emitted(111, 5) Source(167, 5) + SourceIndex(0) -3 >Emitted(111, 10) Source(167, 10) + SourceIndex(0) -4 >Emitted(111, 13) Source(170, 4) + SourceIndex(0) -5 >Emitted(111, 23) Source(170, 13) + SourceIndex(0) -6 >Emitted(111, 24) Source(170, 21) + SourceIndex(0) -7 >Emitted(111, 28) Source(170, 25) + SourceIndex(0) -8 >Emitted(111, 34) Source(170, 31) + SourceIndex(0) -9 >Emitted(111, 35) Source(170, 32) + SourceIndex(0) -10>Emitted(111, 36) Source(170, 33) + SourceIndex(0) -11>Emitted(111, 37) Source(170, 33) + SourceIndex(0) -12>Emitted(111, 38) Source(170, 34) + SourceIndex(0) -13>Emitted(111, 39) Source(170, 35) + SourceIndex(0) -14>Emitted(111, 40) Source(170, 36) + SourceIndex(0) +1->Emitted(178, 1) Source(167, 1) + SourceIndex(0) +2 >Emitted(178, 5) Source(167, 5) + SourceIndex(0) +3 >Emitted(178, 10) Source(167, 10) + SourceIndex(0) +4 >Emitted(178, 13) Source(170, 4) + SourceIndex(0) +5 >Emitted(178, 23) Source(170, 13) + SourceIndex(0) +6 >Emitted(178, 24) Source(170, 21) + SourceIndex(0) --- ->>>var c12t8 = function (n) { return n; }; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > +1 >Emitted(179, 5) Source(170, 25) + SourceIndex(0) +2 >Emitted(179, 11) Source(170, 31) + SourceIndex(0) +3 >Emitted(179, 12) Source(170, 32) + SourceIndex(0) +4 >Emitted(179, 13) Source(170, 33) + SourceIndex(0) +5 >Emitted(179, 14) Source(170, 33) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(180, 1) Source(170, 34) + SourceIndex(0) +2 >Emitted(180, 2) Source(170, 35) + SourceIndex(0) +3 >Emitted(180, 3) Source(170, 36) + SourceIndex(0) +--- +>>>var c12t8 = function (n) { 1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ 5 > ^^^^^^^^^^ 6 > ^ -7 > ^^^^ -8 > ^^^^^^ -9 > ^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1-> > > @@ -2815,181 +2967,218 @@ sourceFile:contextualTyping.ts 4 > = <(n: number, s: string) => number> 5 > function( 6 > n -7 > ) { -8 > return -9 > -10> n -11> ; -12> -13> } -14> ; -1->Emitted(112, 1) Source(172, 1) + SourceIndex(0) -2 >Emitted(112, 5) Source(172, 5) + SourceIndex(0) -3 >Emitted(112, 10) Source(172, 10) + SourceIndex(0) -4 >Emitted(112, 13) Source(172, 48) + SourceIndex(0) -5 >Emitted(112, 23) Source(172, 57) + SourceIndex(0) -6 >Emitted(112, 24) Source(172, 58) + SourceIndex(0) -7 >Emitted(112, 28) Source(172, 62) + SourceIndex(0) -8 >Emitted(112, 34) Source(172, 68) + SourceIndex(0) -9 >Emitted(112, 35) Source(172, 69) + SourceIndex(0) -10>Emitted(112, 36) Source(172, 70) + SourceIndex(0) -11>Emitted(112, 37) Source(172, 71) + SourceIndex(0) -12>Emitted(112, 38) Source(172, 72) + SourceIndex(0) -13>Emitted(112, 39) Source(172, 73) + SourceIndex(0) -14>Emitted(112, 40) Source(172, 74) + SourceIndex(0) +1->Emitted(181, 1) Source(172, 1) + SourceIndex(0) +2 >Emitted(181, 5) Source(172, 5) + SourceIndex(0) +3 >Emitted(181, 10) Source(172, 10) + SourceIndex(0) +4 >Emitted(181, 13) Source(172, 48) + SourceIndex(0) +5 >Emitted(181, 23) Source(172, 57) + SourceIndex(0) +6 >Emitted(181, 24) Source(172, 58) + SourceIndex(0) --- ->>>var c12t9 = [[], []]; +>>> return n; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > n +5 > ; +1 >Emitted(182, 5) Source(172, 62) + SourceIndex(0) +2 >Emitted(182, 11) Source(172, 68) + SourceIndex(0) +3 >Emitted(182, 12) Source(172, 69) + SourceIndex(0) +4 >Emitted(182, 13) Source(172, 70) + SourceIndex(0) +5 >Emitted(182, 14) Source(172, 71) + SourceIndex(0) +--- +>>>}; 1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^-> +1 > +2 >} +3 > ; +1 >Emitted(183, 1) Source(172, 72) + SourceIndex(0) +2 >Emitted(183, 2) Source(172, 73) + SourceIndex(0) +3 >Emitted(183, 3) Source(172, 74) + SourceIndex(0) +--- +>>>var c12t9 = [ +1-> 2 >^^^^ 3 > ^^^^^ 4 > ^^^ -5 > ^ -6 > ^^ -7 > ^^ -8 > ^^ -9 > ^ -10> ^ -11> ^^^^^^-> -1 > +1-> > 2 >var 3 > c12t9 4 > = -5 > [ -6 > [] -7 > , -8 > [] -9 > ] -10> ; -1 >Emitted(113, 1) Source(173, 1) + SourceIndex(0) -2 >Emitted(113, 5) Source(173, 5) + SourceIndex(0) -3 >Emitted(113, 10) Source(173, 10) + SourceIndex(0) -4 >Emitted(113, 13) Source(173, 26) + SourceIndex(0) -5 >Emitted(113, 14) Source(173, 27) + SourceIndex(0) -6 >Emitted(113, 16) Source(173, 29) + SourceIndex(0) -7 >Emitted(113, 18) Source(173, 30) + SourceIndex(0) -8 >Emitted(113, 20) Source(173, 32) + SourceIndex(0) -9 >Emitted(113, 21) Source(173, 33) + SourceIndex(0) -10>Emitted(113, 22) Source(173, 34) + SourceIndex(0) +1->Emitted(184, 1) Source(173, 1) + SourceIndex(0) +2 >Emitted(184, 5) Source(173, 5) + SourceIndex(0) +3 >Emitted(184, 10) Source(173, 10) + SourceIndex(0) +4 >Emitted(184, 13) Source(173, 26) + SourceIndex(0) --- ->>>var c12t10 = [({}), ({})]; +>>> [], +1 >^^^^ +2 > ^^ +3 > ^-> +1 >[ +2 > [] +1 >Emitted(185, 5) Source(173, 27) + SourceIndex(0) +2 >Emitted(185, 7) Source(173, 29) + SourceIndex(0) +--- +>>> [] +1->^^^^ +2 > ^^ +1->, +2 > [] +1->Emitted(186, 5) Source(173, 30) + SourceIndex(0) +2 >Emitted(186, 7) Source(173, 32) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(187, 2) Source(173, 33) + SourceIndex(0) +2 >Emitted(187, 3) Source(173, 34) + SourceIndex(0) +--- +>>>var c12t10 = [ 1-> 2 >^^^^ 3 > ^^^^^^ 4 > ^^^ -5 > ^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^ -12> ^ -13> ^ -14> ^ -15> ^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >var 3 > c12t10 4 > = -5 > [ -6 > ( -7 > {} -8 > ) -9 > , -10> ( -11> {} -12> ) -13> ] -14> ; -1->Emitted(114, 1) Source(174, 1) + SourceIndex(0) -2 >Emitted(114, 5) Source(174, 5) + SourceIndex(0) -3 >Emitted(114, 11) Source(174, 11) + SourceIndex(0) -4 >Emitted(114, 14) Source(174, 23) + SourceIndex(0) -5 >Emitted(114, 15) Source(174, 30) + SourceIndex(0) -6 >Emitted(114, 16) Source(174, 31) + SourceIndex(0) -7 >Emitted(114, 18) Source(174, 33) + SourceIndex(0) -8 >Emitted(114, 19) Source(174, 34) + SourceIndex(0) -9 >Emitted(114, 21) Source(174, 41) + SourceIndex(0) -10>Emitted(114, 22) Source(174, 42) + SourceIndex(0) -11>Emitted(114, 24) Source(174, 44) + SourceIndex(0) -12>Emitted(114, 25) Source(174, 45) + SourceIndex(0) -13>Emitted(114, 26) Source(174, 46) + SourceIndex(0) -14>Emitted(114, 27) Source(174, 47) + SourceIndex(0) +1->Emitted(188, 1) Source(174, 1) + SourceIndex(0) +2 >Emitted(188, 5) Source(174, 5) + SourceIndex(0) +3 >Emitted(188, 11) Source(174, 11) + SourceIndex(0) +4 >Emitted(188, 14) Source(174, 23) + SourceIndex(0) --- ->>>var c12t11 = [function (n, s) { return s; }]; +>>> ({}), +1 >^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^-> +1 >[ +2 > ( +3 > {} +4 > ) +1 >Emitted(189, 5) Source(174, 30) + SourceIndex(0) +2 >Emitted(189, 6) Source(174, 31) + SourceIndex(0) +3 >Emitted(189, 8) Source(174, 33) + SourceIndex(0) +4 >Emitted(189, 9) Source(174, 34) + SourceIndex(0) +--- +>>> ({}) +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +1->, +2 > ( +3 > {} +4 > ) +1->Emitted(190, 5) Source(174, 41) + SourceIndex(0) +2 >Emitted(190, 6) Source(174, 42) + SourceIndex(0) +3 >Emitted(190, 8) Source(174, 44) + SourceIndex(0) +4 >Emitted(190, 9) Source(174, 45) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(191, 2) Source(174, 46) + SourceIndex(0) +2 >Emitted(191, 3) Source(174, 47) + SourceIndex(0) +--- +>>>var c12t11 = [ 1-> 2 >^^^^ 3 > ^^^^^^ 4 > ^^^ -5 > ^ -6 > ^^^^^^^^^^ -7 > ^ -8 > ^^ -9 > ^ -10> ^^^^ -11> ^^^^^^ -12> ^ -13> ^ -14> ^ -15> ^ -16> ^ -17> ^ -18> ^ +5 > ^^^^^^^^^-> 1-> > 2 >var 3 > c12t11 4 > = <{(n: number, s: string): string;}[]> -5 > [ -6 > function( -7 > n -8 > , -9 > s -10> ) { -11> return -12> -13> s -14> ; -15> -16> } -17> ] -18> ; -1->Emitted(115, 1) Source(175, 1) + SourceIndex(0) -2 >Emitted(115, 5) Source(175, 5) + SourceIndex(0) -3 >Emitted(115, 11) Source(175, 11) + SourceIndex(0) -4 >Emitted(115, 14) Source(175, 52) + SourceIndex(0) -5 >Emitted(115, 15) Source(175, 53) + SourceIndex(0) -6 >Emitted(115, 25) Source(175, 62) + SourceIndex(0) -7 >Emitted(115, 26) Source(175, 63) + SourceIndex(0) -8 >Emitted(115, 28) Source(175, 65) + SourceIndex(0) -9 >Emitted(115, 29) Source(175, 66) + SourceIndex(0) -10>Emitted(115, 33) Source(175, 70) + SourceIndex(0) -11>Emitted(115, 39) Source(175, 76) + SourceIndex(0) -12>Emitted(115, 40) Source(175, 77) + SourceIndex(0) -13>Emitted(115, 41) Source(175, 78) + SourceIndex(0) -14>Emitted(115, 42) Source(175, 79) + SourceIndex(0) -15>Emitted(115, 43) Source(175, 80) + SourceIndex(0) -16>Emitted(115, 44) Source(175, 81) + SourceIndex(0) -17>Emitted(115, 45) Source(175, 82) + SourceIndex(0) -18>Emitted(115, 46) Source(175, 83) + SourceIndex(0) +1->Emitted(192, 1) Source(175, 1) + SourceIndex(0) +2 >Emitted(192, 5) Source(175, 5) + SourceIndex(0) +3 >Emitted(192, 11) Source(175, 11) + SourceIndex(0) +4 >Emitted(192, 14) Source(175, 52) + SourceIndex(0) +--- +>>> function (n, s) { +1->^^^^ +2 > ^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +1->[ +2 > function( +3 > n +4 > , +5 > s +1->Emitted(193, 5) Source(175, 53) + SourceIndex(0) +2 >Emitted(193, 15) Source(175, 62) + SourceIndex(0) +3 >Emitted(193, 16) Source(175, 63) + SourceIndex(0) +4 >Emitted(193, 18) Source(175, 65) + SourceIndex(0) +5 >Emitted(193, 19) Source(175, 66) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(194, 9) Source(175, 70) + SourceIndex(0) +2 >Emitted(194, 15) Source(175, 76) + SourceIndex(0) +3 >Emitted(194, 16) Source(175, 77) + SourceIndex(0) +4 >Emitted(194, 17) Source(175, 78) + SourceIndex(0) +5 >Emitted(194, 18) Source(175, 79) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(195, 5) Source(175, 80) + SourceIndex(0) +2 >Emitted(195, 6) Source(175, 81) + SourceIndex(0) +--- +>>>]; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^-> +1 >] +2 > ; +1 >Emitted(196, 2) Source(175, 82) + SourceIndex(0) +2 >Emitted(196, 3) Source(175, 83) + SourceIndex(0) --- >>>var c12t12 = { -1 > +1-> 2 >^^^^ 3 > ^^^^^^ 4 > ^^^ 5 > ^-> -1 > +1-> > 2 >var 3 > c12t12 4 > = -1 >Emitted(116, 1) Source(176, 1) + SourceIndex(0) -2 >Emitted(116, 5) Source(176, 5) + SourceIndex(0) -3 >Emitted(116, 11) Source(176, 11) + SourceIndex(0) -4 >Emitted(116, 14) Source(176, 21) + SourceIndex(0) +1->Emitted(197, 1) Source(176, 1) + SourceIndex(0) +2 >Emitted(197, 5) Source(176, 5) + SourceIndex(0) +3 >Emitted(197, 11) Source(176, 11) + SourceIndex(0) +4 >Emitted(197, 14) Source(176, 21) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -3005,12 +3194,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(117, 5) Source(177, 5) + SourceIndex(0) -2 >Emitted(117, 8) Source(177, 8) + SourceIndex(0) -3 >Emitted(117, 10) Source(177, 16) + SourceIndex(0) -4 >Emitted(117, 11) Source(177, 17) + SourceIndex(0) -5 >Emitted(117, 13) Source(177, 19) + SourceIndex(0) -6 >Emitted(117, 14) Source(177, 20) + SourceIndex(0) +1->Emitted(198, 5) Source(177, 5) + SourceIndex(0) +2 >Emitted(198, 8) Source(177, 8) + SourceIndex(0) +3 >Emitted(198, 10) Source(177, 16) + SourceIndex(0) +4 >Emitted(198, 11) Source(177, 17) + SourceIndex(0) +5 >Emitted(198, 13) Source(177, 19) + SourceIndex(0) +6 >Emitted(198, 14) Source(177, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -3019,8 +3208,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(118, 2) Source(178, 2) + SourceIndex(0) -2 >Emitted(118, 3) Source(178, 2) + SourceIndex(0) +1 >Emitted(199, 2) Source(178, 2) + SourceIndex(0) +2 >Emitted(199, 3) Source(178, 2) + SourceIndex(0) --- >>>var c12t13 = ({ 1-> @@ -3028,20 +3217,20 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^ 4 > ^^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^-> 1-> > 2 >var 3 > c12t13 4 > = 5 > ( -1->Emitted(119, 1) Source(179, 1) + SourceIndex(0) -2 >Emitted(119, 5) Source(179, 5) + SourceIndex(0) -3 >Emitted(119, 11) Source(179, 11) + SourceIndex(0) -4 >Emitted(119, 14) Source(179, 21) + SourceIndex(0) -5 >Emitted(119, 15) Source(179, 22) + SourceIndex(0) +1->Emitted(200, 1) Source(179, 1) + SourceIndex(0) +2 >Emitted(200, 5) Source(179, 5) + SourceIndex(0) +3 >Emitted(200, 11) Source(179, 11) + SourceIndex(0) +4 >Emitted(200, 14) Source(179, 21) + SourceIndex(0) +5 >Emitted(200, 15) Source(179, 22) + SourceIndex(0) --- ->>> f: function (i, s) { return s; } +>>> f: function (i, s) { 1->^^^^ 2 > ^ 3 > ^^ @@ -3049,13 +3238,6 @@ sourceFile:contextualTyping.ts 5 > ^ 6 > ^^ 7 > ^ -8 > ^^^^ -9 > ^^^^^^ -10> ^ -11> ^ -12> ^ -13> ^ -14> ^ 1->{ > 2 > f @@ -3064,27 +3246,38 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -8 > ) { -9 > return -10> -11> s -12> ; -13> -14> } -1->Emitted(120, 5) Source(180, 5) + SourceIndex(0) -2 >Emitted(120, 6) Source(180, 6) + SourceIndex(0) -3 >Emitted(120, 8) Source(180, 8) + SourceIndex(0) -4 >Emitted(120, 18) Source(180, 17) + SourceIndex(0) -5 >Emitted(120, 19) Source(180, 18) + SourceIndex(0) -6 >Emitted(120, 21) Source(180, 20) + SourceIndex(0) -7 >Emitted(120, 22) Source(180, 21) + SourceIndex(0) -8 >Emitted(120, 26) Source(180, 25) + SourceIndex(0) -9 >Emitted(120, 32) Source(180, 31) + SourceIndex(0) -10>Emitted(120, 33) Source(180, 32) + SourceIndex(0) -11>Emitted(120, 34) Source(180, 33) + SourceIndex(0) -12>Emitted(120, 35) Source(180, 34) + SourceIndex(0) -13>Emitted(120, 36) Source(180, 35) + SourceIndex(0) -14>Emitted(120, 37) Source(180, 36) + SourceIndex(0) +1->Emitted(201, 5) Source(180, 5) + SourceIndex(0) +2 >Emitted(201, 6) Source(180, 6) + SourceIndex(0) +3 >Emitted(201, 8) Source(180, 8) + SourceIndex(0) +4 >Emitted(201, 18) Source(180, 17) + SourceIndex(0) +5 >Emitted(201, 19) Source(180, 18) + SourceIndex(0) +6 >Emitted(201, 21) Source(180, 20) + SourceIndex(0) +7 >Emitted(201, 22) Source(180, 21) + SourceIndex(0) +--- +>>> return s; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^ +1 >) { +2 > return +3 > +4 > s +5 > ; +1 >Emitted(202, 9) Source(180, 25) + SourceIndex(0) +2 >Emitted(202, 15) Source(180, 31) + SourceIndex(0) +3 >Emitted(202, 16) Source(180, 32) + SourceIndex(0) +4 >Emitted(202, 17) Source(180, 33) + SourceIndex(0) +5 >Emitted(202, 18) Source(180, 34) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(203, 5) Source(180, 35) + SourceIndex(0) +2 >Emitted(203, 6) Source(180, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -3095,9 +3288,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(121, 2) Source(181, 2) + SourceIndex(0) -2 >Emitted(121, 3) Source(181, 3) + SourceIndex(0) -3 >Emitted(121, 4) Source(181, 3) + SourceIndex(0) +1 >Emitted(204, 2) Source(181, 2) + SourceIndex(0) +2 >Emitted(204, 3) Source(181, 3) + SourceIndex(0) +3 >Emitted(204, 4) Source(181, 3) + SourceIndex(0) --- >>>var c12t14 = ({ 1-> @@ -3111,11 +3304,11 @@ sourceFile:contextualTyping.ts 3 > c12t14 4 > = 5 > ( -1->Emitted(122, 1) Source(182, 1) + SourceIndex(0) -2 >Emitted(122, 5) Source(182, 5) + SourceIndex(0) -3 >Emitted(122, 11) Source(182, 11) + SourceIndex(0) -4 >Emitted(122, 14) Source(182, 21) + SourceIndex(0) -5 >Emitted(122, 15) Source(182, 22) + SourceIndex(0) +1->Emitted(205, 1) Source(182, 1) + SourceIndex(0) +2 >Emitted(205, 5) Source(182, 5) + SourceIndex(0) +3 >Emitted(205, 11) Source(182, 11) + SourceIndex(0) +4 >Emitted(205, 14) Source(182, 21) + SourceIndex(0) +5 >Emitted(205, 15) Source(182, 22) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -3127,39 +3320,31 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(123, 5) Source(183, 5) + SourceIndex(0) -2 >Emitted(123, 6) Source(183, 6) + SourceIndex(0) -3 >Emitted(123, 8) Source(183, 8) + SourceIndex(0) -4 >Emitted(123, 10) Source(183, 10) + SourceIndex(0) +1 >Emitted(206, 5) Source(183, 5) + SourceIndex(0) +2 >Emitted(206, 6) Source(183, 6) + SourceIndex(0) +3 >Emitted(206, 8) Source(183, 8) + SourceIndex(0) +4 >Emitted(206, 10) Source(183, 10) + SourceIndex(0) --- >>>}); 1 >^ 2 > ^ 3 > ^ -4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +4 > ^^^^^^^^^^^^^^^^^^-> 1 > >} 2 > ) 3 > -1 >Emitted(124, 2) Source(184, 2) + SourceIndex(0) -2 >Emitted(124, 3) Source(184, 3) + SourceIndex(0) -3 >Emitted(124, 4) Source(184, 3) + SourceIndex(0) +1 >Emitted(207, 2) Source(184, 2) + SourceIndex(0) +2 >Emitted(207, 3) Source(184, 3) + SourceIndex(0) +3 >Emitted(207, 4) Source(184, 3) + SourceIndex(0) --- ->>>function EF1(a, b) { return a + b; } +>>>function EF1(a, b) { 1-> 2 >^^^^^^^^^^^^^ 3 > ^ 4 > ^^ 5 > ^ -6 > ^^^^ -7 > ^^^^^^ -8 > ^ -9 > ^ -10> ^^^ -11> ^ -12> ^ -13> ^ -14> ^ +6 > ^-> 1-> > >// CONTEXT: Contextual typing declarations @@ -3172,32 +3357,46 @@ sourceFile:contextualTyping.ts 3 > a 4 > , 5 > b -6 > ) { -7 > return -8 > -9 > a -10> + -11> b -12> ; -13> -14> } -1->Emitted(125, 1) Source(191, 1) + SourceIndex(0) -2 >Emitted(125, 14) Source(191, 14) + SourceIndex(0) -3 >Emitted(125, 15) Source(191, 15) + SourceIndex(0) -4 >Emitted(125, 17) Source(191, 16) + SourceIndex(0) -5 >Emitted(125, 18) Source(191, 17) + SourceIndex(0) -6 >Emitted(125, 22) Source(191, 21) + SourceIndex(0) name (EF1) -7 >Emitted(125, 28) Source(191, 27) + SourceIndex(0) name (EF1) -8 >Emitted(125, 29) Source(191, 28) + SourceIndex(0) name (EF1) -9 >Emitted(125, 30) Source(191, 29) + SourceIndex(0) name (EF1) -10>Emitted(125, 33) Source(191, 30) + SourceIndex(0) name (EF1) -11>Emitted(125, 34) Source(191, 31) + SourceIndex(0) name (EF1) -12>Emitted(125, 35) Source(191, 32) + SourceIndex(0) name (EF1) -13>Emitted(125, 36) Source(191, 33) + SourceIndex(0) name (EF1) -14>Emitted(125, 37) Source(191, 34) + SourceIndex(0) name (EF1) +1->Emitted(208, 1) Source(191, 1) + SourceIndex(0) +2 >Emitted(208, 14) Source(191, 14) + SourceIndex(0) +3 >Emitted(208, 15) Source(191, 15) + SourceIndex(0) +4 >Emitted(208, 17) Source(191, 16) + SourceIndex(0) +5 >Emitted(208, 18) Source(191, 17) + SourceIndex(0) +--- +>>> return a + b; +1->^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^ +1->) { +2 > return +3 > +4 > a +5 > + +6 > b +7 > ; +1->Emitted(209, 5) Source(191, 21) + SourceIndex(0) name (EF1) +2 >Emitted(209, 11) Source(191, 27) + SourceIndex(0) name (EF1) +3 >Emitted(209, 12) Source(191, 28) + SourceIndex(0) name (EF1) +4 >Emitted(209, 13) Source(191, 29) + SourceIndex(0) name (EF1) +5 >Emitted(209, 16) Source(191, 30) + SourceIndex(0) name (EF1) +6 >Emitted(209, 17) Source(191, 31) + SourceIndex(0) name (EF1) +7 >Emitted(209, 18) Source(191, 32) + SourceIndex(0) name (EF1) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +1 >Emitted(210, 1) Source(191, 33) + SourceIndex(0) name (EF1) +2 >Emitted(210, 2) Source(191, 34) + SourceIndex(0) name (EF1) --- >>>var efv = EF1(1, 2); -1 > +1-> 2 >^^^^ 3 > ^^^ 4 > ^^^ @@ -3209,7 +3408,7 @@ sourceFile:contextualTyping.ts 10> ^ 11> ^ 12> ^^^-> -1 > +1-> > > 2 >var @@ -3222,17 +3421,17 @@ sourceFile:contextualTyping.ts 9 > 2 10> ) 11> ; -1 >Emitted(126, 1) Source(193, 1) + SourceIndex(0) -2 >Emitted(126, 5) Source(193, 5) + SourceIndex(0) -3 >Emitted(126, 8) Source(193, 8) + SourceIndex(0) -4 >Emitted(126, 11) Source(193, 11) + SourceIndex(0) -5 >Emitted(126, 14) Source(193, 14) + SourceIndex(0) -6 >Emitted(126, 15) Source(193, 15) + SourceIndex(0) -7 >Emitted(126, 16) Source(193, 16) + SourceIndex(0) -8 >Emitted(126, 18) Source(193, 17) + SourceIndex(0) -9 >Emitted(126, 19) Source(193, 18) + SourceIndex(0) -10>Emitted(126, 20) Source(193, 19) + SourceIndex(0) -11>Emitted(126, 21) Source(193, 20) + SourceIndex(0) +1->Emitted(211, 1) Source(193, 1) + SourceIndex(0) +2 >Emitted(211, 5) Source(193, 5) + SourceIndex(0) +3 >Emitted(211, 8) Source(193, 8) + SourceIndex(0) +4 >Emitted(211, 11) Source(193, 11) + SourceIndex(0) +5 >Emitted(211, 14) Source(193, 14) + SourceIndex(0) +6 >Emitted(211, 15) Source(193, 15) + SourceIndex(0) +7 >Emitted(211, 16) Source(193, 16) + SourceIndex(0) +8 >Emitted(211, 18) Source(193, 17) + SourceIndex(0) +9 >Emitted(211, 19) Source(193, 18) + SourceIndex(0) +10>Emitted(211, 20) Source(193, 19) + SourceIndex(0) +11>Emitted(211, 21) Source(193, 20) + SourceIndex(0) --- >>>function Point(x, y) { 1-> @@ -3259,11 +3458,11 @@ sourceFile:contextualTyping.ts 3 > x 4 > , 5 > y -1->Emitted(127, 1) Source(207, 1) + SourceIndex(0) -2 >Emitted(127, 16) Source(207, 16) + SourceIndex(0) -3 >Emitted(127, 17) Source(207, 17) + SourceIndex(0) -4 >Emitted(127, 19) Source(207, 19) + SourceIndex(0) -5 >Emitted(127, 20) Source(207, 20) + SourceIndex(0) +1->Emitted(212, 1) Source(207, 1) + SourceIndex(0) +2 >Emitted(212, 16) Source(207, 16) + SourceIndex(0) +3 >Emitted(212, 17) Source(207, 17) + SourceIndex(0) +4 >Emitted(212, 19) Source(207, 19) + SourceIndex(0) +5 >Emitted(212, 20) Source(207, 20) + SourceIndex(0) --- >>> this.x = x; 1 >^^^^ @@ -3282,13 +3481,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > x 7 > ; -1 >Emitted(128, 5) Source(208, 5) + SourceIndex(0) name (Point) -2 >Emitted(128, 9) Source(208, 9) + SourceIndex(0) name (Point) -3 >Emitted(128, 10) Source(208, 10) + SourceIndex(0) name (Point) -4 >Emitted(128, 11) Source(208, 11) + SourceIndex(0) name (Point) -5 >Emitted(128, 14) Source(208, 14) + SourceIndex(0) name (Point) -6 >Emitted(128, 15) Source(208, 15) + SourceIndex(0) name (Point) -7 >Emitted(128, 16) Source(208, 16) + SourceIndex(0) name (Point) +1 >Emitted(213, 5) Source(208, 5) + SourceIndex(0) name (Point) +2 >Emitted(213, 9) Source(208, 9) + SourceIndex(0) name (Point) +3 >Emitted(213, 10) Source(208, 10) + SourceIndex(0) name (Point) +4 >Emitted(213, 11) Source(208, 11) + SourceIndex(0) name (Point) +5 >Emitted(213, 14) Source(208, 14) + SourceIndex(0) name (Point) +6 >Emitted(213, 15) Source(208, 15) + SourceIndex(0) name (Point) +7 >Emitted(213, 16) Source(208, 16) + SourceIndex(0) name (Point) --- >>> this.y = y; 1->^^^^ @@ -3307,13 +3506,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > y 7 > ; -1->Emitted(129, 5) Source(209, 5) + SourceIndex(0) name (Point) -2 >Emitted(129, 9) Source(209, 9) + SourceIndex(0) name (Point) -3 >Emitted(129, 10) Source(209, 10) + SourceIndex(0) name (Point) -4 >Emitted(129, 11) Source(209, 11) + SourceIndex(0) name (Point) -5 >Emitted(129, 14) Source(209, 14) + SourceIndex(0) name (Point) -6 >Emitted(129, 15) Source(209, 15) + SourceIndex(0) name (Point) -7 >Emitted(129, 16) Source(209, 16) + SourceIndex(0) name (Point) +1->Emitted(214, 5) Source(209, 5) + SourceIndex(0) name (Point) +2 >Emitted(214, 9) Source(209, 9) + SourceIndex(0) name (Point) +3 >Emitted(214, 10) Source(209, 10) + SourceIndex(0) name (Point) +4 >Emitted(214, 11) Source(209, 11) + SourceIndex(0) name (Point) +5 >Emitted(214, 14) Source(209, 14) + SourceIndex(0) name (Point) +6 >Emitted(214, 15) Source(209, 15) + SourceIndex(0) name (Point) +7 >Emitted(214, 16) Source(209, 16) + SourceIndex(0) name (Point) --- >>> return this; 1->^^^^ @@ -3328,11 +3527,11 @@ sourceFile:contextualTyping.ts 3 > 4 > this 5 > ; -1->Emitted(130, 5) Source(211, 5) + SourceIndex(0) name (Point) -2 >Emitted(130, 11) Source(211, 11) + SourceIndex(0) name (Point) -3 >Emitted(130, 12) Source(211, 12) + SourceIndex(0) name (Point) -4 >Emitted(130, 16) Source(211, 16) + SourceIndex(0) name (Point) -5 >Emitted(130, 17) Source(211, 17) + SourceIndex(0) name (Point) +1->Emitted(215, 5) Source(211, 5) + SourceIndex(0) name (Point) +2 >Emitted(215, 11) Source(211, 11) + SourceIndex(0) name (Point) +3 >Emitted(215, 12) Source(211, 12) + SourceIndex(0) name (Point) +4 >Emitted(215, 16) Source(211, 16) + SourceIndex(0) name (Point) +5 >Emitted(215, 17) Source(211, 17) + SourceIndex(0) name (Point) --- >>>} 1 > @@ -3341,8 +3540,8 @@ sourceFile:contextualTyping.ts 1 > > 2 >} -1 >Emitted(131, 1) Source(212, 1) + SourceIndex(0) name (Point) -2 >Emitted(131, 2) Source(212, 2) + SourceIndex(0) name (Point) +1 >Emitted(216, 1) Source(212, 1) + SourceIndex(0) name (Point) +2 >Emitted(216, 2) Source(212, 2) + SourceIndex(0) name (Point) --- >>>Point.origin = new Point(0, 0); 1-> @@ -3374,19 +3573,19 @@ sourceFile:contextualTyping.ts 11> 0 12> ) 13> ; -1->Emitted(132, 1) Source(214, 1) + SourceIndex(0) -2 >Emitted(132, 6) Source(214, 6) + SourceIndex(0) -3 >Emitted(132, 7) Source(214, 7) + SourceIndex(0) -4 >Emitted(132, 13) Source(214, 13) + SourceIndex(0) -5 >Emitted(132, 16) Source(214, 16) + SourceIndex(0) -6 >Emitted(132, 20) Source(214, 20) + SourceIndex(0) -7 >Emitted(132, 25) Source(214, 25) + SourceIndex(0) -8 >Emitted(132, 26) Source(214, 26) + SourceIndex(0) -9 >Emitted(132, 27) Source(214, 27) + SourceIndex(0) -10>Emitted(132, 29) Source(214, 29) + SourceIndex(0) -11>Emitted(132, 30) Source(214, 30) + SourceIndex(0) -12>Emitted(132, 31) Source(214, 31) + SourceIndex(0) -13>Emitted(132, 32) Source(214, 32) + SourceIndex(0) +1->Emitted(217, 1) Source(214, 1) + SourceIndex(0) +2 >Emitted(217, 6) Source(214, 6) + SourceIndex(0) +3 >Emitted(217, 7) Source(214, 7) + SourceIndex(0) +4 >Emitted(217, 13) Source(214, 13) + SourceIndex(0) +5 >Emitted(217, 16) Source(214, 16) + SourceIndex(0) +6 >Emitted(217, 20) Source(214, 20) + SourceIndex(0) +7 >Emitted(217, 25) Source(214, 25) + SourceIndex(0) +8 >Emitted(217, 26) Source(214, 26) + SourceIndex(0) +9 >Emitted(217, 27) Source(214, 27) + SourceIndex(0) +10>Emitted(217, 29) Source(214, 29) + SourceIndex(0) +11>Emitted(217, 30) Source(214, 30) + SourceIndex(0) +12>Emitted(217, 31) Source(214, 31) + SourceIndex(0) +13>Emitted(217, 32) Source(214, 32) + SourceIndex(0) --- >>>Point.prototype.add = function (dx, dy) { 1-> @@ -3414,17 +3613,17 @@ sourceFile:contextualTyping.ts 9 > dx 10> , 11> dy -1->Emitted(133, 1) Source(216, 1) + SourceIndex(0) -2 >Emitted(133, 6) Source(216, 6) + SourceIndex(0) -3 >Emitted(133, 7) Source(216, 7) + SourceIndex(0) -4 >Emitted(133, 16) Source(216, 16) + SourceIndex(0) -5 >Emitted(133, 17) Source(216, 17) + SourceIndex(0) -6 >Emitted(133, 20) Source(216, 20) + SourceIndex(0) -7 >Emitted(133, 23) Source(216, 23) + SourceIndex(0) -8 >Emitted(133, 33) Source(216, 32) + SourceIndex(0) -9 >Emitted(133, 35) Source(216, 34) + SourceIndex(0) -10>Emitted(133, 37) Source(216, 36) + SourceIndex(0) -11>Emitted(133, 39) Source(216, 38) + SourceIndex(0) +1->Emitted(218, 1) Source(216, 1) + SourceIndex(0) +2 >Emitted(218, 6) Source(216, 6) + SourceIndex(0) +3 >Emitted(218, 7) Source(216, 7) + SourceIndex(0) +4 >Emitted(218, 16) Source(216, 16) + SourceIndex(0) +5 >Emitted(218, 17) Source(216, 17) + SourceIndex(0) +6 >Emitted(218, 20) Source(216, 20) + SourceIndex(0) +7 >Emitted(218, 23) Source(216, 23) + SourceIndex(0) +8 >Emitted(218, 33) Source(216, 32) + SourceIndex(0) +9 >Emitted(218, 35) Source(216, 34) + SourceIndex(0) +10>Emitted(218, 37) Source(216, 36) + SourceIndex(0) +11>Emitted(218, 39) Source(216, 38) + SourceIndex(0) --- >>> return new Point(this.x + dx, this.y + dy); 1->^^^^ @@ -3466,25 +3665,25 @@ sourceFile:contextualTyping.ts 17> dy 18> ) 19> ; -1->Emitted(134, 5) Source(217, 5) + SourceIndex(0) -2 >Emitted(134, 11) Source(217, 11) + SourceIndex(0) -3 >Emitted(134, 12) Source(217, 12) + SourceIndex(0) -4 >Emitted(134, 16) Source(217, 16) + SourceIndex(0) -5 >Emitted(134, 21) Source(217, 21) + SourceIndex(0) -6 >Emitted(134, 22) Source(217, 22) + SourceIndex(0) -7 >Emitted(134, 26) Source(217, 26) + SourceIndex(0) -8 >Emitted(134, 27) Source(217, 27) + SourceIndex(0) -9 >Emitted(134, 28) Source(217, 28) + SourceIndex(0) -10>Emitted(134, 31) Source(217, 31) + SourceIndex(0) -11>Emitted(134, 33) Source(217, 33) + SourceIndex(0) -12>Emitted(134, 35) Source(217, 35) + SourceIndex(0) -13>Emitted(134, 39) Source(217, 39) + SourceIndex(0) -14>Emitted(134, 40) Source(217, 40) + SourceIndex(0) -15>Emitted(134, 41) Source(217, 41) + SourceIndex(0) -16>Emitted(134, 44) Source(217, 44) + SourceIndex(0) -17>Emitted(134, 46) Source(217, 46) + SourceIndex(0) -18>Emitted(134, 47) Source(217, 47) + SourceIndex(0) -19>Emitted(134, 48) Source(217, 48) + SourceIndex(0) +1->Emitted(219, 5) Source(217, 5) + SourceIndex(0) +2 >Emitted(219, 11) Source(217, 11) + SourceIndex(0) +3 >Emitted(219, 12) Source(217, 12) + SourceIndex(0) +4 >Emitted(219, 16) Source(217, 16) + SourceIndex(0) +5 >Emitted(219, 21) Source(217, 21) + SourceIndex(0) +6 >Emitted(219, 22) Source(217, 22) + SourceIndex(0) +7 >Emitted(219, 26) Source(217, 26) + SourceIndex(0) +8 >Emitted(219, 27) Source(217, 27) + SourceIndex(0) +9 >Emitted(219, 28) Source(217, 28) + SourceIndex(0) +10>Emitted(219, 31) Source(217, 31) + SourceIndex(0) +11>Emitted(219, 33) Source(217, 33) + SourceIndex(0) +12>Emitted(219, 35) Source(217, 35) + SourceIndex(0) +13>Emitted(219, 39) Source(217, 39) + SourceIndex(0) +14>Emitted(219, 40) Source(217, 40) + SourceIndex(0) +15>Emitted(219, 41) Source(217, 41) + SourceIndex(0) +16>Emitted(219, 44) Source(217, 44) + SourceIndex(0) +17>Emitted(219, 46) Source(217, 46) + SourceIndex(0) +18>Emitted(219, 47) Source(217, 47) + SourceIndex(0) +19>Emitted(219, 48) Source(217, 48) + SourceIndex(0) --- >>>}; 1 > @@ -3495,9 +3694,9 @@ sourceFile:contextualTyping.ts > 2 >} 3 > ; -1 >Emitted(135, 1) Source(218, 1) + SourceIndex(0) -2 >Emitted(135, 2) Source(218, 2) + SourceIndex(0) -3 >Emitted(135, 3) Source(218, 3) + SourceIndex(0) +1 >Emitted(220, 1) Source(218, 1) + SourceIndex(0) +2 >Emitted(220, 2) Source(218, 2) + SourceIndex(0) +3 >Emitted(220, 3) Source(218, 3) + SourceIndex(0) --- >>>Point.prototype = { 1-> @@ -3512,11 +3711,11 @@ sourceFile:contextualTyping.ts 3 > . 4 > prototype 5 > = -1->Emitted(136, 1) Source(220, 1) + SourceIndex(0) -2 >Emitted(136, 6) Source(220, 6) + SourceIndex(0) -3 >Emitted(136, 7) Source(220, 7) + SourceIndex(0) -4 >Emitted(136, 16) Source(220, 16) + SourceIndex(0) -5 >Emitted(136, 19) Source(220, 19) + SourceIndex(0) +1->Emitted(221, 1) Source(220, 1) + SourceIndex(0) +2 >Emitted(221, 6) Source(220, 6) + SourceIndex(0) +3 >Emitted(221, 7) Source(220, 7) + SourceIndex(0) +4 >Emitted(221, 16) Source(220, 16) + SourceIndex(0) +5 >Emitted(221, 19) Source(220, 19) + SourceIndex(0) --- >>> x: 0, 1 >^^^^ @@ -3529,10 +3728,10 @@ sourceFile:contextualTyping.ts 2 > x 3 > : 4 > 0 -1 >Emitted(137, 5) Source(221, 5) + SourceIndex(0) -2 >Emitted(137, 6) Source(221, 6) + SourceIndex(0) -3 >Emitted(137, 8) Source(221, 8) + SourceIndex(0) -4 >Emitted(137, 9) Source(221, 9) + SourceIndex(0) +1 >Emitted(222, 5) Source(221, 5) + SourceIndex(0) +2 >Emitted(222, 6) Source(221, 6) + SourceIndex(0) +3 >Emitted(222, 8) Source(221, 8) + SourceIndex(0) +4 >Emitted(222, 9) Source(221, 9) + SourceIndex(0) --- >>> y: 0, 1->^^^^ @@ -3545,10 +3744,10 @@ sourceFile:contextualTyping.ts 2 > y 3 > : 4 > 0 -1->Emitted(138, 5) Source(222, 5) + SourceIndex(0) -2 >Emitted(138, 6) Source(222, 6) + SourceIndex(0) -3 >Emitted(138, 8) Source(222, 8) + SourceIndex(0) -4 >Emitted(138, 9) Source(222, 9) + SourceIndex(0) +1->Emitted(223, 5) Source(222, 5) + SourceIndex(0) +2 >Emitted(223, 6) Source(222, 6) + SourceIndex(0) +3 >Emitted(223, 8) Source(222, 8) + SourceIndex(0) +4 >Emitted(223, 9) Source(222, 9) + SourceIndex(0) --- >>> add: function (dx, dy) { 1->^^^^ @@ -3567,13 +3766,13 @@ sourceFile:contextualTyping.ts 5 > dx 6 > , 7 > dy -1->Emitted(139, 5) Source(223, 5) + SourceIndex(0) -2 >Emitted(139, 8) Source(223, 8) + SourceIndex(0) -3 >Emitted(139, 10) Source(223, 10) + SourceIndex(0) -4 >Emitted(139, 20) Source(223, 19) + SourceIndex(0) -5 >Emitted(139, 22) Source(223, 21) + SourceIndex(0) -6 >Emitted(139, 24) Source(223, 23) + SourceIndex(0) -7 >Emitted(139, 26) Source(223, 25) + SourceIndex(0) +1->Emitted(224, 5) Source(223, 5) + SourceIndex(0) +2 >Emitted(224, 8) Source(223, 8) + SourceIndex(0) +3 >Emitted(224, 10) Source(223, 10) + SourceIndex(0) +4 >Emitted(224, 20) Source(223, 19) + SourceIndex(0) +5 >Emitted(224, 22) Source(223, 21) + SourceIndex(0) +6 >Emitted(224, 24) Source(223, 23) + SourceIndex(0) +7 >Emitted(224, 26) Source(223, 25) + SourceIndex(0) --- >>> return new Point(this.x + dx, this.y + dy); 1->^^^^^^^^ @@ -3615,25 +3814,25 @@ sourceFile:contextualTyping.ts 17> dy 18> ) 19> ; -1->Emitted(140, 9) Source(224, 9) + SourceIndex(0) -2 >Emitted(140, 15) Source(224, 15) + SourceIndex(0) -3 >Emitted(140, 16) Source(224, 16) + SourceIndex(0) -4 >Emitted(140, 20) Source(224, 20) + SourceIndex(0) -5 >Emitted(140, 25) Source(224, 25) + SourceIndex(0) -6 >Emitted(140, 26) Source(224, 26) + SourceIndex(0) -7 >Emitted(140, 30) Source(224, 30) + SourceIndex(0) -8 >Emitted(140, 31) Source(224, 31) + SourceIndex(0) -9 >Emitted(140, 32) Source(224, 32) + SourceIndex(0) -10>Emitted(140, 35) Source(224, 35) + SourceIndex(0) -11>Emitted(140, 37) Source(224, 37) + SourceIndex(0) -12>Emitted(140, 39) Source(224, 39) + SourceIndex(0) -13>Emitted(140, 43) Source(224, 43) + SourceIndex(0) -14>Emitted(140, 44) Source(224, 44) + SourceIndex(0) -15>Emitted(140, 45) Source(224, 45) + SourceIndex(0) -16>Emitted(140, 48) Source(224, 48) + SourceIndex(0) -17>Emitted(140, 50) Source(224, 50) + SourceIndex(0) -18>Emitted(140, 51) Source(224, 51) + SourceIndex(0) -19>Emitted(140, 52) Source(224, 52) + SourceIndex(0) +1->Emitted(225, 9) Source(224, 9) + SourceIndex(0) +2 >Emitted(225, 15) Source(224, 15) + SourceIndex(0) +3 >Emitted(225, 16) Source(224, 16) + SourceIndex(0) +4 >Emitted(225, 20) Source(224, 20) + SourceIndex(0) +5 >Emitted(225, 25) Source(224, 25) + SourceIndex(0) +6 >Emitted(225, 26) Source(224, 26) + SourceIndex(0) +7 >Emitted(225, 30) Source(224, 30) + SourceIndex(0) +8 >Emitted(225, 31) Source(224, 31) + SourceIndex(0) +9 >Emitted(225, 32) Source(224, 32) + SourceIndex(0) +10>Emitted(225, 35) Source(224, 35) + SourceIndex(0) +11>Emitted(225, 37) Source(224, 37) + SourceIndex(0) +12>Emitted(225, 39) Source(224, 39) + SourceIndex(0) +13>Emitted(225, 43) Source(224, 43) + SourceIndex(0) +14>Emitted(225, 44) Source(224, 44) + SourceIndex(0) +15>Emitted(225, 45) Source(224, 45) + SourceIndex(0) +16>Emitted(225, 48) Source(224, 48) + SourceIndex(0) +17>Emitted(225, 50) Source(224, 50) + SourceIndex(0) +18>Emitted(225, 51) Source(224, 51) + SourceIndex(0) +19>Emitted(225, 52) Source(224, 52) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -3641,8 +3840,8 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(141, 5) Source(225, 5) + SourceIndex(0) -2 >Emitted(141, 6) Source(225, 6) + SourceIndex(0) +1 >Emitted(226, 5) Source(225, 5) + SourceIndex(0) +2 >Emitted(226, 6) Source(225, 6) + SourceIndex(0) --- >>>}; 1 >^ @@ -3651,8 +3850,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > ; -1 >Emitted(142, 2) Source(226, 2) + SourceIndex(0) -2 >Emitted(142, 3) Source(226, 3) + SourceIndex(0) +1 >Emitted(227, 2) Source(226, 2) + SourceIndex(0) +2 >Emitted(227, 3) Source(226, 3) + SourceIndex(0) --- >>>var x = {}; 1-> @@ -3672,11 +3871,11 @@ sourceFile:contextualTyping.ts 4 > : B = 5 > { } 6 > ; -1->Emitted(143, 1) Source(230, 1) + SourceIndex(0) -2 >Emitted(143, 5) Source(230, 5) + SourceIndex(0) -3 >Emitted(143, 6) Source(230, 6) + SourceIndex(0) -4 >Emitted(143, 9) Source(230, 12) + SourceIndex(0) -5 >Emitted(143, 11) Source(230, 15) + SourceIndex(0) -6 >Emitted(143, 12) Source(230, 16) + SourceIndex(0) +1->Emitted(228, 1) Source(230, 1) + SourceIndex(0) +2 >Emitted(228, 5) Source(230, 5) + SourceIndex(0) +3 >Emitted(228, 6) Source(230, 6) + SourceIndex(0) +4 >Emitted(228, 9) Source(230, 12) + SourceIndex(0) +5 >Emitted(228, 11) Source(230, 15) + SourceIndex(0) +6 >Emitted(228, 12) Source(230, 16) + SourceIndex(0) --- >>>//# sourceMappingURL=contextualTyping.js.map \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping1.js b/tests/baselines/reference/contextualTyping1.js index 7f1e12c744b..6b1b88c36ff 100644 --- a/tests/baselines/reference/contextualTyping1.js +++ b/tests/baselines/reference/contextualTyping1.js @@ -2,4 +2,4 @@ var foo: {id:number;} = {id:4}; //// [contextualTyping1.js] -var foo = { id: 4 };\n \ No newline at end of file +var foo = {\n id: 4\n};\n \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping10.js b/tests/baselines/reference/contextualTyping10.js index 08a2172b69a..e6afd72e817 100644 --- a/tests/baselines/reference/contextualTyping10.js +++ b/tests/baselines/reference/contextualTyping10.js @@ -4,7 +4,14 @@ class foo { public bar:{id:number;}[] = [{id:1}, {id:2}]; } //// [contextualTyping10.js] var foo = (function () { function foo() { - this.bar = [{ id: 1 }, { id: 2 }]; + this.bar = [ + { + id: 1 + }, + { + id: 2 + } + ]; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping11.js b/tests/baselines/reference/contextualTyping11.js index a7ec3815fae..123295d5387 100644 --- a/tests/baselines/reference/contextualTyping11.js +++ b/tests/baselines/reference/contextualTyping11.js @@ -4,7 +4,9 @@ class foo { public bar:{id:number;}[] = [({})]; } //// [contextualTyping11.js] var foo = (function () { function foo() { - this.bar = [({})]; + this.bar = [ + ({}) + ]; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping12.js b/tests/baselines/reference/contextualTyping12.js index c41ccbed990..60f3965f95a 100644 --- a/tests/baselines/reference/contextualTyping12.js +++ b/tests/baselines/reference/contextualTyping12.js @@ -4,7 +4,15 @@ class foo { public bar:{id:number;}[] = [{id:1}, {id:2, name:"foo"}]; } //// [contextualTyping12.js] var foo = (function () { function foo() { - this.bar = [{ id: 1 }, { id: 2, name: "foo" }]; + this.bar = [ + { + id: 1 + }, + { + id: 2, + name: "foo" + } + ]; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping13.js b/tests/baselines/reference/contextualTyping13.js index 7965745b943..c035434342e 100644 --- a/tests/baselines/reference/contextualTyping13.js +++ b/tests/baselines/reference/contextualTyping13.js @@ -2,4 +2,6 @@ var foo:(a:number)=>number = function(a){return a}; //// [contextualTyping13.js] -var foo = function (a) { return a; }; +var foo = function (a) { + return a; +}; diff --git a/tests/baselines/reference/contextualTyping14.js b/tests/baselines/reference/contextualTyping14.js index 5bae8c948a2..ea9539ef41e 100644 --- a/tests/baselines/reference/contextualTyping14.js +++ b/tests/baselines/reference/contextualTyping14.js @@ -4,7 +4,9 @@ class foo { public bar:(a:number)=>number = function(a){return a}; } //// [contextualTyping14.js] var foo = (function () { function foo() { - this.bar = function (a) { return a; }; + this.bar = function (a) { + return a; + }; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping15.js b/tests/baselines/reference/contextualTyping15.js index 250076ec4d5..99855681571 100644 --- a/tests/baselines/reference/contextualTyping15.js +++ b/tests/baselines/reference/contextualTyping15.js @@ -4,7 +4,9 @@ class foo { public bar: { (): number; (i: number): number; } = function() { retu //// [contextualTyping15.js] var foo = (function () { function foo() { - this.bar = function () { return 1; }; + this.bar = function () { + return 1; + }; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping16.js b/tests/baselines/reference/contextualTyping16.js index 1a4c28ba745..bccf047ad13 100644 --- a/tests/baselines/reference/contextualTyping16.js +++ b/tests/baselines/reference/contextualTyping16.js @@ -2,5 +2,9 @@ var foo: {id:number;} = {id:4}; foo = {id:5}; //// [contextualTyping16.js] -var foo = { id: 4 }; -foo = { id: 5 }; +var foo = { + id: 4 +}; +foo = { + id: 5 +}; diff --git a/tests/baselines/reference/contextualTyping17.js b/tests/baselines/reference/contextualTyping17.js index 0ae2605dbd6..2e433cd4dfd 100644 --- a/tests/baselines/reference/contextualTyping17.js +++ b/tests/baselines/reference/contextualTyping17.js @@ -2,5 +2,10 @@ var foo: {id:number;} = {id:4}; foo = {id: 5, name:"foo"}; //// [contextualTyping17.js] -var foo = { id: 4 }; -foo = { id: 5, name: "foo" }; +var foo = { + id: 4 +}; +foo = { + id: 5, + name: "foo" +}; diff --git a/tests/baselines/reference/contextualTyping18.js b/tests/baselines/reference/contextualTyping18.js index fb058032ed2..7289d73ba18 100644 --- a/tests/baselines/reference/contextualTyping18.js +++ b/tests/baselines/reference/contextualTyping18.js @@ -3,4 +3,6 @@ var foo: {id:number;} = <{id:number;}>({ }); foo = {id: 5}; //// [contextualTyping18.js] var foo = ({}); -foo = { id: 5 }; +foo = { + id: 5 +}; diff --git a/tests/baselines/reference/contextualTyping19.js b/tests/baselines/reference/contextualTyping19.js index e4e51372858..2b70fc19767 100644 --- a/tests/baselines/reference/contextualTyping19.js +++ b/tests/baselines/reference/contextualTyping19.js @@ -2,5 +2,16 @@ var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, {id:2}]; //// [contextualTyping19.js] -var foo = [{ id: 1 }]; -foo = [{ id: 1 }, { id: 2 }]; +var foo = [ + { + id: 1 + } +]; +foo = [ + { + id: 1 + }, + { + id: 2 + } +]; diff --git a/tests/baselines/reference/contextualTyping2.js b/tests/baselines/reference/contextualTyping2.js index 4dc3f71e9b0..4240ce23a1f 100644 --- a/tests/baselines/reference/contextualTyping2.js +++ b/tests/baselines/reference/contextualTyping2.js @@ -2,4 +2,7 @@ var foo: {id:number;} = {id:4, name:"foo"}; //// [contextualTyping2.js] -var foo = { id: 4, name: "foo" }; +var foo = { + id: 4, + name: "foo" +}; diff --git a/tests/baselines/reference/contextualTyping20.js b/tests/baselines/reference/contextualTyping20.js index f53a7f7554b..e2afa7a21ff 100644 --- a/tests/baselines/reference/contextualTyping20.js +++ b/tests/baselines/reference/contextualTyping20.js @@ -2,5 +2,17 @@ var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, {id:2, name:"foo"}]; //// [contextualTyping20.js] -var foo = [{ id: 1 }]; -foo = [{ id: 1 }, { id: 2, name: "foo" }]; +var foo = [ + { + id: 1 + } +]; +foo = [ + { + id: 1 + }, + { + id: 2, + name: "foo" + } +]; diff --git a/tests/baselines/reference/contextualTyping21.js b/tests/baselines/reference/contextualTyping21.js index 3d87d9e4245..6c3aa6e885f 100644 --- a/tests/baselines/reference/contextualTyping21.js +++ b/tests/baselines/reference/contextualTyping21.js @@ -2,5 +2,14 @@ var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, 1]; //// [contextualTyping21.js] -var foo = [{ id: 1 }]; -foo = [{ id: 1 }, 1]; +var foo = [ + { + id: 1 + } +]; +foo = [ + { + id: 1 + }, + 1 +]; diff --git a/tests/baselines/reference/contextualTyping22.js b/tests/baselines/reference/contextualTyping22.js index 3c9a5cb4d3e..b8ebfd3ecb7 100644 --- a/tests/baselines/reference/contextualTyping22.js +++ b/tests/baselines/reference/contextualTyping22.js @@ -2,5 +2,9 @@ var foo:(a:number)=>number = function(a){return a}; foo = function(b){return b}; //// [contextualTyping22.js] -var foo = function (a) { return a; }; -foo = function (b) { return b; }; +var foo = function (a) { + return a; +}; +foo = function (b) { + return b; +}; diff --git a/tests/baselines/reference/contextualTyping23.js b/tests/baselines/reference/contextualTyping23.js index 0207f6af15d..187fd3f86d3 100644 --- a/tests/baselines/reference/contextualTyping23.js +++ b/tests/baselines/reference/contextualTyping23.js @@ -3,4 +3,6 @@ var foo:(a:{():number; (i:number):number; })=>number; foo = function(a){return 5 //// [contextualTyping23.js] var foo; -foo = function (a) { return 5; }; +foo = function (a) { + return 5; +}; diff --git a/tests/baselines/reference/contextualTyping24.js b/tests/baselines/reference/contextualTyping24.js index 04c4ecba21b..170a6983b9f 100644 --- a/tests/baselines/reference/contextualTyping24.js +++ b/tests/baselines/reference/contextualTyping24.js @@ -3,4 +3,6 @@ var foo:(a:{():number; (i:number):number; })=>number; foo = function(a:string){r //// [contextualTyping24.js] var foo; -foo = function (a) { return 5; }; +foo = function (a) { + return 5; +}; diff --git a/tests/baselines/reference/contextualTyping25.js b/tests/baselines/reference/contextualTyping25.js index f90a70098d7..808ee2202ec 100644 --- a/tests/baselines/reference/contextualTyping25.js +++ b/tests/baselines/reference/contextualTyping25.js @@ -2,6 +2,7 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping25.js] -function foo(param) { } +function foo(param) { +} ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping26.js b/tests/baselines/reference/contextualTyping26.js index feacf3da328..fabd810c8f5 100644 --- a/tests/baselines/reference/contextualTyping26.js +++ b/tests/baselines/reference/contextualTyping26.js @@ -2,6 +2,7 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping26.js] -function foo(param) { } +function foo(param) { +} ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping27.js b/tests/baselines/reference/contextualTyping27.js index ce35e606196..11b8c251416 100644 --- a/tests/baselines/reference/contextualTyping27.js +++ b/tests/baselines/reference/contextualTyping27.js @@ -2,6 +2,7 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping27.js] -function foo(param) { } +function foo(param) { +} ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping28.js b/tests/baselines/reference/contextualTyping28.js index 095e3812400..a9dd848a2c0 100644 --- a/tests/baselines/reference/contextualTyping28.js +++ b/tests/baselines/reference/contextualTyping28.js @@ -2,6 +2,9 @@ function foo(param:number[]){}; foo([1]); //// [contextualTyping28.js] -function foo(param) { } +function foo(param) { +} ; -foo([1]); +foo([ + 1 +]); diff --git a/tests/baselines/reference/contextualTyping29.js b/tests/baselines/reference/contextualTyping29.js index 1d5b32c208d..cf3a8e340a1 100644 --- a/tests/baselines/reference/contextualTyping29.js +++ b/tests/baselines/reference/contextualTyping29.js @@ -2,6 +2,10 @@ function foo(param:number[]){}; foo([1, 3]); //// [contextualTyping29.js] -function foo(param) { } +function foo(param) { +} ; -foo([1, 3]); +foo([ + 1, + 3 +]); diff --git a/tests/baselines/reference/contextualTyping3.js b/tests/baselines/reference/contextualTyping3.js index 19d71f4ca71..8ea5481037d 100644 --- a/tests/baselines/reference/contextualTyping3.js +++ b/tests/baselines/reference/contextualTyping3.js @@ -4,7 +4,9 @@ class foo { public bar:{id:number;} = {id:5}; } //// [contextualTyping3.js] var foo = (function () { function foo() { - this.bar = { id: 5 }; + this.bar = { + id: 5 + }; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping30.js b/tests/baselines/reference/contextualTyping30.js index 94547a387d7..25b8d9c6f55 100644 --- a/tests/baselines/reference/contextualTyping30.js +++ b/tests/baselines/reference/contextualTyping30.js @@ -2,6 +2,10 @@ function foo(param:number[]){}; foo([1, "a"]); //// [contextualTyping30.js] -function foo(param) { } +function foo(param) { +} ; -foo([1, "a"]); +foo([ + 1, + "a" +]); diff --git a/tests/baselines/reference/contextualTyping31.js b/tests/baselines/reference/contextualTyping31.js index 1eb4d5660fc..0e29d9f68c0 100644 --- a/tests/baselines/reference/contextualTyping31.js +++ b/tests/baselines/reference/contextualTyping31.js @@ -2,6 +2,9 @@ function foo(param:number[]){}; foo([1]); //// [contextualTyping31.js] -function foo(param) { } +function foo(param) { +} ; -foo([1]); +foo([ + 1 +]); diff --git a/tests/baselines/reference/contextualTyping32.js b/tests/baselines/reference/contextualTyping32.js index bbbafa70796..8a47a109aec 100644 --- a/tests/baselines/reference/contextualTyping32.js +++ b/tests/baselines/reference/contextualTyping32.js @@ -2,6 +2,14 @@ function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return 4}]); //// [contextualTyping32.js] -function foo(param) { } +function foo(param) { +} ; -foo([function () { return 1; }, function () { return 4; }]); +foo([ + function () { + return 1; + }, + function () { + return 4; + } +]); diff --git a/tests/baselines/reference/contextualTyping33.js b/tests/baselines/reference/contextualTyping33.js index 1d800b1d113..9ee3245416f 100644 --- a/tests/baselines/reference/contextualTyping33.js +++ b/tests/baselines/reference/contextualTyping33.js @@ -2,6 +2,14 @@ function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); //// [contextualTyping33.js] -function foo(param) { } +function foo(param) { +} ; -foo([function () { return 1; }, function () { return "foo"; }]); +foo([ + function () { + return 1; + }, + function () { + return "foo"; + } +]); diff --git a/tests/baselines/reference/contextualTyping34.js b/tests/baselines/reference/contextualTyping34.js index 5e12ba602ae..fc801d3cd7e 100644 --- a/tests/baselines/reference/contextualTyping34.js +++ b/tests/baselines/reference/contextualTyping34.js @@ -2,4 +2,6 @@ var foo = <{ id: number;}> ({id:4}); //// [contextualTyping34.js] -var foo = ({ id: 4 }); +var foo = ({ + id: 4 +}); diff --git a/tests/baselines/reference/contextualTyping35.js b/tests/baselines/reference/contextualTyping35.js index 34d9e6b39a8..bf9e02dd903 100644 --- a/tests/baselines/reference/contextualTyping35.js +++ b/tests/baselines/reference/contextualTyping35.js @@ -2,4 +2,7 @@ var foo = <{ id: number;}> {id:4, name: "as"}; //// [contextualTyping35.js] -var foo = { id: 4, name: "as" }; +var foo = { + id: 4, + name: "as" +}; diff --git a/tests/baselines/reference/contextualTyping36.js b/tests/baselines/reference/contextualTyping36.js index 3bdaf5a8d05..623a1e92ad2 100644 --- a/tests/baselines/reference/contextualTyping36.js +++ b/tests/baselines/reference/contextualTyping36.js @@ -2,4 +2,9 @@ var foo = <{ id: number; }[]>[{ id: 4 }, <{ id: number; }>({ })]; //// [contextualTyping36.js] -var foo = [{ id: 4 }, ({})]; +var foo = [ + { + id: 4 + }, + ({}) +]; diff --git a/tests/baselines/reference/contextualTyping37.js b/tests/baselines/reference/contextualTyping37.js index 4bb6e7b350f..2f2636579bf 100644 --- a/tests/baselines/reference/contextualTyping37.js +++ b/tests/baselines/reference/contextualTyping37.js @@ -2,4 +2,9 @@ var foo = <{ id: number; }[]>[{ foo: "s" }, { }]; //// [contextualTyping37.js] -var foo = [{ foo: "s" }, {}]; +var foo = [ + { + foo: "s" + }, + {} +]; diff --git a/tests/baselines/reference/contextualTyping38.js b/tests/baselines/reference/contextualTyping38.js index 9bed543ff7f..71ed8ece57d 100644 --- a/tests/baselines/reference/contextualTyping38.js +++ b/tests/baselines/reference/contextualTyping38.js @@ -2,4 +2,6 @@ var foo = <{ (): number; }> function(a) { return a }; //// [contextualTyping38.js] -var foo = function (a) { return a; }; +var foo = function (a) { + return a; +}; diff --git a/tests/baselines/reference/contextualTyping39.js b/tests/baselines/reference/contextualTyping39.js index 89d045830a3..9a97b7eb3cc 100644 --- a/tests/baselines/reference/contextualTyping39.js +++ b/tests/baselines/reference/contextualTyping39.js @@ -2,4 +2,6 @@ var foo = <{ (): number; }> function() { return "err"; }; //// [contextualTyping39.js] -var foo = function () { return "err"; }; +var foo = function () { + return "err"; +}; diff --git a/tests/baselines/reference/contextualTyping4.js b/tests/baselines/reference/contextualTyping4.js index af79e3732f2..902791adcbc 100644 --- a/tests/baselines/reference/contextualTyping4.js +++ b/tests/baselines/reference/contextualTyping4.js @@ -4,7 +4,10 @@ class foo { public bar:{id:number;} = {id:5, name:"foo"}; } //// [contextualTyping4.js] var foo = (function () { function foo() { - this.bar = { id: 5, name: "foo" }; + this.bar = { + id: 5, + name: "foo" + }; } return foo; })(); diff --git a/tests/baselines/reference/contextualTyping40.js b/tests/baselines/reference/contextualTyping40.js index 0b98f8e45c6..ba2c447b10f 100644 --- a/tests/baselines/reference/contextualTyping40.js +++ b/tests/baselines/reference/contextualTyping40.js @@ -2,4 +2,6 @@ var foo = <{():number; (i:number):number; }> function(){return 1;}; //// [contextualTyping40.js] -var foo = function () { return 1; }; +var foo = function () { + return 1; +}; diff --git a/tests/baselines/reference/contextualTyping41.js b/tests/baselines/reference/contextualTyping41.js index 8bce7918dd2..720f1d178f6 100644 --- a/tests/baselines/reference/contextualTyping41.js +++ b/tests/baselines/reference/contextualTyping41.js @@ -2,4 +2,6 @@ var foo = <{():number; (i:number):number; }> (function(){return "err";}); //// [contextualTyping41.js] -var foo = (function () { return "err"; }); +var foo = (function () { + return "err"; +}); diff --git a/tests/baselines/reference/contextualTyping6.js b/tests/baselines/reference/contextualTyping6.js index df2d2ac15cb..c1fb58d4d2d 100644 --- a/tests/baselines/reference/contextualTyping6.js +++ b/tests/baselines/reference/contextualTyping6.js @@ -2,4 +2,11 @@ var foo:{id:number;}[] = [{id:1}, {id:2}]; //// [contextualTyping6.js] -var foo = [{ id: 1 }, { id: 2 }]; +var foo = [ + { + id: 1 + }, + { + id: 2 + } +]; diff --git a/tests/baselines/reference/contextualTyping7.js b/tests/baselines/reference/contextualTyping7.js index 2cd2494c3bf..6b93e7308d5 100644 --- a/tests/baselines/reference/contextualTyping7.js +++ b/tests/baselines/reference/contextualTyping7.js @@ -2,4 +2,6 @@ var foo:{id:number;}[] = [<{id:number;}>({})]; //// [contextualTyping7.js] -var foo = [({})]; +var foo = [ + ({}) +]; diff --git a/tests/baselines/reference/contextualTyping8.js b/tests/baselines/reference/contextualTyping8.js index a0e3b5b9ef5..276b32bed68 100644 --- a/tests/baselines/reference/contextualTyping8.js +++ b/tests/baselines/reference/contextualTyping8.js @@ -2,4 +2,6 @@ var foo:{id:number;}[] = [<{id:number;}>({})]; //// [contextualTyping8.js] -var foo = [({})]; +var foo = [ + ({}) +]; diff --git a/tests/baselines/reference/contextualTyping9.js b/tests/baselines/reference/contextualTyping9.js index 71384cf8b04..19d0f0fba79 100644 --- a/tests/baselines/reference/contextualTyping9.js +++ b/tests/baselines/reference/contextualTyping9.js @@ -2,4 +2,12 @@ var foo:{id:number;}[] = [{id:1}, {id:2, name:"foo"}]; //// [contextualTyping9.js] -var foo = [{ id: 1 }, { id: 2, name: "foo" }]; +var foo = [ + { + id: 1 + }, + { + id: 2, + name: "foo" + } +]; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index 844a50428e2..b9ea5beaa77 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -40,4 +40,11 @@ var C = (function (_super) { } return C; })(A); -var xs = [function (x) { }, function (x) { }, function (x) { }]; +var xs = [ + function (x) { + }, + function (x) { + }, + function (x) { + } +]; diff --git a/tests/baselines/reference/contextualTypingOfAccessors.js b/tests/baselines/reference/contextualTypingOfAccessors.js index f785d19636c..0f45574be99 100644 --- a/tests/baselines/reference/contextualTypingOfAccessors.js +++ b/tests/baselines/reference/contextualTypingOfAccessors.js @@ -18,7 +18,10 @@ x = { var x; x = { get foo() { - return function (n) { return n; }; + return function (n) { + return n; + }; }, - set foo(x) { } + set foo(x) { + } }; diff --git a/tests/baselines/reference/contextualTypingOfArrayLiterals1.js b/tests/baselines/reference/contextualTypingOfArrayLiterals1.js index e7513093402..e2edcb3d5df 100644 --- a/tests/baselines/reference/contextualTypingOfArrayLiterals1.js +++ b/tests/baselines/reference/contextualTypingOfArrayLiterals1.js @@ -9,6 +9,9 @@ r2.getDate(); //// [contextualTypingOfArrayLiterals1.js] -var x3 = [new Date(), 1]; +var x3 = [ + new Date(), + 1 +]; var r2 = x3[1]; r2.getDate(); diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.js b/tests/baselines/reference/contextualTypingOfConditionalExpression.js index b1100ba80a9..805ffca7508 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.js @@ -21,7 +21,11 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var x = true ? function (a) { return a.toExponential(); } : function (b) { return b.toFixed(); }; +var x = true ? function (a) { + return a.toExponential(); +} : function (b) { + return b.toFixed(); +}; var A = (function () { function A() { } @@ -41,4 +45,8 @@ var C = (function (_super) { } return C; })(A); -var x2 = true ? function (a) { return a.foo; } : function (b) { return b.foo; }; +var x2 = true ? function (a) { + return a.foo; +} : function (b) { + return b.foo; +}; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index f832d2766ee..c84fa87e817 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -38,4 +38,7 @@ var C = (function (_super) { } return C; })(A); -var x2 = true ? function (a) { return a.foo; } : function (b) { }; +var x2 = true ? function (a) { + return a.foo; +} : function (b) { +}; diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js index 8142b51dcdd..b2a8bf0dba1 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.js @@ -22,6 +22,10 @@ var r6 = _.forEach(c2, (x) => { return x.toFixed() }); var c2; var _; // errors on all 3 lines, bug was that r5 was the only line with errors -var f = function (x) { return x.toFixed(); }; +var f = function (x) { + return x.toFixed(); +}; var r5 = _.forEach(c2, f); -var r6 = _.forEach(c2, function (x) { return x.toFixed(); }); +var r6 = _.forEach(c2, function (x) { + return x.toFixed(); +}); diff --git a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js index 67670bf872e..ecc6a0ecd16 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js +++ b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js @@ -7,6 +7,11 @@ callb((a) => a.length); // Ok, we choose the second overload because the first o callb((a) => { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body //// [contextualTypingOfLambdaReturnExpression.js] -function callb(a) { } -callb(function (a) { return a.length; }); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type -callb(function (a) { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body +function callb(a) { +} +callb(function (a) { + return a.length; +}); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type +callb(function (a) { + a.length; +}); // Error, we picked the first overload and errored when type checking the lambda body diff --git a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js index f21bc852af8..400a052a7bb 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js +++ b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js @@ -9,4 +9,5 @@ foo.getFoo = bar => { }; //// [contextualTypingOfLambdaWithMultipleSignatures.js] var foo; -foo.getFoo = function (bar) { }; +foo.getFoo = function (bar) { +}; diff --git a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js index 442ded4ba75..415fc3acd2e 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js +++ b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures2.js @@ -8,4 +8,6 @@ f = (a) => { return a.asdf } //// [contextualTypingOfLambdaWithMultipleSignatures2.js] var f; -f = function (a) { return a.asdf; }; +f = function (a) { + return a.asdf; +}; diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.js b/tests/baselines/reference/contextualTypingOfObjectLiterals.js index e267ce6269e..d965ef5828c 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.js +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.js @@ -12,10 +12,13 @@ f(obj2); // Error - indexer doesn't match //// [contextualTypingOfObjectLiterals.js] var obj1; -var obj2 = { x: "" }; +var obj2 = { + x: "" +}; obj1 = {}; // Ok obj1 = obj2; // Error - indexer doesn't match -function f(x) { } +function f(x) { +} f({}); // Ok f(obj1); // Ok f(obj2); // Error - indexer doesn't match diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals2.js b/tests/baselines/reference/contextualTypingOfObjectLiterals2.js index 4c450d31152..f709890c550 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals2.js +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals2.js @@ -6,5 +6,10 @@ function f2(args: Foo) { } f2({ foo: s => s.hmm }) // 's' should be 'string', so this should be an error //// [contextualTypingOfObjectLiterals2.js] -function f2(args) { } -f2({ foo: function (s) { return s.hmm; } }); // 's' should be 'string', so this should be an error +function f2(args) { +} +f2({ + foo: function (s) { + return s.hmm; + } +}); // 's' should be 'string', so this should be an error diff --git a/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js b/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js index 4b392bac80a..96e8f860358 100644 --- a/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js +++ b/tests/baselines/reference/contextualTypingTwoInstancesOfSameTypeParameter.js @@ -8,4 +8,8 @@ f6(x => f6(y => x = y)); function f6(x) { return null; } -f6(function (x) { return f6(function (y) { return x = y; }); }); +f6(function (x) { + return f6(function (y) { + return x = y; + }); +}); diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js index 55f7580b3f8..f8804547d46 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.js @@ -5,5 +5,13 @@ var r9 = f10('', () => (a => a.foo), 1); // error //// [contextualTypingWithFixedTypeParameters1.js] var f10; -f10('', function () { return function (a) { return a.foo; }; }, ''); // a is string -var r9 = f10('', function () { return (function (a) { return a.foo; }); }, 1); // error +f10('', function () { + return function (a) { + return a.foo; + }; +}, ''); // a is string +var r9 = f10('', function () { + return (function (a) { + return a.foo; + }); +}, 1); // error diff --git a/tests/baselines/reference/contextualTypingWithGenericAndNonGenericSignature.js b/tests/baselines/reference/contextualTypingWithGenericAndNonGenericSignature.js index 5ee0c758022..f548b6daaad 100644 --- a/tests/baselines/reference/contextualTypingWithGenericAndNonGenericSignature.js +++ b/tests/baselines/reference/contextualTypingWithGenericAndNonGenericSignature.js @@ -19,6 +19,10 @@ f3 = (x, y) => { return x } //// [contextualTypingWithGenericAndNonGenericSignature.js] //• If e is a FunctionExpression or ArrowFunctionExpression with no type parameters and no parameter or return type annotations, and T is a function type with EXACTLY ONE non - generic call signature, then any inferences made for type parameters referenced by the parameters of T’s call signature are fixed(section 4.12.2) and e is processed with the contextual type T, as described in section 4.9.3. var f2; -f2 = function (x, y) { return x; }; +f2 = function (x, y) { + return x; +}; var f3; -f3 = function (x, y) { return x; }; +f3 = function (x, y) { + return x; +}; diff --git a/tests/baselines/reference/contextualTypingWithGenericSignature.js b/tests/baselines/reference/contextualTypingWithGenericSignature.js index 611a35f38ac..a1417e90b43 100644 --- a/tests/baselines/reference/contextualTypingWithGenericSignature.js +++ b/tests/baselines/reference/contextualTypingWithGenericSignature.js @@ -10,4 +10,6 @@ f2 = (x, y) => { return x } //// [contextualTypingWithGenericSignature.js] // If e is a FunctionExpression or ArrowFunctionExpression with no type parameters and no parameter or return type annotations, and T is a function type with EXACTLY ONE non - generic call signature, then any inferences made for type parameters referenced by the parameters of T’s call signature are fixed(section 4.12.2) and e is processed with the contextual type T, as described in section 4.9.3. var f2; -f2 = function (x, y) { return x; }; +f2 = function (x, y) { + return x; +}; diff --git a/tests/baselines/reference/contextuallyTypingOrOperator.js b/tests/baselines/reference/contextuallyTypingOrOperator.js index 6dc3e09bf89..6ffd81b1e03 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator.js +++ b/tests/baselines/reference/contextuallyTypingOrOperator.js @@ -7,7 +7,27 @@ var v3 = (s: string) => s.length || function (s: number) { return 1 }; var v4 = (s: number) => 1 || function (s: string) { return s.length }; //// [contextuallyTypingOrOperator.js] -var v = { a: function (s) { return s.length; } } || { a: function (s) { return 1; } }; -var v2 = function (s) { return s.length || function (s) { s.length; }; }; -var v3 = function (s) { return s.length || function (s) { return 1; }; }; -var v4 = function (s) { return 1 || function (s) { return s.length; }; }; +var v = { + a: function (s) { + return s.length; + } +} || { + a: function (s) { + return 1; + } +}; +var v2 = function (s) { + return s.length || function (s) { + s.length; + }; +}; +var v3 = function (s) { + return s.length || function (s) { + return 1; + }; +}; +var v4 = function (s) { + return 1 || function (s) { + return s.length; + }; +}; diff --git a/tests/baselines/reference/contextuallyTypingOrOperator2.js b/tests/baselines/reference/contextuallyTypingOrOperator2.js index fa850929b3e..0b4dfa46bc4 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator2.js +++ b/tests/baselines/reference/contextuallyTypingOrOperator2.js @@ -4,5 +4,17 @@ var v: { a: (_: string) => number } = { a: s => s.length } || { a: s => 1 }; var v2 = (s: string) => s.length || function (s) { s.aaa }; //// [contextuallyTypingOrOperator2.js] -var v = { a: function (s) { return s.length; } } || { a: function (s) { return 1; } }; -var v2 = function (s) { return s.length || function (s) { s.aaa; }; }; +var v = { + a: function (s) { + return s.length; + } +} || { + a: function (s) { + return 1; + } +}; +var v2 = function (s) { + return s.length || function (s) { + s.aaa; + }; +}; diff --git a/tests/baselines/reference/convertKeywordsYes.js b/tests/baselines/reference/convertKeywordsYes.js index a68f751f434..deae65b54c9 100644 --- a/tests/baselines/reference/convertKeywordsYes.js +++ b/tests/baselines/reference/convertKeywordsYes.js @@ -325,7 +325,8 @@ var string = 0; var get = 0; var yield = 0; var declare = 0; -function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { } +function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { +} var bigObject = { constructor: 0, any: 0, diff --git a/tests/baselines/reference/couldNotSelectGenericOverload.js b/tests/baselines/reference/couldNotSelectGenericOverload.js index 996ebde8448..44bd87ace5d 100644 --- a/tests/baselines/reference/couldNotSelectGenericOverload.js +++ b/tests/baselines/reference/couldNotSelectGenericOverload.js @@ -9,9 +9,16 @@ var b3G = makeArray2(1, ""); // error //// [couldNotSelectGenericOverload.js] -function makeArray(items) { return items; } -var b = [1, ""]; +function makeArray(items) { + return items; +} +var b = [ + 1, + "" +]; var b1G = makeArray(1, ""); // any, no error var b2G = makeArray(b); // any[] -function makeArray2(items) { return items; } +function makeArray2(items) { + return items; +} var b3G = makeArray2(1, ""); // error diff --git a/tests/baselines/reference/covariance1.js b/tests/baselines/reference/covariance1.js index bed31338cbe..9c012ca85c8 100644 --- a/tests/baselines/reference/covariance1.js +++ b/tests/baselines/reference/covariance1.js @@ -27,10 +27,15 @@ var M; return XX; })(); M.XX = XX; - function f(y) { } + function f(y) { + } M.f = f; var a; - f({ x: a }); // ok + f({ + x: a + }); // ok var b; - f({ x: b }); // ok covariant subtype + f({ + x: b + }); // ok covariant subtype })(M || (M = {})); diff --git a/tests/baselines/reference/crashInResolveInterface.js b/tests/baselines/reference/crashInResolveInterface.js index 85b6217726a..94c60a7cc85 100644 --- a/tests/baselines/reference/crashInResolveInterface.js +++ b/tests/baselines/reference/crashInResolveInterface.js @@ -20,6 +20,8 @@ interface C { //// [file1.js] var q1; -var x = q1.each(function (x) { return c.log(x); }); +var x = q1.each(function (x) { + return c.log(x); +}); //// [file2.js] /// diff --git a/tests/baselines/reference/customEventDetail.js b/tests/baselines/reference/customEventDetail.js index 7207ecf0628..c88c6e677bf 100644 --- a/tests/baselines/reference/customEventDetail.js +++ b/tests/baselines/reference/customEventDetail.js @@ -8,5 +8,8 @@ var y = x.detail.name; //// [customEventDetail.js] var x; // valid since detail is any -x.initCustomEvent('hello', true, true, { id: 12, name: 'hello' }); +x.initCustomEvent('hello', true, true, { + id: 12, + name: 'hello' +}); var y = x.detail.name; diff --git a/tests/baselines/reference/debuggerEmit.js b/tests/baselines/reference/debuggerEmit.js index 8cf5dc69cd0..c2f730271be 100644 --- a/tests/baselines/reference/debuggerEmit.js +++ b/tests/baselines/reference/debuggerEmit.js @@ -3,5 +3,7 @@ var x = function () { debugger; } x(); //// [debuggerEmit.js] -var x = function () { debugger; }; +var x = function () { + debugger; +}; x(); diff --git a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js index 7814e9641ba..30ba24ed405 100644 --- a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js +++ b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js @@ -16,7 +16,8 @@ var Foo = (function () { })(); exports.Foo = Foo; //// [declFileAliasUseBeforeDeclaration_test.js] -function bar(a) { } +function bar(a) { +} exports.bar = bar; diff --git a/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js b/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js index 5d7273098f1..52d11836b11 100644 --- a/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js +++ b/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js @@ -31,22 +31,28 @@ interface I extends A, B { var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); var D = (function () { function D() { } - D.prototype.baz = function () { }; - D.prototype.bat = function () { }; - D.prototype.foo = function () { }; - D.prototype.bar = function () { }; + D.prototype.baz = function () { + }; + D.prototype.bat = function () { + }; + D.prototype.foo = function () { + }; + D.prototype.bar = function () { + }; return D; })(); diff --git a/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js b/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js index ee2dc8e83bd..545b70f743a 100644 --- a/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js +++ b/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js @@ -10,7 +10,8 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index e01626a7ead..3c8120e8db9 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -60,17 +60,29 @@ var C; return B; })(); C.B = B; - function F(x) { return null; } + function F(x) { + return null; + } C.F = F; - function F2(x) { return null; } + function F2(x) { + return null; + } C.F2 = F2; - function F3(x) { return null; } + function F3(x) { + return null; + } C.F3 = F3; - function F4(x) { return null; } + function F4(x) { + return null; + } C.F4 = F4; - function F5() { return null; } + function F5() { + return null; + } C.F5 = F5; - function F6(x) { return null; } + function F6(x) { + return null; + } C.F6 = F6; var D = (function () { function D(val) { @@ -86,7 +98,8 @@ exports.c = C.F2; exports.d = C.F3; exports.e = C.F4; exports.x = (new C.D(new C.A())).val; -function f() { } +function f() { +} exports.f = f; exports.g = C.F5(); var h = (function (_super) { diff --git a/tests/baselines/reference/declFileModuleAssignmentInObjectLiteralProperty.js b/tests/baselines/reference/declFileModuleAssignmentInObjectLiteralProperty.js index 443933069da..400c53a171a 100644 --- a/tests/baselines/reference/declFileModuleAssignmentInObjectLiteralProperty.js +++ b/tests/baselines/reference/declFileModuleAssignmentInObjectLiteralProperty.js @@ -20,8 +20,12 @@ var m1; m1.c = c; })(m1 || (m1 = {})); var d = { - m1: { m: m1 }, - m2: { c: m1.c } + m1: { + m: m1 + }, + m2: { + c: m1.c + } }; diff --git a/tests/baselines/reference/declFileObjectLiteralWithAccessors.js b/tests/baselines/reference/declFileObjectLiteralWithAccessors.js index 85897bc2c9d..7d7c6ee73d3 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithAccessors.js +++ b/tests/baselines/reference/declFileObjectLiteralWithAccessors.js @@ -15,8 +15,12 @@ point./*3*/x = 30; function makePoint(x) { return { b: 10, - get x() { return x; }, - set x(a) { this.b = a; } + get x() { + return x; + }, + set x(a) { + this.b = a; + } }; } ; diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js index dd39a30f7a2..b3d41829637 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlyGetter.js @@ -12,7 +12,9 @@ var /*2*/x = point./*3*/x; //// [declFileObjectLiteralWithOnlyGetter.js] function makePoint(x) { return { - get x() { return x; } + get x() { + return x; + } }; } ; diff --git a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.js b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.js index e219e885053..dae362caf36 100644 --- a/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.js +++ b/tests/baselines/reference/declFileObjectLiteralWithOnlySetter.js @@ -13,7 +13,9 @@ point./*2*/x = 30; function makePoint(x) { return { b: 10, - set x(a) { this.b = a; } + set x(a) { + this.b = a; + } }; } ; diff --git a/tests/baselines/reference/declFilePrivateStatic.js b/tests/baselines/reference/declFilePrivateStatic.js index 326ce62171d..5bec38e4dee 100644 --- a/tests/baselines/reference/declFilePrivateStatic.js +++ b/tests/baselines/reference/declFilePrivateStatic.js @@ -18,25 +18,33 @@ class C { var C = (function () { function C() { } - C.a = function () { }; - C.b = function () { }; + C.a = function () { + }; + C.b = function () { + }; Object.defineProperty(C, "c", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "d", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); Object.defineProperty(C, "e", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); Object.defineProperty(C, "f", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/declFileRegressionTests.js b/tests/baselines/reference/declFileRegressionTests.js index a8bf23a8ea8..6178398ef31 100644 --- a/tests/baselines/reference/declFileRegressionTests.js +++ b/tests/baselines/reference/declFileRegressionTests.js @@ -8,7 +8,13 @@ var n = { w: null, x: '', y: () => { }, z: 32 }; //// [declFileRegressionTests.js] // 'null' not converted to 'any' in d.ts // function types not piped through correctly -var n = { w: null, x: '', y: function () { }, z: 32 }; +var n = { + w: null, + x: '', + y: function () { + }, + z: 32 +}; //// [declFileRegressionTests.d.ts] diff --git a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js index 563551d67a8..7c6122fc17d 100644 --- a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js +++ b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js @@ -17,11 +17,19 @@ function f1() { args[_i - 0] = arguments[_i]; } } -function f2(x) { } -function f3(x) { } -function f4() { } -function f5() { } -var f6 = function () { return [10]; }; +function f2(x) { +} +function f3(x) { +} +function f4() { +} +function f5() { +} +var f6 = function () { + return [ + 10 + ]; +}; //// [declFileRestParametersOfFunctionAndFunctionType.d.ts] diff --git a/tests/baselines/reference/declFileTypeAnnotationArrayType.js b/tests/baselines/reference/declFileTypeAnnotationArrayType.js index 0a9d04d6bc7..34c150cb992 100644 --- a/tests/baselines/reference/declFileTypeAnnotationArrayType.js +++ b/tests/baselines/reference/declFileTypeAnnotationArrayType.js @@ -79,38 +79,60 @@ var g = (function () { })(); // Just the name function foo() { - return [new c()]; + return [ + new c() + ]; } function foo2() { - return [new c()]; + return [ + new c() + ]; } // Qualified name function foo3() { - return [new m.c()]; + return [ + new m.c() + ]; } function foo4() { return m.c; } // Just the name with type arguments function foo5() { - return [new g()]; + return [ + new g() + ]; } function foo6() { - return [new g()]; + return [ + new g() + ]; } // Qualified name with type arguments function foo7() { - return [new m.g()]; + return [ + new m.g() + ]; } function foo8() { - return [new m.g()]; + return [ + new m.g() + ]; } // Array of function types function foo9() { - return [function () { return new c(); }]; + return [ + function () { + return new c(); + } + ]; } function foo10() { - return [function () { return new c(); }]; + return [ + function () { + return new c(); + } + ]; } diff --git a/tests/baselines/reference/declFileTypeAnnotationParenType.js b/tests/baselines/reference/declFileTypeAnnotationParenType.js index c61517c7339..7b8498ac2cc 100644 --- a/tests/baselines/reference/declFileTypeAnnotationParenType.js +++ b/tests/baselines/reference/declFileTypeAnnotationParenType.js @@ -16,10 +16,22 @@ var c = (function () { } return c; })(); -var x = [function () { return new c(); }]; -var y = [function () { return new c(); }]; -var k = (function () { return new c(); }) || ""; -var l = (function () { return new c(); }) || ""; +var x = [ + function () { + return new c(); + } +]; +var y = [ + function () { + return new c(); + } +]; +var k = (function () { + return new c(); +}) || ""; +var l = (function () { + return new c(); +}) || ""; //// [declFileTypeAnnotationParenType.d.ts] diff --git a/tests/baselines/reference/declFileTypeAnnotationTupleType.js b/tests/baselines/reference/declFileTypeAnnotationTupleType.js index 91d44c2b07f..3c610bb9d04 100644 --- a/tests/baselines/reference/declFileTypeAnnotationTupleType.js +++ b/tests/baselines/reference/declFileTypeAnnotationTupleType.js @@ -45,9 +45,18 @@ var g = (function () { return g; })(); // Just the name -var k = [new c(), new m.c()]; +var k = [ + new c(), + new m.c() +]; var l = k; -var x = [new g(), new m.g(), function () { return new c(); }]; +var x = [ + new g(), + new m.g(), + function () { + return new c(); + } +]; var y = x; diff --git a/tests/baselines/reference/declFileTypeAnnotationUnionType.js b/tests/baselines/reference/declFileTypeAnnotationUnionType.js index 0a8e256ef28..40edf72d361 100644 --- a/tests/baselines/reference/declFileTypeAnnotationUnionType.js +++ b/tests/baselines/reference/declFileTypeAnnotationUnionType.js @@ -51,8 +51,12 @@ var g = (function () { // Just the name var k = new c() || new m.c(); var l = new c() || new m.c(); -var x = new g() || new m.g() || (function () { return new c(); }); -var y = new g() || new m.g() || (function () { return new c(); }); +var x = new g() || new m.g() || (function () { + return new c(); +}); +var y = new g() || new m.g() || (function () { + return new c(); +}); //// [declFileTypeAnnotationUnionType.d.ts] diff --git a/tests/baselines/reference/declFileTypeofFunction.js b/tests/baselines/reference/declFileTypeofFunction.js index 656e02b8ddd..2af519f411d 100644 --- a/tests/baselines/reference/declFileTypeofFunction.js +++ b/tests/baselines/reference/declFileTypeofFunction.js @@ -34,8 +34,12 @@ function foo5(x: number) { } //// [declFileTypeofFunction.js] -function f() { return undefined; } -function g() { return undefined; } +function f() { + return undefined; +} +function g() { + return undefined; +} var b; function b1() { return b1; diff --git a/tests/baselines/reference/declFileTypeofInAnonymousType.js b/tests/baselines/reference/declFileTypeofInAnonymousType.js index 2210f189d16..ab812720d9a 100644 --- a/tests/baselines/reference/declFileTypeofInAnonymousType.js +++ b/tests/baselines/reference/declFileTypeofInAnonymousType.js @@ -43,11 +43,19 @@ var b = { c: m1.c, m1: m1 }; -var c = { m1: m1 }; +var c = { + m1: m1 +}; var d = { - m: { mod: m1 }, - mc: { cl: m1.c }, - me: { en: m1.e }, + m: { + mod: m1 + }, + mc: { + cl: m1.c + }, + me: { + en: m1.e + }, mh: 2 /* holiday */ }; diff --git a/tests/baselines/reference/declInput-2.js b/tests/baselines/reference/declInput-2.js index dcd37454ef0..3ba5ae11bf6 100644 --- a/tests/baselines/reference/declInput-2.js +++ b/tests/baselines/reference/declInput-2.js @@ -38,12 +38,22 @@ var M; var D = (function () { function D() { } - D.prototype.m232 = function () { return null; }; - D.prototype.m242 = function () { return null; }; - D.prototype.m252 = function () { return null; }; // don't generate - D.prototype.m26 = function (i) { }; - D.prototype.m262 = function (i) { }; - D.prototype.m3 = function () { return new C(); }; + D.prototype.m232 = function () { + return null; + }; + D.prototype.m242 = function () { + return null; + }; + D.prototype.m252 = function () { + return null; + }; // don't generate + D.prototype.m26 = function (i) { + }; + D.prototype.m262 = function (i) { + }; + D.prototype.m3 = function () { + return new C(); + }; return D; })(); M.D = D; diff --git a/tests/baselines/reference/declInput.js b/tests/baselines/reference/declInput.js index cd558c93403..538770668c1 100644 --- a/tests/baselines/reference/declInput.js +++ b/tests/baselines/reference/declInput.js @@ -14,8 +14,16 @@ class bar { var bar = (function () { function bar() { } - bar.prototype.f = function () { return ''; }; - bar.prototype.g = function () { return { a: null, b: undefined, c: void 4 }; }; + bar.prototype.f = function () { + return ''; + }; + bar.prototype.g = function () { + return { + a: null, + b: undefined, + c: void 4 + }; + }; bar.prototype.h = function (x, y, z) { if (x === void 0) { x = 4; } if (y === void 0) { y = null; } diff --git a/tests/baselines/reference/declInput3.js b/tests/baselines/reference/declInput3.js index 3be31de3de0..52328b01d6d 100644 --- a/tests/baselines/reference/declInput3.js +++ b/tests/baselines/reference/declInput3.js @@ -14,8 +14,16 @@ class bar { var bar = (function () { function bar() { } - bar.prototype.f = function () { return ''; }; - bar.prototype.g = function () { return { a: null, b: undefined, c: void 4 }; }; + bar.prototype.f = function () { + return ''; + }; + bar.prototype.g = function () { + return { + a: null, + b: undefined, + c: void 4 + }; + }; bar.prototype.h = function (x, y, z) { if (x === void 0) { x = 4; } if (y === void 0) { y = null; } diff --git a/tests/baselines/reference/declInput4.js b/tests/baselines/reference/declInput4.js index 07b6f091a14..18025c808fa 100644 --- a/tests/baselines/reference/declInput4.js +++ b/tests/baselines/reference/declInput4.js @@ -32,9 +32,14 @@ var M; var D = (function () { function D() { } - D.prototype.m232 = function () { return null; }; - D.prototype.m242 = function () { return null; }; - D.prototype.m26 = function (i) { }; + D.prototype.m232 = function () { + return null; + }; + D.prototype.m242 = function () { + return null; + }; + D.prototype.m26 = function (i) { + }; return D; })(); M.D = D; diff --git a/tests/baselines/reference/declarationEmit_nameConflicts.js b/tests/baselines/reference/declarationEmit_nameConflicts.js index ae517bb7460..161224659f1 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts.js @@ -64,7 +64,8 @@ module.exports = f; var im = require('declarationEmit_nameConflicts_1'); var M; (function (M) { - function f() { } + function f() { + } M.f = f; var C = (function () { function C() { @@ -74,7 +75,8 @@ var M; M.C = C; var N; (function (N) { - function g() { } + function g() { + } N.g = g; ; })(N = M.N || (M.N = {})); @@ -87,7 +89,8 @@ var M; (function (M) { var P; (function (P) { - function f() { } + function f() { + } P.f = f; var C = (function () { function C() { @@ -97,7 +100,8 @@ var M; P.C = C; var N; (function (N) { - function g() { } + function g() { + } N.g = g; ; })(N = P.N || (P.N = {})); @@ -113,7 +117,8 @@ var M; (function (M) { var Q; (function (Q) { - function f() { } + function f() { + } Q.f = f; var C = (function () { function C() { @@ -123,7 +128,8 @@ var M; Q.C = C; var N; (function (N) { - function g() { } + function g() { + } N.g = g; ; })(N = Q.N || (Q.N = {})); diff --git a/tests/baselines/reference/declarationEmit_nameConflicts2.js b/tests/baselines/reference/declarationEmit_nameConflicts2.js index 2a228080c68..43167f531d7 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts2.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts2.js @@ -22,7 +22,8 @@ var X; (function (Y) { var base; (function (base) { - function f() { } + function f() { + } base.f = f; var C = (function () { function C() { diff --git a/tests/baselines/reference/declarationEmit_nameConflicts3.js b/tests/baselines/reference/declarationEmit_nameConflicts3.js index 0d68c38cfda..848343362bc 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts3.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts3.js @@ -37,17 +37,20 @@ var M; (function (M) { var D; (function (D) { - function f() { } + function f() { + } D.f = f; })(D = M.D || (M.D = {})); var C; (function (C) { - function f() { } + function f() { + } C.f = f; })(C = M.C || (M.C = {})); var E; (function (E) { - function f() { } + function f() { + } E.f = f; })(E = M.E || (M.E = {})); })(M || (M = {})); @@ -58,7 +61,8 @@ var M; var C = (function () { function C() { } - C.f = function () { }; + C.f = function () { + }; return C; })(); P.C = C; diff --git a/tests/baselines/reference/declarationEmit_protectedMembers.js b/tests/baselines/reference/declarationEmit_protectedMembers.js index 61a4ebdfcab..dc8506b220b 100644 --- a/tests/baselines/reference/declarationEmit_protectedMembers.js +++ b/tests/baselines/reference/declarationEmit_protectedMembers.js @@ -65,8 +65,11 @@ var C1 = (function () { return this.x; }; Object.defineProperty(C1.prototype, "accessor", { - get: function () { return 0; }, - set: function (a) { }, + get: function () { + return 0; + }, + set: function (a) { + }, enumerable: true, configurable: true }); @@ -74,12 +77,15 @@ var C1 = (function () { return this.sx; }; Object.defineProperty(C1, "staticSetter", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); Object.defineProperty(C1, "staticGetter", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); @@ -112,7 +118,9 @@ var C3 = (function (_super) { return _super.sf.call(this); }; Object.defineProperty(C3, "staticGetter", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/declarationsAndAssignments.js b/tests/baselines/reference/declarationsAndAssignments.js index 032f4cb0e63..6772a842a49 100644 --- a/tests/baselines/reference/declarationsAndAssignments.js +++ b/tests/baselines/reference/declarationsAndAssignments.js @@ -182,16 +182,35 @@ function f21() { //// [declarationsAndAssignments.js] function f0() { - var _a = [1, "hello"]; - var x = ([1, "hello"])[0]; - var _b = [1, "hello"], x = _b[0], y = _b[1]; - var _c = [1, "hello"], x = _c[0], y = _c[1], z = _c[2]; // Error - var _d = [0, 1, 2], z = _d[2]; + var _a = [ + 1, + "hello" + ]; + var x = ([ + 1, + "hello" + ])[0]; + var _b = [ + 1, + "hello" + ], x = _b[0], y = _b[1]; + var _c = [ + 1, + "hello" + ], x = _c[0], y = _c[1], z = _c[2]; // Error + var _d = [ + 0, + 1, + 2 + ], z = _d[2]; var x; var y; } function f1() { - var a = [1, "hello"]; + var a = [ + 1, + "hello" + ]; var x = a[0]; var x = a[0], y = a[1]; var x = a[0], y = a[1], z = a[2]; @@ -200,71 +219,161 @@ function f1() { var z; } function f2() { - var _a = { x: 5, y: "hello" }; - var x = ({ x: 5, y: "hello" }).x; - var y = ({ x: 5, y: "hello" }).y; - var _b = { x: 5, y: "hello" }, x = _b.x, y = _b.y; + var _a = { + x: 5, + y: "hello" + }; + var x = ({ + x: 5, + y: "hello" + }).x; + var y = ({ + x: 5, + y: "hello" + }).y; + var _b = { + x: 5, + y: "hello" + }, x = _b.x, y = _b.y; var x; var y; - var a = ({ x: 5, y: "hello" }).x; - var b = ({ x: 5, y: "hello" }).y; - var _c = { x: 5, y: "hello" }, a = _c.x, b = _c.y; + var a = ({ + x: 5, + y: "hello" + }).x; + var b = ({ + x: 5, + y: "hello" + }).y; + var _c = { + x: 5, + y: "hello" + }, a = _c.x, b = _c.y; var a; var b; } function f3() { - var _a = [1, ["hello", [true]]], x = _a[0], _b = _a[1], y = _b[0], z = _b[1][0]; + var _a = [ + 1, + [ + "hello", + [ + true + ] + ] + ], x = _a[0], _b = _a[1], y = _b[0], z = _b[1][0]; var x; var y; var z; } function f4() { - var _a = { a: 1, b: { a: "hello", b: { a: true } } }, x = _a.a, _b = _a.b, y = _b.a, z = _b.b.a; + var _a = { + a: 1, + b: { + a: "hello", + b: { + a: true + } + } + }, x = _a.a, _b = _a.b, y = _b.a, z = _b.b.a; var x; var y; var z; } function f6() { - var _a = [1, "hello"], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? "" : _c; + var _a = [ + 1, + "hello" + ], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? "" : _c; var x; var y; } function f7() { - var _a = [1, "hello"], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 1 : _c; // Error, initializer for y must be string + var _a = [ + 1, + "hello" + ], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 1 : _c; // Error, initializer for y must be string var x; var y; } function f8() { var _a = [], a = _a[0], b = _a[1], c = _a[2]; // Ok, [] is an array - var _b = [1], d = _b[0], e = _b[1], f = _b[2]; // Error, [1] is a tuple + var _b = [ + 1 + ], d = _b[0], e = _b[1], f = _b[2]; // Error, [1] is a tuple } function f9() { var _a = {}, a = _a[0], b = _a[1]; // Error, not array type - var _b = { 0: 10, 1: 20 }, c = _b[0], d = _b[1]; // Error, not array type - var _c = [10, 20], e = _c[0], f = _c[1]; + var _b = { + 0: 10, + 1: 20 + }, c = _b[0], d = _b[1]; // Error, not array type + var _c = [ + 10, + 20 + ], e = _c[0], f = _c[1]; } function f10() { var _a = {}, a = _a.a, b = _a.b; // Error var _b = [], a = _b.a, b = _b.b; // Error } function f11() { - var _a = { x: 10, y: "hello" }, a = _a.x, b = _a.y; - var _b = { 0: 10, 1: "hello" }, a = _b[0], b = _b[1]; - var _c = { "<": 10, ">": "hello" }, a = _c["<"], b = _c[">"]; - var _d = [10, "hello"], a = _d[0], b = _d[1]; + var _a = { + x: 10, + y: "hello" + }, a = _a.x, b = _a.y; + var _b = { + 0: 10, + 1: "hello" + }, a = _b[0], b = _b[1]; + var _c = { + "<": 10, + ">": "hello" + }, a = _c["<"], b = _c[">"]; + var _d = [ + 10, + "hello" + ], a = _d[0], b = _d[1]; var a; var b; } function f12() { - var _a = [1, ["hello", { x: 5, y: true }]], a = _a[0], _b = _a[1], _c = _b === void 0 ? ["abc", { x: 10, y: false }] : _b, b = _c[0], _d = _c[1], x = _d.x, c = _d.y; + var _a = [ + 1, + [ + "hello", + { + x: 5, + y: true + } + ] + ], a = _a[0], _b = _a[1], _c = _b === void 0 ? [ + "abc", + { + x: 10, + y: false + } + ] : _b, b = _c[0], _d = _c[1], x = _d.x, c = _d.y; var a; var b; var x; var c; } function f13() { - var _a = [1, "hello"], x = _a[0], y = _a[1]; - var _b = [[x, y], { x: x, y: y }], a = _b[0], b = _b[1]; + var _a = [ + 1, + "hello" + ], x = _a[0], y = _a[1]; + var _b = [ + [ + x, + y + ], + { + x: x, + y: y + } + ], a = _b[0], b = _b[1]; } function f14(_a) { var _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], _d = _c[0], b = _d === void 0 ? "hello" : _d, _e = _c[1], x = _e.x, _f = _e.y, c = _f === void 0 ? false : _f; @@ -272,19 +381,51 @@ function f14(_a) { var b; var c; } -f14([2, ["abc", { x: 0, y: true }]]); -f14([2, ["abc", { x: 0 }]]); -f14([2, ["abc", { y: false }]]); // Error, no x +f14([ + 2, + [ + "abc", + { + x: 0, + y: true + } + ] +]); +f14([ + 2, + [ + "abc", + { + x: 0 + } + ] +]); +f14([ + 2, + [ + "abc", + { + y: false + } + ] +]); // Error, no x var M; (function (M) { - _a = [1, 2], M.a = _a[0], M.b = _a[1]; + _a = [ + 1, + 2 + ], M.a = _a[0], M.b = _a[1]; var _a; })(M || (M = {})); function f15() { var a = "hello"; var b = 1; var c = true; - return { a: a, b: b, c: c }; + return { + a: a, + b: b, + c: c + }; } function f16() { var _a = f15(), a = _a.a, b = _a.b, c = _a.c; @@ -293,27 +434,66 @@ function f17(_a) { var _b = _a.a, a = _b === void 0 ? "" : _b, _c = _a.b, b = _c === void 0 ? 0 : _c, _d = _a.c, c = _d === void 0 ? false : _d; } f17({}); -f17({ a: "hello" }); -f17({ c: true }); +f17({ + a: "hello" +}); +f17({ + c: true +}); f17(f15()); function f18() { var a; var b; var aa; - (_a = { a: a, b: b }, a = _a.a, b = _a.b, _a); - (_b = { b: b, a: a }, a = _b.a, b = _b.b, _b); - _c = [a, b], aa[0] = _c[0], b = _c[1]; - _d = [b, a], a = _d[0], b = _d[1]; // Error - _e = [2, "def"], _f = _e[0], a = _f === void 0 ? 1 : _f, _g = _e[1], b = _g === void 0 ? "abc" : _g; + (_a = { + a: a, + b: b + }, a = _a.a, b = _a.b, _a); + (_b = { + b: b, + a: a + }, a = _b.a, b = _b.b, _b); + _c = [ + a, + b + ], aa[0] = _c[0], b = _c[1]; + _d = [ + b, + a + ], a = _d[0], b = _d[1]; // Error + _e = [ + 2, + "def" + ], _f = _e[0], a = _f === void 0 ? 1 : _f, _g = _e[1], b = _g === void 0 ? "abc" : _g; var _a, _b, _c, _d, _e, _f, _g; } function f19() { var a, b; - _a = [1, 2], a = _a[0], b = _a[1]; - _b = [b, a], a = _b[0], b = _b[1]; - (_c = { b: b, a: a }, a = _c.a, b = _c.b, _c); - _d = ([[2, 3]])[0], _e = _d === void 0 ? [1, 2] : _d, a = _e[0], b = _e[1]; - var x = (_f = [1, 2], a = _f[0], b = _f[1], _f); + _a = [ + 1, + 2 + ], a = _a[0], b = _a[1]; + _b = [ + b, + a + ], a = _b[0], b = _b[1]; + (_c = { + b: b, + a: a + }, a = _c.a, b = _c.b, _c); + _d = ([ + [ + 2, + 3 + ] + ])[0], _e = _d === void 0 ? [ + 1, + 2 + ] : _d, a = _e[0], b = _e[1]; + var x = (_f = [ + 1, + 2 + ], a = _f[0], b = _f[1], _f); var _a, _b, _c, _d, _e, _f; } function f20() { @@ -321,14 +501,46 @@ function f20() { var x; var y; var z; - var _a = [1, 2, 3], a = _a.slice(0); - var _b = [1, 2, 3], x = _b[0], a = _b.slice(1); - var _c = [1, 2, 3], x = _c[0], y = _c[1], a = _c.slice(2); - var _d = [1, 2, 3], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); - _e = [1, 2, 3], a = _e.slice(0); - _f = [1, 2, 3], x = _f[0], a = _f.slice(1); - _g = [1, 2, 3], x = _g[0], y = _g[1], a = _g.slice(2); - _h = [1, 2, 3], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); + var _a = [ + 1, + 2, + 3 + ], a = _a.slice(0); + var _b = [ + 1, + 2, + 3 + ], x = _b[0], a = _b.slice(1); + var _c = [ + 1, + 2, + 3 + ], x = _c[0], y = _c[1], a = _c.slice(2); + var _d = [ + 1, + 2, + 3 + ], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); + _e = [ + 1, + 2, + 3 + ], a = _e.slice(0); + _f = [ + 1, + 2, + 3 + ], x = _f[0], a = _f.slice(1); + _g = [ + 1, + 2, + 3 + ], x = _g[0], y = _g[1], a = _g.slice(2); + _h = [ + 1, + 2, + 3 + ], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); var _e, _f, _g, _h; } function f21() { @@ -336,13 +548,45 @@ function f21() { var x; var y; var z; - var _a = [1, "hello", true], a = _a.slice(0); - var _b = [1, "hello", true], x = _b[0], a = _b.slice(1); - var _c = [1, "hello", true], x = _c[0], y = _c[1], a = _c.slice(2); - var _d = [1, "hello", true], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); - _e = [1, "hello", true], a = _e.slice(0); - _f = [1, "hello", true], x = _f[0], a = _f.slice(1); - _g = [1, "hello", true], x = _g[0], y = _g[1], a = _g.slice(2); - _h = [1, "hello", true], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); + var _a = [ + 1, + "hello", + true + ], a = _a.slice(0); + var _b = [ + 1, + "hello", + true + ], x = _b[0], a = _b.slice(1); + var _c = [ + 1, + "hello", + true + ], x = _c[0], y = _c[1], a = _c.slice(2); + var _d = [ + 1, + "hello", + true + ], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); + _e = [ + 1, + "hello", + true + ], a = _e.slice(0); + _f = [ + 1, + "hello", + true + ], x = _f[0], a = _f.slice(1); + _g = [ + 1, + "hello", + true + ], x = _g[0], y = _g[1], a = _g.slice(2); + _h = [ + 1, + "hello", + true + ], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); var _e, _f, _g, _h; } diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherType.js b/tests/baselines/reference/decrementOperatorWithAnyOtherType.js index 34ea154daa6..12632572918 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherType.js @@ -52,8 +52,14 @@ M.n--; // -- operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; -var obj = { x: 1, y: null }; +var ANY2 = [ + "", + "" +]; +var obj = { + x: 1, + y: null +}; var A = (function () { function A() { } diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js index 8e4f927a920..e5a73aea37d 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -75,9 +75,16 @@ ANY2--; //// [decrementOperatorWithAnyOtherTypeInvalidOperations.js] // -- operator on any type var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/decrementOperatorWithNumberType.js b/tests/baselines/reference/decrementOperatorWithNumberType.js index 85ed9ca548a..faef864184b 100644 --- a/tests/baselines/reference/decrementOperatorWithNumberType.js +++ b/tests/baselines/reference/decrementOperatorWithNumberType.js @@ -42,7 +42,10 @@ objA.a--, M.n--; //// [decrementOperatorWithNumberType.js] // -- operator on number type var NUMBER; -var NUMBER1 = [1, 2]; +var NUMBER1 = [ + 1, + 2 +]; var A = (function () { function A() { } diff --git a/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.js b/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.js index 34e862063ce..ccc5b6eaa1c 100644 --- a/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.js +++ b/tests/baselines/reference/decrementOperatorWithNumberTypeInvalidOperations.js @@ -49,12 +49,19 @@ foo()--; //// [decrementOperatorWithNumberTypeInvalidOperations.js] // -- operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -67,11 +74,27 @@ var ResultIsNumber1 = --NUMBER1; var ResultIsNumber2 = NUMBER1--; // number type literal var ResultIsNumber3 = --1; -var ResultIsNumber4 = --{ x: 1, y: 2 }; -var ResultIsNumber5 = --{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = --{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = --{ + x: 1, + y: function (n) { + return n; + } +}; var ResultIsNumber6 = 1--; -var ResultIsNumber7 = { x: 1, y: 2 }--; -var ResultIsNumber8 = { x: 1, y: function (n) { return n; } }--; +var ResultIsNumber7 = { + x: 1, + y: 2 +}--; +var ResultIsNumber8 = { + x: 1, + y: function (n) { + return n; + } +}--; // number type expressions var ResultIsNumber9 = --foo(); var ResultIsNumber10 = --A.foo(); diff --git a/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.js b/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.js index 2be74a64d8f..93737ea87cd 100644 --- a/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.js +++ b/tests/baselines/reference/decrementOperatorWithUnsupportedBooleanType.js @@ -57,11 +57,15 @@ objA.a--, M.n--; //// [decrementOperatorWithUnsupportedBooleanType.js] // -- operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return true; }; + A.foo = function () { + return true; + }; return A; })(); var M; @@ -74,11 +78,27 @@ var ResultIsNumber1 = --BOOLEAN; var ResultIsNumber2 = BOOLEAN--; // boolean type literal var ResultIsNumber3 = --true; -var ResultIsNumber4 = --{ x: true, y: false }; -var ResultIsNumber5 = --{ x: true, y: function (n) { return n; } }; +var ResultIsNumber4 = --{ + x: true, + y: false +}; +var ResultIsNumber5 = --{ + x: true, + y: function (n) { + return n; + } +}; var ResultIsNumber6 = true--; -var ResultIsNumber7 = { x: true, y: false }--; -var ResultIsNumber8 = { x: true, y: function (n) { return n; } }--; +var ResultIsNumber7 = { + x: true, + y: false +}--; +var ResultIsNumber8 = { + x: true, + y: function (n) { + return n; + } +}--; // boolean type expressions var ResultIsNumber9 = --objA.a; var ResultIsNumber10 = --M.n; diff --git a/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.js b/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.js index 430f9af963f..e033acf3e1e 100644 --- a/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.js +++ b/tests/baselines/reference/decrementOperatorWithUnsupportedStringType.js @@ -68,12 +68,19 @@ objA.a--, M.n--; //// [decrementOperatorWithUnsupportedStringType.js] // -- operator on string type var STRING; -var STRING1 = ["", ""]; -function foo() { return ""; } +var STRING1 = [ + "", + "" +]; +function foo() { + return ""; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -88,11 +95,27 @@ var ResultIsNumber3 = STRING--; var ResultIsNumber4 = STRING1--; // string type literal var ResultIsNumber5 = --""; -var ResultIsNumber6 = --{ x: "", y: "" }; -var ResultIsNumber7 = --{ x: "", y: function (s) { return s; } }; +var ResultIsNumber6 = --{ + x: "", + y: "" +}; +var ResultIsNumber7 = --{ + x: "", + y: function (s) { + return s; + } +}; var ResultIsNumber8 = ""--; -var ResultIsNumber9 = { x: "", y: "" }--; -var ResultIsNumber10 = { x: "", y: function (s) { return s; } }--; +var ResultIsNumber9 = { + x: "", + y: "" +}--; +var ResultIsNumber10 = { + x: "", + y: function (s) { + return s; + } +}--; // string type expressions var ResultIsNumber11 = --objA.a; var ResultIsNumber12 = --M.n; diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.js b/tests/baselines/reference/defaultArgsInFunctionExpressions.js index 3f77c4430e8..a58905dd816 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.js +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.js @@ -50,7 +50,9 @@ s = f2(); n = f2(); // Contextually type the default arg with the type annotation var f3 = function (a) { - if (a === void 0) { a = function (s) { return s; }; } + if (a === void 0) { a = function (s) { + return s; + }; } }; // Type check using the function's contextual type var f4 = function (a) { @@ -58,7 +60,9 @@ var f4 = function (a) { }; // Contextually type the default arg using the function's contextual type var f5 = function (a) { - if (a === void 0) { a = function (s) { return s; }; } + if (a === void 0) { a = function (s) { + return s; + }; } }; var U; (function (U) { diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js index ad6181ba7c5..98e135cc712 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.js @@ -20,9 +20,13 @@ var obj1; obj1.length; var obj2; obj2.length; -function concat(x, y) { return null; } +function concat(x, y) { + return null; +} var result = concat(1, ""); // error var elementCount = result.length; -function concat2(x, y) { return null; } +function concat2(x, y) { + return null; +} var result2 = concat2(1, ""); // result2 will be number|string var elementCount2 = result.length; diff --git a/tests/baselines/reference/defaultIndexProps1.js b/tests/baselines/reference/defaultIndexProps1.js index fc8fe52b9fc..63d8c70c9d0 100644 --- a/tests/baselines/reference/defaultIndexProps1.js +++ b/tests/baselines/reference/defaultIndexProps1.js @@ -21,5 +21,7 @@ var Foo = (function () { })(); var f = new Foo(); var q = f["v"]; -var o = { v: "Yo2" }; +var o = { + v: "Yo2" +}; var q2 = o["v"]; diff --git a/tests/baselines/reference/defaultIndexProps2.js b/tests/baselines/reference/defaultIndexProps2.js index 7652e591cc9..6a175f0f560 100644 --- a/tests/baselines/reference/defaultIndexProps2.js +++ b/tests/baselines/reference/defaultIndexProps2.js @@ -24,7 +24,9 @@ var Foo = (function () { })(); var f = new Foo(); // WScript.Echo(f[0]); -var o = { v: "Yo2" }; +var o = { + v: "Yo2" +}; // WScript.Echo(o[0]); 1[0]; var q = "s"[0]; diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.js b/tests/baselines/reference/deleteOperatorWithAnyOtherType.js index e2a2be4d9aa..b4f9870c7e3 100644 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType.js @@ -65,9 +65,16 @@ delete M.n; // delete operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/deleteOperatorWithBooleanType.js b/tests/baselines/reference/deleteOperatorWithBooleanType.js index b0a60a23744..2c913251c79 100644 --- a/tests/baselines/reference/deleteOperatorWithBooleanType.js +++ b/tests/baselines/reference/deleteOperatorWithBooleanType.js @@ -41,11 +41,15 @@ delete M.n; //// [deleteOperatorWithBooleanType.js] // delete operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -57,7 +61,10 @@ var objA = new A(); var ResultIsBoolean1 = delete BOOLEAN; // boolean type literal var ResultIsBoolean2 = delete true; -var ResultIsBoolean3 = delete { x: true, y: false }; +var ResultIsBoolean3 = delete { + x: true, + y: false +}; // boolean type expressions var ResultIsBoolean4 = delete objA.a; var ResultIsBoolean5 = delete M.n; diff --git a/tests/baselines/reference/deleteOperatorWithNumberType.js b/tests/baselines/reference/deleteOperatorWithNumberType.js index bb70c55024d..50513247f64 100644 --- a/tests/baselines/reference/deleteOperatorWithNumberType.js +++ b/tests/baselines/reference/deleteOperatorWithNumberType.js @@ -48,12 +48,19 @@ delete objA.a, M.n; //// [deleteOperatorWithNumberType.js] // delete operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -66,8 +73,16 @@ var ResultIsBoolean1 = delete NUMBER; var ResultIsBoolean2 = delete NUMBER1; // number type literal var ResultIsBoolean3 = delete 1; -var ResultIsBoolean4 = delete { x: 1, y: 2 }; -var ResultIsBoolean5 = delete { x: 1, y: function (n) { return n; } }; +var ResultIsBoolean4 = delete { + x: 1, + y: 2 +}; +var ResultIsBoolean5 = delete { + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsBoolean6 = delete objA.a; var ResultIsBoolean7 = delete M.n; diff --git a/tests/baselines/reference/deleteOperatorWithStringType.js b/tests/baselines/reference/deleteOperatorWithStringType.js index 79246e27725..ddf4b827779 100644 --- a/tests/baselines/reference/deleteOperatorWithStringType.js +++ b/tests/baselines/reference/deleteOperatorWithStringType.js @@ -47,12 +47,19 @@ delete objA.a,M.n; //// [deleteOperatorWithStringType.js] // delete operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -65,8 +72,16 @@ var ResultIsBoolean1 = delete STRING; var ResultIsBoolean2 = delete STRING1; // string type literal var ResultIsBoolean3 = delete ""; -var ResultIsBoolean4 = delete { x: "", y: "" }; -var ResultIsBoolean5 = delete { x: "", y: function (s) { return s; } }; +var ResultIsBoolean4 = delete { + x: "", + y: "" +}; +var ResultIsBoolean5 = delete { + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsBoolean6 = delete objA.a; var ResultIsBoolean7 = delete M.n; diff --git a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js index 32e8cf4199e..e4ff8dd9775 100644 --- a/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js +++ b/tests/baselines/reference/derivedClassConstructorWithoutSuperCall.js @@ -59,14 +59,18 @@ var Base2 = (function () { var Derived2 = (function (_super) { __extends(Derived2, _super); function Derived2() { - var r2 = function () { return _super.call(this); }; // error for misplaced super call (nested function) + var r2 = function () { + return _super.call(this); + }; // error for misplaced super call (nested function) } return Derived2; })(Base2); var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3() { - var r = function () { _super.call(this); }; // error + var r = function () { + _super.call(this); + }; // error } return Derived3; })(Base2); diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index f2e816604d2..db54affa6d9 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -50,17 +50,25 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base(x) { } - Base.prototype.b = function () { }; + Base.prototype.b = function () { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return ''; }, - set: function (v) { }, + get: function () { + return ''; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function () { }; + Base.s = function () { + }; Object.defineProperty(Base, "t", { - get: function () { return ''; }, - set: function (v) { }, + get: function () { + return ''; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index b66d356a73e..8c8b6a13c7e 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -48,17 +48,25 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { }; + Base.prototype.b = function (a) { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function (a) { }; + Base.s = function (a) { + }; Object.defineProperty(Base, "t", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -69,17 +77,25 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, x); } - Derived.prototype.b = function (a) { }; + Derived.prototype.b = function (a) { + }; Object.defineProperty(Derived.prototype, "c", { - get: function () { return y; }, - set: function (v) { }, + get: function () { + return y; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Derived.s = function (a) { }; + Derived.s = function (a) { + }; Object.defineProperty(Derived, "t", { - get: function () { return y; }, - set: function (a) { }, + get: function () { + return y; + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 80f7456ab9a..55bfd0e924d 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -75,17 +75,25 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { }; + Base.prototype.b = function (a) { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function (a) { }; + Base.s = function (a) { + }; Object.defineProperty(Base, "t", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -97,17 +105,25 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, a); } - Derived.prototype.b = function (a) { }; + Derived.prototype.b = function (a) { + }; Object.defineProperty(Derived.prototype, "c", { - get: function () { return y; }, - set: function (v) { }, + get: function () { + return y; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Derived.s = function (a) { }; + Derived.s = function (a) { + }; Object.defineProperty(Derived, "t", { - get: function () { return y; }, - set: function (a) { }, + get: function () { + return y; + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index cfb6116ee85..0a228a04f71 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -83,17 +83,25 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { }; + Base.prototype.b = function (a) { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function (a) { }; + Base.s = function (a) { + }; Object.defineProperty(Base, "t", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -113,7 +121,8 @@ var Derived2 = (function (_super) { function Derived2(a) { _super.call(this, a); } - Derived2.prototype.b = function (a) { }; + Derived2.prototype.b = function (a) { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -122,7 +131,9 @@ var Derived3 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived3.prototype, "c", { - get: function () { return x; }, + get: function () { + return x; + }, enumerable: true, configurable: true }); @@ -134,7 +145,8 @@ var Derived4 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived4.prototype, "c", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -159,7 +171,8 @@ var Derived7 = (function (_super) { function Derived7(a) { _super.call(this, a); } - Derived7.s = function (a) { }; + Derived7.s = function (a) { + }; return Derived7; })(Base); var Derived8 = (function (_super) { @@ -168,7 +181,9 @@ var Derived8 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived8, "t", { - get: function () { return x; }, + get: function () { + return x; + }, enumerable: true, configurable: true }); @@ -180,7 +195,8 @@ var Derived9 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived9, "t", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index 9d7df0eee40..f673d9ab856 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -74,17 +74,25 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { }; + Base.prototype.b = function (a) { + }; Object.defineProperty(Base.prototype, "c", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Base.s = function (a) { }; + Base.s = function (a) { + }; Object.defineProperty(Base, "t", { - get: function () { return x; }, - set: function (v) { }, + get: function () { + return x; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -95,17 +103,25 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, x); } - Derived.prototype.b = function (a) { }; + Derived.prototype.b = function (a) { + }; Object.defineProperty(Derived.prototype, "c", { - get: function () { return y; }, - set: function (v) { }, + get: function () { + return y; + }, + set: function (v) { + }, enumerable: true, configurable: true }); - Derived.s = function (a) { }; + Derived.s = function (a) { + }; Object.defineProperty(Derived, "t", { - get: function () { return y; }, - set: function (a) { }, + get: function () { + return y; + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js index 1902b6f4068..fb979ba6032 100644 --- a/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js +++ b/tests/baselines/reference/derivedClassSuperCallsWithThisArg.js @@ -59,7 +59,9 @@ var Derived3 = (function (_super) { __extends(Derived3, _super); function Derived3(a) { var _this = this; - _super.call(this, function () { return _this; }); // error + _super.call(this, function () { + return _this; + }); // error this.a = a; } return Derived3; @@ -67,7 +69,9 @@ var Derived3 = (function (_super) { var Derived4 = (function (_super) { __extends(Derived4, _super); function Derived4(a) { - _super.call(this, function () { return this; }); // ok + _super.call(this, function () { + return this; + }); // ok this.a = a; } return Derived4; diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 2088fc1122b..53749861549 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -31,7 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var D = (function (_super) { @@ -39,7 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function () { }; // ok to drop parameters + D.prototype.foo = function () { + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -47,7 +49,8 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x) { }; // ok to add optional parameters + E.prototype.foo = function (x) { + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index 458aede164c..1b4bd58923c 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -31,7 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; return C; })(); var D = (function (_super) { @@ -39,7 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function (x) { }; // ok to drop parameters + D.prototype.foo = function (x) { + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -47,7 +49,8 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x, y) { }; // ok to add optional parameters + E.prototype.foo = function (x, y) { + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 9768a8f5fa3..3e548f5276e 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -31,7 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; return C; })(); var D = (function (_super) { @@ -39,7 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function (x) { }; // ok to drop parameters + D.prototype.foo = function (x) { + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -47,7 +49,8 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x, y) { }; // ok to add optional parameters + E.prototype.foo = function (x, y) { + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index abf1a3b5bd0..5249c6aad2e 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -31,7 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var D = (function (_super) { @@ -39,7 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function () { }; // ok to drop parameters + D.prototype.foo = function () { + }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -47,7 +49,8 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x) { }; // ok to add optional parameters + E.prototype.foo = function (x) { + }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassWithAny.js b/tests/baselines/reference/derivedClassWithAny.js index 8070e689bd0..0b568eaec9b 100644 --- a/tests/baselines/reference/derivedClassWithAny.js +++ b/tests/baselines/reference/derivedClassWithAny.js @@ -70,7 +70,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -123,7 +125,9 @@ var E = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(E.prototype, "X", { - get: function () { return ''; }, + get: function () { + return ''; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index 8b00c632058..f802a225088 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -36,8 +36,11 @@ var Base = (function () { return ''; }; Object.defineProperty(Base.prototype, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -53,8 +56,11 @@ var Derived = (function (_super) { return ''; }; Object.defineProperty(Derived.prototype, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index 4ac57d159e6..fb0dee3e57b 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -46,8 +46,11 @@ var Base = (function () { return ''; }; Object.defineProperty(Base.prototype, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -63,8 +66,11 @@ var Derived = (function (_super) { return ''; }; Object.defineProperty(Derived.prototype, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 1037d3faaae..558e2309757 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -35,8 +35,11 @@ var Base = (function () { return ''; }; Object.defineProperty(Base, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -52,8 +55,11 @@ var Derived = (function (_super) { return ''; }; Object.defineProperty(Derived, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index c5bfea288bd..b2468f62d81 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -47,8 +47,11 @@ var Base = (function () { return ''; }; Object.defineProperty(Base, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -65,8 +68,11 @@ var Derived = (function (_super) { return ''; }; Object.defineProperty(Derived, "a", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClasses.js b/tests/baselines/reference/derivedClasses.js index e256313d27b..a0d6de6a819 100644 --- a/tests/baselines/reference/derivedClasses.js +++ b/tests/baselines/reference/derivedClasses.js @@ -44,7 +44,9 @@ var Red = (function (_super) { } Red.prototype.shade = function () { var _this = this; - var getHue = function () { return _this.hue(); }; + var getHue = function () { + return _this.hue(); + }; return getHue() + " red"; }; return Red; @@ -52,8 +54,12 @@ var Red = (function (_super) { var Color = (function () { function Color() { } - Color.prototype.shade = function () { return "some shade"; }; - Color.prototype.hue = function () { return "some hue"; }; + Color.prototype.shade = function () { + return "some shade"; + }; + Color.prototype.hue = function () { + return "some hue"; + }; return Color; })(); var Blue = (function (_super) { @@ -63,7 +69,9 @@ var Blue = (function (_super) { } Blue.prototype.shade = function () { var _this = this; - var getHue = function () { return _this.hue(); }; + var getHue = function () { + return _this.hue(); + }; return getHue() + " blue"; }; return Blue; diff --git a/tests/baselines/reference/derivedGenericClassWithAny.js b/tests/baselines/reference/derivedGenericClassWithAny.js index 4d1f0452be4..677fadf3876 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.js +++ b/tests/baselines/reference/derivedGenericClassWithAny.js @@ -53,7 +53,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - get: function () { return null; }, + get: function () { + return null; + }, enumerable: true, configurable: true }); @@ -96,7 +98,9 @@ var E = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(E.prototype, "X", { - get: function () { return ''; } // error + get: function () { + return ''; + } // error , enumerable: true, configurable: true diff --git a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js index 39e87b620d6..1ca6ce59450 100644 --- a/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js +++ b/tests/baselines/reference/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js @@ -41,9 +41,17 @@ var Derived = (function (_super) { return null; }; Derived.prototype.bar = function () { - var r = _super.prototype.foo.call(this, { a: 1 }); // { a: number } - var r2 = _super.prototype.foo.call(this, { a: 1, b: 2 }); // { a: number } - var r3 = this.foo({ a: 1, b: 2 }); // { a: number; b: number; } + var r = _super.prototype.foo.call(this, { + a: 1 + }); // { a: number } + var r2 = _super.prototype.foo.call(this, { + a: 1, + b: 2 + }); // { a: number } + var r3 = this.foo({ + a: 1, + b: 2 + }); // { a: number; b: number; } }; return Derived; })(Base); diff --git a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js index 50c8aba1ef8..c70e3ff2aee 100644 --- a/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js +++ b/tests/baselines/reference/derivedTypeDoesNotRequireExtendsClause.js @@ -49,4 +49,7 @@ var d1; var d2; b = d1; b = d2; -var r = [d1, d2]; +var r = [ + d1, + d2 +]; diff --git a/tests/baselines/reference/destructuringParameterProperties1.js b/tests/baselines/reference/destructuringParameterProperties1.js index cc16cc78de5..6d39d41cc1b 100644 --- a/tests/baselines/reference/destructuringParameterProperties1.js +++ b/tests/baselines/reference/destructuringParameterProperties1.js @@ -52,10 +52,34 @@ var C3 = (function () { return C3; })(); var c1 = new C1([]); -c1 = new C1(["larry", "{curly}", "moe"]); +c1 = new C1([ + "larry", + "{curly}", + "moe" +]); var useC1Properties = c1.x === c1.y && c1.y === c1.z; -var c2 = new C2(["10", 10, !!10]); -var _a = [c2.x, c2.y, c2.z], c2_x = _a[0], c2_y = _a[1], c2_z = _a[2]; -var c3 = new C3({ x: 0, y: "", z: false }); -c3 = new C3({ x: 0, "y": "y", z: true }); -var _b = [c3.x, c3.y, c3.z], c3_x = _b[0], c3_y = _b[1], c3_z = _b[2]; +var c2 = new C2([ + "10", + 10, + !!10 +]); +var _a = [ + c2.x, + c2.y, + c2.z +], c2_x = _a[0], c2_y = _a[1], c2_z = _a[2]; +var c3 = new C3({ + x: 0, + y: "", + z: false +}); +c3 = new C3({ + x: 0, + "y": "y", + z: true +}); +var _b = [ + c3.x, + c3.y, + c3.z +], c3_x = _b[0], c3_y = _b[1], c3_z = _b[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties2.js b/tests/baselines/reference/destructuringParameterProperties2.js index 27e190af62f..7d7a89380a7 100644 --- a/tests/baselines/reference/destructuringParameterProperties2.js +++ b/tests/baselines/reference/destructuringParameterProperties2.js @@ -50,9 +50,33 @@ var C1 = (function () { }; return C1; })(); -var x = new C1(undefined, [0, undefined, ""]); -var _a = [x.getA(), x.getB(), x.getC()], x_a = _a[0], x_b = _a[1], x_c = _a[2]; -var y = new C1(10, [0, "", true]); -var _b = [y.getA(), y.getB(), y.getC()], y_a = _b[0], y_b = _b[1], y_c = _b[2]; -var z = new C1(10, [undefined, "", null]); -var _c = [z.getA(), z.getB(), z.getC()], z_a = _c[0], z_b = _c[1], z_c = _c[2]; +var x = new C1(undefined, [ + 0, + undefined, + "" +]); +var _a = [ + x.getA(), + x.getB(), + x.getC() +], x_a = _a[0], x_b = _a[1], x_c = _a[2]; +var y = new C1(10, [ + 0, + "", + true +]); +var _b = [ + y.getA(), + y.getB(), + y.getC() +], y_a = _b[0], y_b = _b[1], y_c = _b[2]; +var z = new C1(10, [ + undefined, + "", + null +]); +var _c = [ + z.getA(), + z.getB(), + z.getC() +], z_a = _c[0], z_b = _c[1], z_c = _c[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties3.js b/tests/baselines/reference/destructuringParameterProperties3.js index fe9e69d7e5b..f9b89046ae1 100644 --- a/tests/baselines/reference/destructuringParameterProperties3.js +++ b/tests/baselines/reference/destructuringParameterProperties3.js @@ -53,11 +53,43 @@ var C1 = (function () { }; return C1; })(); -var x = new C1(undefined, [0, true, ""]); -var _a = [x.getA(), x.getB(), x.getC()], x_a = _a[0], x_b = _a[1], x_c = _a[2]; -var y = new C1(10, [0, true, true]); -var _b = [y.getA(), y.getB(), y.getC()], y_a = _b[0], y_b = _b[1], y_c = _b[2]; -var z = new C1(10, [undefined, "", ""]); -var _c = [z.getA(), z.getB(), z.getC()], z_a = _c[0], z_b = _c[1], z_c = _c[2]; -var w = new C1(10, [undefined, undefined, undefined]); -var _d = [z.getA(), z.getB(), z.getC()], z_a = _d[0], z_b = _d[1], z_c = _d[2]; +var x = new C1(undefined, [ + 0, + true, + "" +]); +var _a = [ + x.getA(), + x.getB(), + x.getC() +], x_a = _a[0], x_b = _a[1], x_c = _a[2]; +var y = new C1(10, [ + 0, + true, + true +]); +var _b = [ + y.getA(), + y.getB(), + y.getC() +], y_a = _b[0], y_b = _b[1], y_c = _b[2]; +var z = new C1(10, [ + undefined, + "", + "" +]); +var _c = [ + z.getA(), + z.getB(), + z.getC() +], z_a = _c[0], z_b = _c[1], z_c = _c[2]; +var w = new C1(10, [ + undefined, + undefined, + undefined +]); +var _d = [ + z.getA(), + z.getB(), + z.getC() +], z_a = _d[0], z_b = _d[1], z_c = _d[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties5.js b/tests/baselines/reference/destructuringParameterProperties5.js index d9b1710ae89..7575ebb3af7 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.js +++ b/tests/baselines/reference/destructuringParameterProperties5.js @@ -22,5 +22,19 @@ var C1 = (function () { } return C1; })(); -var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]); -var _a = [a.x1, a.x2, a.x3, a.y, a.z], a_x1 = _a[0], a_x2 = _a[1], a_x3 = _a[2], a_y = _a[3], a_z = _a[4]; +var a = new C1([ + { + x1: 10, + x2: "", + x3: true + }, + "", + false +]); +var _a = [ + a.x1, + a.x2, + a.x3, + a.y, + a.z +], a_x1 = _a[0], a_x2 = _a[1], a_x3 = _a[2], a_y = _a[3], a_z = _a[4]; diff --git a/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js b/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js index 13312aea362..c0fe33d086e 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js +++ b/tests/baselines/reference/detachedCommentAtStartOfConstructor1.js @@ -16,7 +16,9 @@ var TestFile = (function () { var _this = this; /// Test summary /// - var getMessage = function () { return message + _this.name; }; + var getMessage = function () { + return message + _this.name; + }; this.message = getMessage(); } return TestFile; diff --git a/tests/baselines/reference/detachedCommentAtStartOfConstructor2.js b/tests/baselines/reference/detachedCommentAtStartOfConstructor2.js index 754b432c7c5..97d8e2f3a3d 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfConstructor2.js +++ b/tests/baselines/reference/detachedCommentAtStartOfConstructor2.js @@ -17,7 +17,9 @@ var TestFile = (function () { /// Test summary /// var _this = this; - var getMessage = function () { return message + _this.name; }; + var getMessage = function () { + return message + _this.name; + }; this.message = getMessage(); } return TestFile; diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.js b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.js index 3bbea65541f..a37fdefe816 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.js +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody1.js @@ -17,7 +17,9 @@ var TestFile = (function () { /// Test summary /// /// - return function () { return message + _this.name; }; + return function () { + return message + _this.name; + }; }; return TestFile; })(); diff --git a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.js b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.js index 2a0ac0a4f0a..e96bfa93471 100644 --- a/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.js +++ b/tests/baselines/reference/detachedCommentAtStartOfFunctionBody2.js @@ -18,7 +18,9 @@ var TestFile = (function () { /// /// var _this = this; - return function () { return message + _this.name; }; + return function () { + return message + _this.name; + }; }; return TestFile; })(); diff --git a/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js b/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js index b259f321f14..b424436b99a 100644 --- a/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js +++ b/tests/baselines/reference/doNotWidenAtObjectLiteralPropertyAssignment.js @@ -12,4 +12,11 @@ var test: IIntervalTreeNode[] = [{ interval: { begin: 0 }, children: null }]; // //// [doNotWidenAtObjectLiteralPropertyAssignment.js] -var test = [{ interval: { begin: 0 }, children: null }]; // was error here because best common type is {} +var test = [ + { + interval: { + begin: 0 + }, + children: null + } +]; // was error here because best common type is {} diff --git a/tests/baselines/reference/doWhileBreakStatements.js b/tests/baselines/reference/doWhileBreakStatements.js index a2bc0d3c549..9162c629898 100644 --- a/tests/baselines/reference/doWhileBreakStatements.js +++ b/tests/baselines/reference/doWhileBreakStatements.js @@ -66,6 +66,7 @@ SEVEN: do while (true); while (true); EIGHT: do { - var fn = function () { }; + var fn = function () { + }; break EIGHT; } while (true); diff --git a/tests/baselines/reference/doWhileContinueStatements.js b/tests/baselines/reference/doWhileContinueStatements.js index 7f73157fd99..a39495e162e 100644 --- a/tests/baselines/reference/doWhileContinueStatements.js +++ b/tests/baselines/reference/doWhileContinueStatements.js @@ -66,6 +66,7 @@ SEVEN: do while (true); while (true); EIGHT: do { - var fn = function () { }; + var fn = function () { + }; continue EIGHT; } while (true); diff --git a/tests/baselines/reference/doWhileLoop.js b/tests/baselines/reference/doWhileLoop.js index 6581bba09e1..0c1abd7aed9 100644 --- a/tests/baselines/reference/doWhileLoop.js +++ b/tests/baselines/reference/doWhileLoop.js @@ -3,5 +3,6 @@ do { } while (false); var n; //// [doWhileLoop.js] -do { } while (false); +do { +} while (false); var n; diff --git a/tests/baselines/reference/dottedSymbolResolution1.js b/tests/baselines/reference/dottedSymbolResolution1.js index a0ac7a38b88..d5bdb6006d5 100644 --- a/tests/baselines/reference/dottedSymbolResolution1.js +++ b/tests/baselines/reference/dottedSymbolResolution1.js @@ -29,7 +29,8 @@ function _setBarAndText(): void { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); function each(collection, callback) { diff --git a/tests/baselines/reference/downlevelLetConst12.js b/tests/baselines/reference/downlevelLetConst12.js index 6437d17accb..9dc69826256 100644 --- a/tests/baselines/reference/downlevelLetConst12.js +++ b/tests/baselines/reference/downlevelLetConst12.js @@ -17,6 +17,10 @@ const {a: baz4} = { a: 1 }; var foo; var bar = 1; var baz = ([])[0]; -var baz2 = ({ a: 1 }).a; +var baz2 = ({ + a: 1 +}).a; var baz3 = ([])[0]; -var baz4 = ({ a: 1 }).a; +var baz4 = ({ + a: 1 +}).a; diff --git a/tests/baselines/reference/downlevelLetConst13.js b/tests/baselines/reference/downlevelLetConst13.js index 8324d697e95..95e89d5245c 100644 --- a/tests/baselines/reference/downlevelLetConst13.js +++ b/tests/baselines/reference/downlevelLetConst13.js @@ -24,16 +24,32 @@ export module M { // exported let\const bindings should not be renamed exports.foo = 10; exports.bar = "123"; -exports.bar1 = ([1])[0]; -exports.bar2 = ([2])[0]; -exports.bar3 = ({ a: 1 }).a; -exports.bar4 = ({ a: 1 }).a; +exports.bar1 = ([ + 1 +])[0]; +exports.bar2 = ([ + 2 +])[0]; +exports.bar3 = ({ + a: 1 +}).a; +exports.bar4 = ({ + a: 1 +}).a; var M; (function (M) { M.baz = 100; M.baz2 = true; - M.bar5 = ([1])[0]; - M.bar6 = ([2])[0]; - M.bar7 = ({ a: 1 }).a; - M.bar8 = ({ a: 1 }).a; + M.bar5 = ([ + 1 + ])[0]; + M.bar6 = ([ + 2 + ])[0]; + M.bar7 = ({ + a: 1 + }).a; + M.bar8 = ({ + a: 1 + }).a; })(M = exports.M || (exports.M = {})); diff --git a/tests/baselines/reference/downlevelLetConst14.js b/tests/baselines/reference/downlevelLetConst14.js index 212262dc43a..ffe667eda3f 100644 --- a/tests/baselines/reference/downlevelLetConst14.js +++ b/tests/baselines/reference/downlevelLetConst14.js @@ -61,13 +61,21 @@ var z0, z1, z2, z3; { var _x = 20; use(_x); - var _z0 = ([1])[0]; + var _z0 = ([ + 1 + ])[0]; use(_z0); - var _z1 = ([1])[0]; + var _z1 = ([ + 1 + ])[0]; use(_z1); - var _z2 = ({ a: 1 }).a; + var _z2 = ({ + a: 1 + }).a; use(_z2); - var _z3 = ({ a: 1 }).a; + var _z3 = ({ + a: 1 + }).a; use(_z3); } use(x); @@ -79,10 +87,14 @@ var z6; var y = true; { var _y = ""; - var _z6 = ([true])[0]; + var _z6 = ([ + true + ])[0]; { var _y_1 = 1; - var _z6_1 = ({ a: 1 }).a; + var _z6_1 = ({ + a: 1 + }).a; use(_y_1); use(_z6_1); } @@ -95,10 +107,14 @@ var z = false; var z5 = 1; { var _z = ""; - var _z5 = ([5])[0]; + var _z5 = ([ + 5 + ])[0]; { var _z_1 = 1; - var _z5_1 = ({ a: 1 }).a; + var _z5_1 = ({ + a: 1 + }).a; // try to step on generated name use(_z_1); } diff --git a/tests/baselines/reference/downlevelLetConst15.js b/tests/baselines/reference/downlevelLetConst15.js index c9b67719197..94fcb1b03a0 100644 --- a/tests/baselines/reference/downlevelLetConst15.js +++ b/tests/baselines/reference/downlevelLetConst15.js @@ -61,13 +61,25 @@ var z0, z1, z2, z3; { var _x = 20; use(_x); - var _z0 = ([1])[0]; + var _z0 = ([ + 1 + ])[0]; use(_z0); - var _z1 = ([{ a: 1 }])[0].a; + var _z1 = ([ + { + a: 1 + } + ])[0].a; use(_z1); - var _z2 = ({ a: 1 }).a; + var _z2 = ({ + a: 1 + }).a; use(_z2); - var _z3 = ({ a: { b: 1 } }).a.b; + var _z3 = ({ + a: { + b: 1 + } + }).a.b; use(_z3); } use(x); @@ -79,10 +91,14 @@ var z6; var y = true; { var _y = ""; - var _z6 = ([true])[0]; + var _z6 = ([ + true + ])[0]; { var _y_1 = 1; - var _z6_1 = ({ a: 1 }).a; + var _z6_1 = ({ + a: 1 + }).a; use(_y_1); use(_z6_1); } @@ -95,10 +111,14 @@ var z = false; var z5 = 1; { var _z = ""; - var _z5 = ([5])[0]; + var _z5 = ([ + 5 + ])[0]; { var _z_1 = 1; - var _z5_1 = ({ a: 1 }).a; + var _z5_1 = ({ + a: 1 + }).a; // try to step on generated name use(_z_1); } diff --git a/tests/baselines/reference/downlevelLetConst16.js b/tests/baselines/reference/downlevelLetConst16.js index 36da8ac36fe..2f25ee4e897 100644 --- a/tests/baselines/reference/downlevelLetConst16.js +++ b/tests/baselines/reference/downlevelLetConst16.js @@ -239,18 +239,26 @@ use(z); function foo1() { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } function foo2() { { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -261,18 +269,26 @@ var A = (function () { A.prototype.m1 = function () { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); }; A.prototype.m2 = function () { { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -285,18 +301,26 @@ var B = (function () { B.prototype.m1 = function () { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); }; B.prototype.m2 = function () { { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -306,18 +330,26 @@ var B = (function () { function bar1() { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } function bar2() { { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -326,9 +358,13 @@ var M1; (function (M1) { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); })(M1 || (M1 = {})); var M2; @@ -336,9 +372,13 @@ var M2; { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -347,9 +387,13 @@ var M3; (function (M3) { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); })(M3 || (M3 = {})); var M4; @@ -357,9 +401,13 @@ var M4; { var _x = 1; use(_x); - var _y = ([1])[0]; + var _y = ([ + 1 + ])[0]; use(_y); - var _z = ({ a: 1 }).a; + var _z = ({ + a: 1 + }).a; use(_z); } use(x); @@ -373,7 +421,9 @@ function foo3() { for (var _y = ([])[0];;) { use(_y); } - for (var _z = ({ a: 1 }).a;;) { + for (var _z = ({ + a: 1 + }).a;;) { use(_z); } use(x); @@ -385,7 +435,9 @@ function foo4() { for (var _y = ([])[0];;) { use(_y); } - for (var _z = ({ a: 1 }).a;;) { + for (var _z = ({ + a: 1 + }).a;;) { use(_z); } use(x); diff --git a/tests/baselines/reference/downlevelLetConst18.js b/tests/baselines/reference/downlevelLetConst18.js index e9993a90bce..0c025573e20 100644 --- a/tests/baselines/reference/downlevelLetConst18.js +++ b/tests/baselines/reference/downlevelLetConst18.js @@ -33,25 +33,45 @@ for (let x; ;) { //// [downlevelLetConst18.js] 'use strict'; for (var x = void 0;;) { - function foo() { x; } + function foo() { + x; + } ; } for (var _x = void 0;;) { - function foo() { _x; } + function foo() { + _x; + } ; } for (var _x_1 = void 0;;) { - (function () { _x_1; })(); + (function () { + _x_1; + })(); } for (var _x_2 = 1;;) { - (function () { _x_2; })(); + (function () { + _x_2; + })(); } for (var _x_3 = void 0;;) { - ({ foo: function () { _x_3; } }); + ({ + foo: function () { + _x_3; + } + }); } for (var _x_4 = void 0;;) { - ({ get foo() { return _x_4; } }); + ({ + get foo() { + return _x_4; + } + }); } for (var _x_5 = void 0;;) { - ({ set foo(v) { _x_5; } }); + ({ + set foo(v) { + _x_5; + } + }); } diff --git a/tests/baselines/reference/duplicateIdentifierInCatchBlock.js b/tests/baselines/reference/duplicateIdentifierInCatchBlock.js index e440c06073a..6d43b888f48 100644 --- a/tests/baselines/reference/duplicateIdentifierInCatchBlock.js +++ b/tests/baselines/reference/duplicateIdentifierInCatchBlock.js @@ -19,20 +19,27 @@ try { } catch (e) { //// [duplicateIdentifierInCatchBlock.js] var v; -try { } -catch (e) { - function v() { } +try { +} +catch (e) { + function v() { + } +} +function w() { +} +try { } -function w() { } -try { } catch (e) { var w; } -try { } +try { +} catch (e) { var x; - function x() { } // error - function e() { } // error + function x() { + } // error + function e() { + } // error var p; var p; // error } diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js index 6a567018d1f..018d148f9c3 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js @@ -64,7 +64,8 @@ var M; })(M || (M = {})); var M; (function (M) { - function f() { } + function f() { + } M.f = f; })(M || (M = {})); var M; @@ -78,7 +79,8 @@ var M; })(M || (M = {})); var M; (function (M) { - function g() { } + function g() { + } })(M || (M = {})); var M; (function (M) { @@ -100,7 +102,8 @@ var M; })(M || (M = {})); var M; (function (M) { - function C() { } // no error + function C() { + } // no error })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/duplicateLocalVariable1.js b/tests/baselines/reference/duplicateLocalVariable1.js index 62e291f28c0..d9ba04ae39a 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.js +++ b/tests/baselines/reference/duplicateLocalVariable1.js @@ -361,7 +361,9 @@ var TestRunner = (function () { this.tests = []; } TestRunner.arrayCompare = function (arg1, arg2) { - return (arg1.every(function (val, index) { return val === arg2[index]; })); + return (arg1.every(function (val, index) { + return val === arg2[index]; + })); }; TestRunner.prototype.addTest = function (test) { this.tests.push(test); @@ -408,11 +410,39 @@ exports.TestRunner = TestRunner; exports.tests = (function () { var testRunner = new TestRunner(); // First 3 are for simple harness validation - testRunner.addTest(new TestCase("Basic test", function () { return true; })); - testRunner.addTest(new TestCase("Test for any error", function () { throw new Error(); return false; }, "")); - testRunner.addTest(new TestCase("Test RegEx error message match", function () { throw new Error("Should also pass"); return false; }, "Should [also]+ pass")); - testRunner.addTest(new TestCase("Test array compare true", function () { return TestRunner.arrayCompare([1, 2, 3], [1, 2, 3]); })); - testRunner.addTest(new TestCase("Test array compare false", function () { return !TestRunner.arrayCompare([3, 2, 3], [1, 2, 3]); })); + testRunner.addTest(new TestCase("Basic test", function () { + return true; + })); + testRunner.addTest(new TestCase("Test for any error", function () { + throw new Error(); + return false; + }, "")); + testRunner.addTest(new TestCase("Test RegEx error message match", function () { + throw new Error("Should also pass"); + return false; + }, "Should [also]+ pass")); + testRunner.addTest(new TestCase("Test array compare true", function () { + return TestRunner.arrayCompare([ + 1, + 2, + 3 + ], [ + 1, + 2, + 3 + ]); + })); + testRunner.addTest(new TestCase("Test array compare false", function () { + return !TestRunner.arrayCompare([ + 3, + 2, + 3 + ], [ + 1, + 2, + 3 + ]); + })); // File detection tests testRunner.addTest(new TestCase("Check file exists", function () { return FileManager.DirectoryManager.fileExists(TestFileDir + "\\Test.txt"); @@ -422,38 +452,28 @@ exports.tests = (function () { })); // File pattern matching tests testRunner.addTest(new TestCase("Check text file match", function () { - return (FileManager.FileBuffer.isTextFile("C:\\somedir\\readme.txt") && - FileManager.FileBuffer.isTextFile("C:\\spaces path\\myapp.str") && - FileManager.FileBuffer.isTextFile("C:\\somedir\\code.js")); + return (FileManager.FileBuffer.isTextFile("C:\\somedir\\readme.txt") && FileManager.FileBuffer.isTextFile("C:\\spaces path\\myapp.str") && FileManager.FileBuffer.isTextFile("C:\\somedir\\code.js")); })); testRunner.addTest(new TestCase("Check makefile match", function () { return FileManager.FileBuffer.isTextFile("C:\\some dir\\makefile"); })); testRunner.addTest(new TestCase("Check binary file doesn't match", function () { - return (!FileManager.FileBuffer.isTextFile("C:\\somedir\\app.exe") && - !FileManager.FileBuffer.isTextFile("C:\\somedir\\my lib.dll")); + return (!FileManager.FileBuffer.isTextFile("C:\\somedir\\app.exe") && !FileManager.FileBuffer.isTextFile("C:\\somedir\\my lib.dll")); })); // Command-line parameter tests testRunner.addTest(new TestCase("Check App defaults", function () { var app = new App.App([]); - return (app.fixLines === false && - app.recurse === true && - app.lineEndings === "CRLF" && - app.matchPattern === undefined && - app.rootDirectory === ".\\" && - app.encodings[0] === "ascii" && - app.encodings[1] === "utf8nobom"); + return (app.fixLines === false && app.recurse === true && app.lineEndings === "CRLF" && app.matchPattern === undefined && app.rootDirectory === ".\\" && app.encodings[0] === "ascii" && app.encodings[1] === "utf8nobom"); })); testRunner.addTest(new TestCase("Check App params", function () { - var app = new App.App(["-dir=C:\\test dir", "-lineEndings=LF", "-encodings=utf16be,ascii", "-recurse=false", "-fixlines"]); - return (app.fixLines === true && - app.lineEndings === "LF" && - app.recurse === false && - app.matchPattern === undefined && - app.rootDirectory === "C:\\test dir" && - app.encodings[0] === "utf16be" && - app.encodings[1] === "ascii" && - app.encodings.length === 2); + var app = new App.App([ + "-dir=C:\\test dir", + "-lineEndings=LF", + "-encodings=utf16be,ascii", + "-recurse=false", + "-fixlines" + ]); + return (app.fixLines === true && app.lineEndings === "LF" && app.recurse === false && app.matchPattern === undefined && app.rootDirectory === "C:\\test dir" && app.encodings[0] === "utf16be" && app.encodings[1] === "ascii" && app.encodings.length === 2); })); // File BOM detection tests testRunner.addTest(new TestCase("Check encoding detection no BOM", function () { @@ -487,7 +507,19 @@ exports.tests = (function () { for (var i = 0; i < 11; i++) { chars.push(fb.readByte()); } - return TestRunner.arrayCompare(chars, [0x54, 0xC3, 0xA8, 0xE1, 0xB4, 0xA3, 0xE2, 0x80, 0xA0, 0x0D, 0x0A]); + return TestRunner.arrayCompare(chars, [ + 0x54, + 0xC3, + 0xA8, + 0xE1, + 0xB4, + 0xA3, + 0xE2, + 0x80, + 0xA0, + 0x0D, + 0x0A + ]); })); testRunner.addTest(new TestCase("Check UTF8 decoding", function () { var fb = new FileManager.FileBuffer(TestFileDir + "\\UTF8BOM.txt"); @@ -495,12 +527,26 @@ exports.tests = (function () { for (var i = 0; i < 6; i++) { chars.push(fb.readUtf8CodePoint()); } - return TestRunner.arrayCompare(chars, [0x0054, 0x00E8, 0x1D23, 0x2020, 0x000D, 0x000A]); + return TestRunner.arrayCompare(chars, [ + 0x0054, + 0x00E8, + 0x1D23, + 0x2020, + 0x000D, + 0x000A + ]); })); testRunner.addTest(new TestCase("Check UTF8 encoding", function () { var fb = new FileManager.FileBuffer(20); fb.writeUtf8Bom(); - var chars = [0x0054, 0x00E8, 0x1D23, 0x2020, 0x000D, 0x000A]; + var chars = [ + 0x0054, + 0x00E8, + 0x1D23, + 0x2020, + 0x000D, + 0x000A + ]; for (var i in chars) { fb.writeUtf8CodePoint(chars[i]); } @@ -509,7 +555,22 @@ exports.tests = (function () { for (var i = 0; i < 14; i++) { bytes.push(fb.readByte()); } - var expected = [0xEF, 0xBB, 0xBF, 0x54, 0xC3, 0xA8, 0xE1, 0xB4, 0xA3, 0xE2, 0x80, 0xA0, 0x0D, 0x0A]; + var expected = [ + 0xEF, + 0xBB, + 0xBF, + 0x54, + 0xC3, + 0xA8, + 0xE1, + 0xB4, + 0xA3, + 0xE2, + 0x80, + 0xA0, + 0x0D, + 0x0A + ]; return TestRunner.arrayCompare(bytes, expected); })); // Test reading and writing files @@ -517,14 +578,38 @@ exports.tests = (function () { var filename = TestFileDir + "\\tmpUTF16LE.txt"; var fb = new FileManager.FileBuffer(14); fb.writeUtf16leBom(); - var chars = [0x0054, 0x00E8, 0x1D23, 0x2020, 0x000D, 0x000A]; - chars.forEach(function (val) { fb.writeUtf16CodePoint(val, false); }); + var chars = [ + 0x0054, + 0x00E8, + 0x1D23, + 0x2020, + 0x000D, + 0x000A + ]; + chars.forEach(function (val) { + fb.writeUtf16CodePoint(val, false); + }); fb.save(filename); var savedFile = new FileManager.FileBuffer(filename); if (savedFile.encoding !== 'utf16le') { throw Error("Incorrect encoding"); } - var expectedBytes = [0xFF, 0xFE, 0x54, 0x00, 0xE8, 0x00, 0x23, 0x1D, 0x20, 0x20, 0x0D, 0x00, 0x0A, 0x00]; + var expectedBytes = [ + 0xFF, + 0xFE, + 0x54, + 0x00, + 0xE8, + 0x00, + 0x23, + 0x1D, + 0x20, + 0x20, + 0x0D, + 0x00, + 0x0A, + 0x00 + ]; savedFile.index = 0; expectedBytes.forEach(function (val) { var byteVal = savedFile.readByte(); @@ -554,7 +639,14 @@ exports.tests = (function () { for (var i = 0; i < 6; i++) { codePoints.push(savedFile.readUtf16CodePoint(false)); } - var expectedCodePoints = [0x10480, 0x10481, 0x10482, 0x54, 0x68, 0x69]; + var expectedCodePoints = [ + 0x10480, + 0x10481, + 0x10482, + 0x54, + 0x68, + 0x69 + ]; return TestRunner.arrayCompare(codePoints, expectedCodePoints); })); testRunner.addTest(new TestCase("Read non-BMP utf8 chars", function () { @@ -566,20 +658,52 @@ exports.tests = (function () { for (var i = 0; i < 6; i++) { codePoints.push(savedFile.readUtf8CodePoint()); } - var expectedCodePoints = [0x10480, 0x10481, 0x10482, 0x54, 0x68, 0x69]; + var expectedCodePoints = [ + 0x10480, + 0x10481, + 0x10482, + 0x54, + 0x68, + 0x69 + ]; return TestRunner.arrayCompare(codePoints, expectedCodePoints); })); testRunner.addTest(new TestCase("Write non-BMP utf8 chars", function () { var filename = TestFileDir + "\\tmpUTF8nonBmp.txt"; var fb = new FileManager.FileBuffer(15); - var chars = [0x10480, 0x10481, 0x10482, 0x54, 0x68, 0x69]; - chars.forEach(function (val) { fb.writeUtf8CodePoint(val); }); + var chars = [ + 0x10480, + 0x10481, + 0x10482, + 0x54, + 0x68, + 0x69 + ]; + chars.forEach(function (val) { + fb.writeUtf8CodePoint(val); + }); fb.save(filename); var savedFile = new FileManager.FileBuffer(filename); if (savedFile.encoding !== 'utf8') { throw Error("Incorrect encoding"); } - var expectedBytes = [0xF0, 0x90, 0x92, 0x80, 0xF0, 0x90, 0x92, 0x81, 0xF0, 0x90, 0x92, 0x82, 0x54, 0x68, 0x69]; + var expectedBytes = [ + 0xF0, + 0x90, + 0x92, + 0x80, + 0xF0, + 0x90, + 0x92, + 0x81, + 0xF0, + 0x90, + 0x92, + 0x82, + 0x54, + 0x68, + 0x69 + ]; expectedBytes.forEach(function (val) { var byteVal = savedFile.readByte(); if (byteVal !== val) { diff --git a/tests/baselines/reference/duplicateLocalVariable2.js b/tests/baselines/reference/duplicateLocalVariable2.js index a8370f31709..fdb6f5463cd 100644 --- a/tests/baselines/reference/duplicateLocalVariable2.js +++ b/tests/baselines/reference/duplicateLocalVariable2.js @@ -62,7 +62,9 @@ define(["require", "exports"], function (require, exports) { testRunner.addTest(new TestCase("Check UTF8 encoding", function () { var fb; fb.writeUtf8Bom(); - var chars = [0x0054]; + var chars = [ + 0x0054 + ]; for (var i in chars) { fb.writeUtf8CodePoint(chars[i]); } @@ -71,7 +73,9 @@ define(["require", "exports"], function (require, exports) { for (var i = 0; i < 14; i++) { bytes.push(fb.readByte()); } - var expected = [0xEF]; + var expected = [ + 0xEF + ]; return TestRunner.arrayCompare(bytes, expected); })); return testRunner; diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty.js b/tests/baselines/reference/duplicateObjectLiteralProperty.js index 9c629b211cf..5bbeb433a0c 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty.js +++ b/tests/baselines/reference/duplicateObjectLiteralProperty.js @@ -30,7 +30,12 @@ var x = { } }; var y = { - get a() { return 0; }, - set a(v) { }, - get a() { return 0; } + get a() { + return 0; + }, + set a(v) { + }, + get a() { + return 0; + } }; diff --git a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.js b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.js index 5f55a8b1d22..ceaeac0d025 100644 --- a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.js +++ b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.js @@ -10,4 +10,6 @@ var r5 = a.reduce((x, y) => x + y); //// [duplicateOverloadInTypeAugmentation1.js] var a; -var r5 = a.reduce(function (x, y) { return x + y; }); +var r5 = a.reduce(function (x, y) { + return x + y; +}); diff --git a/tests/baselines/reference/duplicatePropertyNames.js b/tests/baselines/reference/duplicatePropertyNames.js index c3cde82e2cc..c5da2a1f39f 100644 --- a/tests/baselines/reference/duplicatePropertyNames.js +++ b/tests/baselines/reference/duplicatePropertyNames.js @@ -52,17 +52,23 @@ var b = { // duplicate property names are an error in all types var C = (function () { function C() { - this.baz = function () { }; - this.baz = function () { }; + this.baz = function () { + }; + this.baz = function () { + }; } - C.prototype.bar = function (x) { }; - C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { + }; + C.prototype.bar = function (x) { + }; return C; })(); var a; var b = { foo: '', foo: '', - bar: function () { }, - bar: function () { } + bar: function () { + }, + bar: function () { + } }; diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.js b/tests/baselines/reference/duplicateSymbolsExportMatching.js index 89b5a210ec4..e34ed7c8d02 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.js +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.js @@ -93,7 +93,8 @@ define(["require", "exports"], function (require, exports) { (function (F) { var t; })(F || (F = {})); - function F() { } + function F() { + } M.F = F; // Only one error for duplicate identifier (don't consider visibility) })(M || (M = {})); var M; diff --git a/tests/baselines/reference/duplicateTypeParameters1.js b/tests/baselines/reference/duplicateTypeParameters1.js index 990048a25d7..167688719ab 100644 --- a/tests/baselines/reference/duplicateTypeParameters1.js +++ b/tests/baselines/reference/duplicateTypeParameters1.js @@ -3,4 +3,5 @@ function A() { } //// [duplicateTypeParameters1.js] -function A() { } +function A() { +} diff --git a/tests/baselines/reference/duplicateTypeParameters2.js b/tests/baselines/reference/duplicateTypeParameters2.js index 65dce28ad3f..c89f0d15fe3 100644 --- a/tests/baselines/reference/duplicateTypeParameters2.js +++ b/tests/baselines/reference/duplicateTypeParameters2.js @@ -8,12 +8,14 @@ interface I {} var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); diff --git a/tests/baselines/reference/elaboratedErrors.js b/tests/baselines/reference/elaboratedErrors.js index ae5877b2dd6..c245c1a8562 100644 --- a/tests/baselines/reference/elaboratedErrors.js +++ b/tests/baselines/reference/elaboratedErrors.js @@ -27,7 +27,8 @@ y = x; //// [elaboratedErrors.js] -function fn(s) { } +function fn(s) { +} // This should issue a large error, not a small one var WorkerFS = (function () { function WorkerFS() { diff --git a/tests/baselines/reference/emitArrowFunction.js b/tests/baselines/reference/emitArrowFunction.js index 7e2617045a8..074febfa096 100644 --- a/tests/baselines/reference/emitArrowFunction.js +++ b/tests/baselines/reference/emitArrowFunction.js @@ -8,8 +8,10 @@ foo(() => true); foo(() => { return false; }); //// [emitArrowFunction.js] -var f1 = function () { }; -var f2 = function (x, y) { }; +var f1 = function () { +}; +var f2 = function (x, y) { +}; var f3 = function (x, y) { var rest = []; for (var _i = 2; _i < arguments.length; _i++) { @@ -19,6 +21,11 @@ var f3 = function (x, y) { var f4 = function (x, y, z) { if (z === void 0) { z = 10; } }; -function foo(func) { } -foo(function () { return true; }); -foo(function () { return false; }); +function foo(func) { +} +foo(function () { + return true; +}); +foo(function () { + return false; +}); diff --git a/tests/baselines/reference/emitArrowFunctionAsIs.js b/tests/baselines/reference/emitArrowFunctionAsIs.js index c6586ee95a1..11df7903ad8 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIs.js +++ b/tests/baselines/reference/emitArrowFunctionAsIs.js @@ -5,6 +5,9 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIs.js] -var arrow1 = function (a) { }; -var arrow2 = function (a) { }; -var arrow3 = function (a, b) { }; +var arrow1 = function (a) { +}; +var arrow2 = function (a) { +}; +var arrow3 = function (a, b) { +}; diff --git a/tests/baselines/reference/emitArrowFunctionAsIsES6.js b/tests/baselines/reference/emitArrowFunctionAsIsES6.js index 9876abdafcd..9941434ae10 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIsES6.js +++ b/tests/baselines/reference/emitArrowFunctionAsIsES6.js @@ -5,6 +5,9 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIsES6.js] -var arrow1 = a => { }; -var arrow2 = (a) => { }; -var arrow3 = (a, b) => { }; +var arrow1 = a => { +}; +var arrow2 = (a) => { +}; +var arrow3 = (a, b) => { +}; diff --git a/tests/baselines/reference/emitArrowFunctionES6.js b/tests/baselines/reference/emitArrowFunctionES6.js index 603b2737fc5..6409fc9464c 100644 --- a/tests/baselines/reference/emitArrowFunctionES6.js +++ b/tests/baselines/reference/emitArrowFunctionES6.js @@ -9,10 +9,17 @@ foo(() => { return false; }); //// [emitArrowFunctionES6.js] -var f1 = () => { }; -var f2 = (x, y) => { }; -var f3 = (x, y, ...rest) => { }; -var f4 = (x, y, z = 10) => { }; -function foo(func) { } +var f1 = () => { +}; +var f2 = (x, y) => { +}; +var f3 = (x, y, ...rest) => { +}; +var f4 = (x, y, z = 10) => { +}; +function foo(func) { +} foo(() => true); -foo(() => { return false; }); +foo(() => { + return false; +}); diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturing.js b/tests/baselines/reference/emitArrowFunctionThisCapturing.js index ac4326ea508..25d9f7f100b 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturing.js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturing.js @@ -22,7 +22,8 @@ var f1 = function () { var f2 = function (x) { _this.name = x; }; -function foo(func) { } +function foo(func) { +} foo(function () { _this.age = 100; return true; diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js b/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js index 2a82ef9c800..bf235bc0eef 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js @@ -21,7 +21,8 @@ var f1 = () => { var f2 = (x) => { this.name = x; }; -function foo(func) { } +function foo(func) { +} foo(() => { this.age = 100; return true; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js index 589449fad62..00a4c7aa051 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js @@ -45,7 +45,8 @@ function baz() { var arg = arguments[0]; }); } -function foo(inputFunc) { } +function foo(inputFunc) { +} foo(() => { var arg = arguments[0]; // error }); diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js index 2f84d0843de..0deacd409df 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js @@ -45,7 +45,8 @@ function baz() { var arg = arguments[0]; }); } -function foo(inputFunc) { } +function foo(inputFunc) { +} foo(() => { var arg = arguments[0]; // error }); diff --git a/tests/baselines/reference/emitArrowFunctionsAsIs.js b/tests/baselines/reference/emitArrowFunctionsAsIs.js index cf773efb8b7..ee8347dda3e 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIs.js +++ b/tests/baselines/reference/emitArrowFunctionsAsIs.js @@ -5,6 +5,9 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIs.js] -var arrow1 = function (a) { }; -var arrow2 = function (a) { }; -var arrow3 = function (a, b) { }; +var arrow1 = function (a) { +}; +var arrow2 = function (a) { +}; +var arrow3 = function (a, b) { +}; diff --git a/tests/baselines/reference/emitArrowFunctionsAsIsES6.js b/tests/baselines/reference/emitArrowFunctionsAsIsES6.js index 32323a6597b..021e048ed88 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIsES6.js +++ b/tests/baselines/reference/emitArrowFunctionsAsIsES6.js @@ -5,6 +5,9 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIsES6.js] -var arrow1 = a => { }; -var arrow2 = (a) => { }; -var arrow3 = (a, b) => { }; +var arrow1 = a => { +}; +var arrow2 = (a) => { +}; +var arrow3 = (a, b) => { +}; diff --git a/tests/baselines/reference/emitDefaultParametersFunctionES6.js b/tests/baselines/reference/emitDefaultParametersFunctionES6.js index 0d1c9460fed..f4084a16f6f 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionES6.js @@ -5,7 +5,11 @@ function bar(y = 10) { } function bar1(y = 10, ...rest) { } //// [emitDefaultParametersFunctionES6.js] -function foo(x, y = 10) { } -function baz(x, y = 5, ...rest) { } -function bar(y = 10) { } -function bar1(y = 10, ...rest) { } +function foo(x, y = 10) { +} +function baz(x, y = 5, ...rest) { +} +function bar(y = 10) { +} +function bar1(y = 10, ...rest) { +} diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js index f72c245b175..5a49a200c6b 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js @@ -9,10 +9,17 @@ var y = (function (num = 10, boo = false, ...rest) { })() var z = (function (num: number, boo = false, ...rest) { })(10) //// [emitDefaultParametersFunctionExpressionES6.js] -var lambda1 = (y = "hello") => { }; -var lambda2 = (x, y = "hello") => { }; -var lambda3 = (x, y = "hello", ...rest) => { }; -var lambda4 = (y = "hello", ...rest) => { }; -var x = function (str = "hello", ...rest) { }; -var y = (function (num = 10, boo = false, ...rest) { })(); -var z = (function (num, boo = false, ...rest) { })(10); +var lambda1 = (y = "hello") => { +}; +var lambda2 = (x, y = "hello") => { +}; +var lambda3 = (x, y = "hello", ...rest) => { +}; +var lambda4 = (y = "hello", ...rest) => { +}; +var x = function (str = "hello", ...rest) { +}; +var y = (function (num = 10, boo = false, ...rest) { +})(); +var z = (function (num, boo = false, ...rest) { +})(10); diff --git a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js index 4a85f4a34b0..fce694a453a 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js @@ -8,8 +8,12 @@ var obj2 = { //// [emitDefaultParametersFunctionPropertyES6.js] var obj2 = { - func1(y = 10, ...rest) { }, - func2(x = "hello") { }, - func3(x, z, y = "hello") { }, - func4(x, z, y = "hello", ...rest) { }, + func1(y = 10, ...rest) { + }, + func2(x = "hello") { + }, + func3(x, z, y = "hello") { + }, + func4(x, z, y = "hello", ...rest) { + }, }; diff --git a/tests/baselines/reference/emitDefaultParametersMethodES6.js b/tests/baselines/reference/emitDefaultParametersMethodES6.js index 8489b5708f1..bf96e00e375 100644 --- a/tests/baselines/reference/emitDefaultParametersMethodES6.js +++ b/tests/baselines/reference/emitDefaultParametersMethodES6.js @@ -20,10 +20,14 @@ class E { var C = (function () { function C(t, z, x, y = "hello") { } - C.prototype.foo = function (x, t = false) { }; - C.prototype.foo1 = function (x, t = false, ...rest) { }; - C.prototype.bar = function (t = false) { }; - C.prototype.boo = function (t = false, ...rest) { }; + C.prototype.foo = function (x, t = false) { + }; + C.prototype.foo1 = function (x, t = false, ...rest) { + }; + C.prototype.bar = function (t = false) { + }; + C.prototype.boo = function (t = false, ...rest) { + }; return C; })(); var D = (function () { diff --git a/tests/baselines/reference/emitRestParametersFunctionES6.js b/tests/baselines/reference/emitRestParametersFunctionES6.js index a07b3a13174..242c40f252d 100644 --- a/tests/baselines/reference/emitRestParametersFunctionES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionES6.js @@ -3,5 +3,7 @@ function bar(...rest) { } function foo(x: number, y: string, ...rest) { } //// [emitRestParametersFunctionES6.js] -function bar(...rest) { } -function foo(x, y, ...rest) { } +function bar(...rest) { +} +function foo(x, y, ...rest) { +} diff --git a/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js b/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js index aa52a29b138..c7851db5e78 100644 --- a/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js @@ -5,7 +5,11 @@ var funcExp2 = function (...rest) { } var funcExp3 = (function (...rest) { })() //// [emitRestParametersFunctionExpressionES6.js] -var funcExp = (...rest) => { }; -var funcExp1 = (X, ...rest) => { }; -var funcExp2 = function (...rest) { }; -var funcExp3 = (function (...rest) { })(); +var funcExp = (...rest) => { +}; +var funcExp1 = (X, ...rest) => { +}; +var funcExp2 = function (...rest) { +}; +var funcExp3 = (function (...rest) { +})(); diff --git a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js index 122a1f6ed52..87aa489ecf3 100644 --- a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js @@ -10,5 +10,6 @@ var obj2 = { //// [emitRestParametersFunctionPropertyES6.js] var obj; var obj2 = { - func(...rest) { } + func(...rest) { + } }; diff --git a/tests/baselines/reference/emitRestParametersMethodES6.js b/tests/baselines/reference/emitRestParametersMethodES6.js index ff8e040be9c..d0a0e2a120c 100644 --- a/tests/baselines/reference/emitRestParametersMethodES6.js +++ b/tests/baselines/reference/emitRestParametersMethodES6.js @@ -18,14 +18,18 @@ class D { var C = (function () { function C(name, ...rest) { } - C.prototype.bar = function (...rest) { }; - C.prototype.foo = function (x, ...rest) { }; + C.prototype.bar = function (...rest) { + }; + C.prototype.foo = function (x, ...rest) { + }; return C; })(); var D = (function () { function D(...rest) { } - D.prototype.bar = function (...rest) { }; - D.prototype.foo = function (x, ...rest) { }; + D.prototype.bar = function (...rest) { + }; + D.prototype.foo = function (x, ...rest) { + }; return D; })(); diff --git a/tests/baselines/reference/emptyExpr.js b/tests/baselines/reference/emptyExpr.js index de3bddeba1e..4bda58e3244 100644 --- a/tests/baselines/reference/emptyExpr.js +++ b/tests/baselines/reference/emptyExpr.js @@ -2,4 +2,6 @@ [{},] //// [emptyExpr.js] -[{},]; +[ + {}, +]; diff --git a/tests/baselines/reference/emptyTypeArgumentList.js b/tests/baselines/reference/emptyTypeArgumentList.js index 30093113be4..91fce396289 100644 --- a/tests/baselines/reference/emptyTypeArgumentList.js +++ b/tests/baselines/reference/emptyTypeArgumentList.js @@ -3,5 +3,6 @@ function foo() { } foo<>(); //// [emptyTypeArgumentList.js] -function foo() { } +function foo() { +} foo(); diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.js b/tests/baselines/reference/enumAssignabilityInInheritance.js index a26bd0670f8..bec59a3d0de 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.js +++ b/tests/baselines/reference/enumAssignabilityInInheritance.js @@ -144,7 +144,8 @@ var E2; E2[E2["A"] = 0] = "A"; })(E2 || (E2 = {})); var r4 = foo13(0 /* A */); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/enumBasics.js b/tests/baselines/reference/enumBasics.js index eca92215fb6..6f1a039ca6e 100644 --- a/tests/baselines/reference/enumBasics.js +++ b/tests/baselines/reference/enumBasics.js @@ -150,9 +150,21 @@ var E9; // (refer to .js to validate) // Enum constant members are propagated var doNotPropagate = [ - E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z + E8.B, + E7.A, + E4.Z, + E3.X, + E3.Y, + E3.Z ]; // Enum computed members are not propagated var doPropagate = [ - 0 /* A */, E9.B, 0 /* B */, 1 /* C */, 0 /* A */, 0 /* A */, 3 /* B */, 4 /* C */ + 0 /* A */, + E9.B, + 0 /* B */, + 1 /* C */, + 0 /* A */, + 0 /* A */, + 3 /* B */, + 4 /* C */ ]; diff --git a/tests/baselines/reference/enumConflictsWithGlobalIdentifier.js b/tests/baselines/reference/enumConflictsWithGlobalIdentifier.js index a0a6afb172f..67d9a020bb6 100644 --- a/tests/baselines/reference/enumConflictsWithGlobalIdentifier.js +++ b/tests/baselines/reference/enumConflictsWithGlobalIdentifier.js @@ -11,6 +11,5 @@ var Position; (function (Position) { Position[Position["IgnoreRulesSpecific"] = 0] = "IgnoreRulesSpecific"; })(Position || (Position = {})); -var x = IgnoreRulesSpecific. -; +var x = IgnoreRulesSpecific.; var y = 0 /* IgnoreRulesSpecific */; diff --git a/tests/baselines/reference/enumIndexer.js b/tests/baselines/reference/enumIndexer.js index f9f71a3ff98..77c2708dab3 100644 --- a/tests/baselines/reference/enumIndexer.js +++ b/tests/baselines/reference/enumIndexer.js @@ -13,6 +13,15 @@ var MyEnumType; MyEnumType[MyEnumType["foo"] = 0] = "foo"; MyEnumType[MyEnumType["bar"] = 1] = "bar"; })(MyEnumType || (MyEnumType = {})); -var _arr = [{ key: 'foo' }, { key: 'bar' }]; +var _arr = [ + { + key: 'foo' + }, + { + key: 'bar' + } +]; var enumValue = 0 /* foo */; -var x = _arr.map(function (o) { return MyEnumType[o.key] === enumValue; }); // these are not same type +var x = _arr.map(function (o) { + return MyEnumType[o.key] === enumValue; +}); // these are not same type diff --git a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js index d932985ad7d..f9ac7661e3d 100644 --- a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js +++ b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js @@ -150,7 +150,8 @@ var E2; (function (E2) { E2[E2["A"] = 0] = "A"; })(E2 || (E2 = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/enumMemberResolution.js b/tests/baselines/reference/enumMemberResolution.js index ebfcac3a59e..e1d79ebeb92 100644 --- a/tests/baselines/reference/enumMemberResolution.js +++ b/tests/baselines/reference/enumMemberResolution.js @@ -12,7 +12,6 @@ var Position2; (function (Position2) { Position2[Position2["IgnoreRulesSpecific"] = 0] = "IgnoreRulesSpecific"; })(Position2 || (Position2 = {})); -var x = IgnoreRulesSpecific. -; // error +var x = IgnoreRulesSpecific.; // error var y = 1; var z = 0 /* IgnoreRulesSpecific */; // no error diff --git a/tests/baselines/reference/enumMerging.js b/tests/baselines/reference/enumMerging.js index b0da96c4b6e..b76f789da1d 100644 --- a/tests/baselines/reference/enumMerging.js +++ b/tests/baselines/reference/enumMerging.js @@ -95,7 +95,14 @@ var M1; EConst1[EConst1["F"] = 8] = "F"; })(M1.EConst1 || (M1.EConst1 = {})); var EConst1 = M1.EConst1; - var x = [3 /* A */, 2 /* B */, 1 /* C */, 7 /* D */, 9 /* E */, 8 /* F */]; + var x = [ + 3 /* A */, + 2 /* B */, + 1 /* C */, + 7 /* D */, + 9 /* E */, + 8 /* F */ + ]; })(M1 || (M1 = {})); // Enum with only computed members across 2 declarations with the same root module var M2; @@ -112,7 +119,14 @@ var M2; EComp2[EComp2["F"] = 'foo'.length] = "F"; })(M2.EComp2 || (M2.EComp2 = {})); var EComp2 = M2.EComp2; - var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; + var x = [ + EComp2.A, + EComp2.B, + EComp2.C, + EComp2.D, + EComp2.E, + EComp2.F + ]; })(M2 || (M2 = {})); // Enum with initializer in only one of two declarations with constant members with the same root module var M3; diff --git a/tests/baselines/reference/errorOnContextuallyTypedReturnType.js b/tests/baselines/reference/errorOnContextuallyTypedReturnType.js index 9e0c26b6be7..2a49ccd2b67 100644 --- a/tests/baselines/reference/errorOnContextuallyTypedReturnType.js +++ b/tests/baselines/reference/errorOnContextuallyTypedReturnType.js @@ -4,5 +4,7 @@ var n2: () => boolean = function ():boolean { }; // expect an error here //// [errorOnContextuallyTypedReturnType.js] -var n1 = function () { }; // expect an error here -var n2 = function () { }; // expect an error here +var n1 = function () { +}; // expect an error here +var n2 = function () { +}; // expect an error here diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 79ba631afed..17cd2c265ed 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -172,10 +172,14 @@ var SomeBase = (function () { this.privateMember = 0; this.publicMember = 0; } - SomeBase.prototype.privateFunc = function () { }; - SomeBase.prototype.publicFunc = function () { }; - SomeBase.privateStaticFunc = function () { }; - SomeBase.publicStaticFunc = function () { }; + SomeBase.prototype.privateFunc = function () { + }; + SomeBase.prototype.publicFunc = function () { + }; + SomeBase.privateStaticFunc = function () { + }; + SomeBase.publicStaticFunc = function () { + }; SomeBase.privateStaticMember = 0; SomeBase.publicStaticMember = 0; return SomeBase; @@ -209,7 +213,9 @@ var SomeDerived1 = (function (_super) { super.publicFunc.call(this); } var x = { - test: function () { return super.publicFunc.call(this); } + test: function () { + return super.publicFunc.call(this); + } }; }; return SomeDerived1; @@ -271,4 +277,7 @@ var SomeDerived3 = (function (_super) { return SomeDerived3; })(SomeBase); // In object literal -var obj = { n: super.wat, p: super.foo.call(this) }; +var obj = { + n: super.wat, + p: super.foo.call(this) +}; diff --git a/tests/baselines/reference/errorSupression1.js b/tests/baselines/reference/errorSupression1.js index 53e40e585f0..059530be452 100644 --- a/tests/baselines/reference/errorSupression1.js +++ b/tests/baselines/reference/errorSupression1.js @@ -12,7 +12,9 @@ baz.concat("y"); var Foo = (function () { function Foo() { } - Foo.bar = function () { return "x"; }; + Foo.bar = function () { + return "x"; + }; return Foo; })(); var baz = Foo.b; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 03bf31a6a6b..6a9f62c5e49 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -88,7 +88,8 @@ var Foo = (function () { var testClass1 = (function () { function testClass1() { } - testClass1.prototype.method = function () { }; + testClass1.prototype.method = function () { + }; return testClass1; })(); var tc1 = new testClass1(); @@ -104,10 +105,15 @@ var tc2 = new testClass2(); // error: could not find symbol V var testClass3 = (function () { function testClass3() { } - testClass3.prototype.testMethod1 = function () { return null; }; // error: could not find symbol V - testClass3.testMethod2 = function () { return null; }; // error: could not find symbol V + testClass3.prototype.testMethod1 = function () { + return null; + }; // error: could not find symbol V + testClass3.testMethod2 = function () { + return null; + }; // error: could not find symbol V Object.defineProperty(testClass3.prototype, "a", { - set: function (value) { } // error: could not find symbol V + set: function (value) { + } // error: could not find symbol V , enumerable: true, configurable: true @@ -115,9 +121,12 @@ var testClass3 = (function () { return testClass3; })(); // in function return type annotation -function testFunction1() { return null; } // error: could not find symbol V +function testFunction1() { + return null; +} // error: could not find symbol V // in paramter types -function testFunction2(p) { } // error: could not find symbol V +function testFunction2(p) { +} // error: could not find symbol V // in var type annotation var f; // error: could not find symbol V // in constraints @@ -129,7 +138,8 @@ var testClass4 = (function () { var testClass6 = (function () { function testClass6() { } - testClass6.prototype.method = function () { }; // error: could not find symbol V + testClass6.prototype.method = function () { + }; // error: could not find symbol V return testClass6; })(); // in extends clause diff --git a/tests/baselines/reference/es6ClassTest.js b/tests/baselines/reference/es6ClassTest.js index 08c184a0df2..5fd9f0e9b7f 100644 --- a/tests/baselines/reference/es6ClassTest.js +++ b/tests/baselines/reference/es6ClassTest.js @@ -112,8 +112,12 @@ var Foo = (function (_super) { this.x = x; this.gar = 5; } - Foo.prototype.bar = function () { return 0; }; - Foo.prototype.boo = function (x) { return x; }; + Foo.prototype.bar = function () { + return 0; + }; + Foo.prototype.boo = function (x) { + return x; + }; Foo.statVal = 0; return Foo; })(Bar); diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index f23be04fd17..8ef7a2fa379 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -248,7 +248,9 @@ var SplatMonster = (function () { }; return SplatMonster; })(); -function foo() { return true; } +function foo() { + return true; +} var PrototypeMonster = (function () { function PrototypeMonster() { this.age = 1; @@ -300,8 +302,10 @@ var Visibility = (function () { this.x = 1; this.y = 2; } - Visibility.prototype.foo = function () { }; - Visibility.prototype.bar = function () { }; + Visibility.prototype.foo = function () { + }; + Visibility.prototype.bar = function () { + }; return Visibility; })(); var BaseClassWithConstructor = (function () { diff --git a/tests/baselines/reference/es6ClassTest3.js b/tests/baselines/reference/es6ClassTest3.js index dc9f1c67154..371a983d152 100644 --- a/tests/baselines/reference/es6ClassTest3.js +++ b/tests/baselines/reference/es6ClassTest3.js @@ -22,8 +22,10 @@ var M; this.x = 1; this.y = 2; } - Visibility.prototype.foo = function () { }; - Visibility.prototype.bar = function () { }; + Visibility.prototype.foo = function () { + }; + Visibility.prototype.bar = function () { + }; return Visibility; })(); })(M || (M = {})); diff --git a/tests/baselines/reference/es6ClassTest8.js b/tests/baselines/reference/es6ClassTest8.js index f96bbd16b0b..3c616e5e893 100644 --- a/tests/baselines/reference/es6ClassTest8.js +++ b/tests/baselines/reference/es6ClassTest8.js @@ -41,7 +41,9 @@ class Camera { //// [es6ClassTest8.js] -function f1(x) { return x; } +function f1(x) { + return x; +} var C = (function () { function C() { var bar = (function () { @@ -57,11 +59,21 @@ var Vector = (function () { this.y = y; this.z = z; } - Vector.norm = function (v) { return null; }; - Vector.minus = function (v1, v2) { return null; }; - Vector.times = function (v1, v2) { return null; }; - Vector.cross = function (v1, v2) { return null; }; - Vector.dot = function (v1, v2) { return null; }; + Vector.norm = function (v) { + return null; + }; + Vector.minus = function (v1, v2) { + return null; + }; + Vector.times = function (v1, v2) { + return null; + }; + Vector.cross = function (v1, v2) { + return null; + }; + Vector.dot = function (v1, v2) { + return null; + }; return Vector; })(); var Camera = (function () { diff --git a/tests/baselines/reference/es6ClassTest9.js b/tests/baselines/reference/es6ClassTest9.js index 538fec5a2ab..d45c99d3b04 100644 --- a/tests/baselines/reference/es6ClassTest9.js +++ b/tests/baselines/reference/es6ClassTest9.js @@ -5,4 +5,5 @@ function foo() {} //// [es6ClassTest9.js] (); -function foo() { } +function foo() { +} diff --git a/tests/baselines/reference/es6MemberScoping.js b/tests/baselines/reference/es6MemberScoping.js index 7e70045ceb3..85f76a93934 100644 --- a/tests/baselines/reference/es6MemberScoping.js +++ b/tests/baselines/reference/es6MemberScoping.js @@ -30,6 +30,8 @@ var Foo = (function () { var Foo2 = (function () { function Foo2() { } - Foo2.Foo2 = function () { return 0; }; // should not be an error + Foo2.Foo2 = function () { + return 0; + }; // should not be an error return Foo2; })(); diff --git a/tests/baselines/reference/escapedIdentifiers.js b/tests/baselines/reference/escapedIdentifiers.js index 7051d8d2433..dd06f3bbc86 100644 --- a/tests/baselines/reference/escapedIdentifiers.js +++ b/tests/baselines/reference/escapedIdentifiers.js @@ -169,13 +169,21 @@ var classType2Object1 = new classType2(); classType2Object1.foo2 = 2; var classType2Object2 = new classType\u0032(); classType2Object2.foo2 = 2; -var interfaceType1Object1 = { bar1: 0 }; +var interfaceType1Object1 = { + bar1: 0 +}; interfaceType1Object1.bar1 = 2; -var interfaceType1Object2 = { bar1: 0 }; +var interfaceType1Object2 = { + bar1: 0 +}; interfaceType1Object2.bar1 = 2; -var interfaceType2Object1 = { bar2: 0 }; +var interfaceType2Object1 = { + bar2: 0 +}; interfaceType2Object1.bar2 = 2; -var interfaceType2Object2 = { bar2: 0 }; +var interfaceType2Object2 = { + bar2: 0 +}; interfaceType2Object2.bar2 = 2; // arguments var testClass = (function () { diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.js b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.js index 707801dc4ee..ee447619bfe 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.js +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.js @@ -59,7 +59,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -68,7 +70,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var aNumber = 9.9; @@ -81,11 +85,17 @@ var aVoid = undefined; var anInterface = new C(); var aClass = new C(); var aGenericClass = new D(); -var anObjectLiteral = { id: 12 }; +var anObjectLiteral = { + id: 12 +}; var anOtherObjectLiteral = new C(); var aFunction = F; var anOtherFunction = F; -var aLambda = function (x) { return 2; }; +var aLambda = function (x) { + return 2; +}; var aModule = M; var aClassInModule = new M.A(); -var aFunctionInModule = function (x) { return 'this is a string'; }; +var aFunctionInModule = function (x) { + return 'this is a string'; +}; diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.js b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.js index 40e45bf7ec0..10f3fd9bf11 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.js +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInvalidInitializer.js @@ -65,8 +65,12 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } -function F2(x) { return x < 42; } +function F(x) { + return 42; +} +function F2(x) { + return x < 42; +} var M; (function (M) { var A = (function () { @@ -75,7 +79,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var N; @@ -86,7 +92,9 @@ var N; return A; })(); N.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } N.F2 = F2; })(N || (N = {})); var aNumber = 'this is a string'; @@ -96,11 +104,15 @@ var aVoid = 9.9; var anInterface = new D(); var aClass = new D(); var aGenericClass = new C(); -var anObjectLiteral = { id: 'a string' }; +var anObjectLiteral = { + id: 'a string' +}; var anOtherObjectLiteral = new C(); var aFunction = F2; var anOtherFunction = F2; -var aLambda = function (x) { return 'a string'; }; +var aLambda = function (x) { + return 'a string'; +}; var aModule = N; var aClassInModule = new N.A(); var aFunctionInModule = F2; diff --git a/tests/baselines/reference/everyTypeWithInitializer.js b/tests/baselines/reference/everyTypeWithInitializer.js index aae0a9fe291..aafefcc5777 100644 --- a/tests/baselines/reference/everyTypeWithInitializer.js +++ b/tests/baselines/reference/everyTypeWithInitializer.js @@ -60,7 +60,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -69,7 +71,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var aNumber = 9.9; @@ -81,9 +85,13 @@ var anOtherAny = new C(); var anUndefined = undefined; var aClass = new C(); var aGenericClass = new D(); -var anObjectLiteral = { id: 12 }; +var anObjectLiteral = { + id: 12 +}; var aFunction = F; -var aLambda = function (x) { return 2; }; +var aLambda = function (x) { + return 2; +}; var aModule = M; var aClassInModule = new M.A(); var aFunctionInModule = M.F2; diff --git a/tests/baselines/reference/exportAlreadySeen.js b/tests/baselines/reference/exportAlreadySeen.js index 68d30a697fd..e18c0bbf7f6 100644 --- a/tests/baselines/reference/exportAlreadySeen.js +++ b/tests/baselines/reference/exportAlreadySeen.js @@ -23,7 +23,8 @@ declare module A { var M; (function (M) { M.x = 1; - function f() { } + function f() { + } M.f = f; var N; (function (N) { diff --git a/tests/baselines/reference/exportAssignTypes.js b/tests/baselines/reference/exportAssignTypes.js index e898f798a7c..d4b74659dcc 100644 --- a/tests/baselines/reference/exportAssignTypes.js +++ b/tests/baselines/reference/exportAssignTypes.js @@ -63,10 +63,16 @@ module.exports = x; var x = true; module.exports = x; //// [expArray.js] -var x = [1, 2]; +var x = [ + 1, + 2 +]; module.exports = x; //// [expObject.js] -var x = { answer: 42, when: 1776 }; +var x = { + answer: 42, + when: 1776 +}; module.exports = x; //// [expAny.js] var x; diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js index b62cc8251be..e9742812469 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js @@ -24,5 +24,8 @@ module.exports = Foo; //// [foo_1.js] var foo = require("./foo_0"); var x = new foo(true); // Should error -var y = new foo({ a: "test", b: 42 }); // Should be OK +var y = new foo({ + a: "test", + b: 42 +}); // Should be OK var z = y.test.b; diff --git a/tests/baselines/reference/exportAssignmentFunction.js b/tests/baselines/reference/exportAssignmentFunction.js index 825d0f983ea..6d4336bd4bd 100644 --- a/tests/baselines/reference/exportAssignmentFunction.js +++ b/tests/baselines/reference/exportAssignmentFunction.js @@ -12,7 +12,9 @@ var n: number = fooFunc(); //// [exportAssignmentFunction_A.js] define(["require", "exports"], function (require, exports) { - function foo() { return 0; } + function foo() { + return 0; + } return foo; }); //// [exportAssignmentFunction_B.js] diff --git a/tests/baselines/reference/exportAssignmentMergedInterface.js b/tests/baselines/reference/exportAssignmentMergedInterface.js index f99d7f3a465..fbcb99bc642 100644 --- a/tests/baselines/reference/exportAssignmentMergedInterface.js +++ b/tests/baselines/reference/exportAssignmentMergedInterface.js @@ -31,7 +31,11 @@ define(["require", "exports"], function (require, exports) { x("test"); x(42); var y = x.b; - if (!!x.c) { } - var z = { x: 1, y: 2 }; + if (!!x.c) { + } + var z = { + x: 1, + y: 2 + }; z = x.d; }); diff --git a/tests/baselines/reference/exportCodeGen.js b/tests/baselines/reference/exportCodeGen.js index 30ed0b07ae9..1b1f934b2f9 100644 --- a/tests/baselines/reference/exportCodeGen.js +++ b/tests/baselines/reference/exportCodeGen.js @@ -94,7 +94,8 @@ var E; Color[Color["Red"] = 0] = "Red"; })(E.Color || (E.Color = {})); var Color = E.Color; - function fn() { } + function fn() { + } E.fn = fn; var C = (function () { function C() { @@ -115,7 +116,8 @@ var F; (function (Color) { Color[Color["Red"] = 0] = "Red"; })(Color || (Color = {})); - function fn() { } + function fn() { + } var C = (function () { function C() { } diff --git a/tests/baselines/reference/exportImportMultipleFiles.js b/tests/baselines/reference/exportImportMultipleFiles.js index 10909808ffc..225b605f689 100644 --- a/tests/baselines/reference/exportImportMultipleFiles.js +++ b/tests/baselines/reference/exportImportMultipleFiles.js @@ -14,7 +14,9 @@ lib.math.add(3, 4); // Shouldnt be error //// [exportImportMultipleFiles_math.js] define(["require", "exports"], function (require, exports) { - function add(a, b) { return a + b; } + function add(a, b) { + return a + b; + } exports.add = add; }); //// [exportImportMultipleFiles_library.js] diff --git a/tests/baselines/reference/exportImportNonInstantiatedModule.js b/tests/baselines/reference/exportImportNonInstantiatedModule.js index d9081efcd36..720fbfafc61 100644 --- a/tests/baselines/reference/exportImportNonInstantiatedModule.js +++ b/tests/baselines/reference/exportImportNonInstantiatedModule.js @@ -14,4 +14,6 @@ var x: B.A1.I = { x: 1 }; var B; (function (B) { })(B || (B = {})); -var x = { x: 1 }; +var x = { + x: 1 +}; diff --git a/tests/baselines/reference/exportImportNonInstantiatedModule2.js b/tests/baselines/reference/exportImportNonInstantiatedModule2.js index 2782a6f6f67..575271dba30 100644 --- a/tests/baselines/reference/exportImportNonInstantiatedModule2.js +++ b/tests/baselines/reference/exportImportNonInstantiatedModule2.js @@ -24,7 +24,9 @@ define(["require", "exports"], function (require, exports) { //// [consumer.js] define(["require", "exports"], function (require, exports) { function w() { - return { name: 'value' }; + return { + name: 'value' + }; } exports.w = w; }); diff --git a/tests/baselines/reference/exportNonVisibleType.js b/tests/baselines/reference/exportNonVisibleType.js index 101c356d582..edd0e6988d4 100644 --- a/tests/baselines/reference/exportNonVisibleType.js +++ b/tests/baselines/reference/exportNonVisibleType.js @@ -36,7 +36,10 @@ export = C1; // Should work, private type I1 of visible class C1 only used in pr //// [foo1.js] -var x = { a: "test", b: 42 }; +var x = { + a: "test", + b: 42 +}; module.exports = x; //// [foo2.js] var C1 = (function () { diff --git a/tests/baselines/reference/exportPrivateType.js b/tests/baselines/reference/exportPrivateType.js index 11ccc037ef6..96acc83edb5 100644 --- a/tests/baselines/reference/exportPrivateType.js +++ b/tests/baselines/reference/exportPrivateType.js @@ -41,7 +41,9 @@ var foo; var C2 = (function () { function C2() { } - C2.prototype.test = function () { return true; }; + C2.prototype.test = function () { + return true; + }; return C2; })(); // None of the types are exported, so per section 10.3, should all be errors diff --git a/tests/baselines/reference/exportedVariable1.js b/tests/baselines/reference/exportedVariable1.js index 39eea8d34b5..d1039e0db43 100644 --- a/tests/baselines/reference/exportedVariable1.js +++ b/tests/baselines/reference/exportedVariable1.js @@ -5,6 +5,8 @@ var upper = foo.name.toUpperCase(); //// [exportedVariable1.js] define(["require", "exports"], function (require, exports) { - exports.foo = { name: "Bill" }; + exports.foo = { + name: "Bill" + }; var upper = exports.foo.name.toUpperCase(); }); diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 23c9127175e..836db4dc362 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); var D = (function (_super) { @@ -31,7 +32,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(C); var c; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index 234cc59ff70..8311f4d6ce6 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -36,7 +36,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(C); var d = new D(); diff --git a/tests/baselines/reference/extendArray.js b/tests/baselines/reference/extendArray.js index 6d5c0262209..7809aa6bb25 100644 --- a/tests/baselines/reference/extendArray.js +++ b/tests/baselines/reference/extendArray.js @@ -24,8 +24,12 @@ arr.collect = function (fn) { //// [extendArray.js] -var a = [1, 2]; -a.forEach(function (v, i, a) { }); +var a = [ + 1, + 2 +]; +a.forEach(function (v, i, a) { +}); var arr = Array.prototype; arr.collect = function (fn) { var res = []; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index 26f0c776dd8..47a602aefaf 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -13,7 +13,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var x = A; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 820a6910962..5c328e39131 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -23,6 +23,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(C); diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index ad88446c4c4..3f3b7049311 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -23,6 +23,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(C); diff --git a/tests/baselines/reference/externModule.js b/tests/baselines/reference/externModule.js index 719b68451ae..0dc3d8e84cd 100644 --- a/tests/baselines/reference/externModule.js +++ b/tests/baselines/reference/externModule.js @@ -42,7 +42,8 @@ n=XDate.UTC(1964,2,1); //// [externModule.js] declare; module; -{ } +{ +} var XDate = (function () { function XDate() { } diff --git a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js index f9c83c83cf0..73ef9b6b296 100644 --- a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js +++ b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js @@ -10,7 +10,8 @@ file1.foo(); //// [externalModuleReferenceOfImportDeclarationWithExportModifier_0.js] define(["require", "exports"], function (require, exports) { - function foo() { } + function foo() { + } exports.foo = foo; ; }); diff --git a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js index f1d1d9fb561..edbdf6b90a5 100644 --- a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js +++ b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js @@ -19,7 +19,8 @@ file1.bar(); //// [externalModuleRefernceResolutionOrderInImportDeclaration_file2.js] //// [externalModuleRefernceResolutionOrderInImportDeclaration_file1.js] -function foo() { } +function foo() { +} exports.foo = foo; ; //// [externalModuleRefernceResolutionOrderInImportDeclaration_file3.js] diff --git a/tests/baselines/reference/fatArrowfunctionAsType.js b/tests/baselines/reference/fatArrowfunctionAsType.js index 894267580c6..bd2dc4310d9 100644 --- a/tests/baselines/reference/fatArrowfunctionAsType.js +++ b/tests/baselines/reference/fatArrowfunctionAsType.js @@ -7,5 +7,7 @@ b = c; //// [fatArrowfunctionAsType.js] -var c = function (x) { return 42; }; +var c = function (x) { + return 42; +}; b = c; diff --git a/tests/baselines/reference/fatarrowfunctions.js b/tests/baselines/reference/fatarrowfunctions.js index eb57d1a9817..1c74f39bed5 100644 --- a/tests/baselines/reference/fatarrowfunctions.js +++ b/tests/baselines/reference/fatarrowfunctions.js @@ -49,30 +49,70 @@ var messenger = { function foo(x) { return x(); } -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function () { return 0; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function (x, y, z) { return x + y + z; }); -foo(function () { return 0; }); -foo((function (x) { return x; })); -foo(function (x) { return x * x; }); -var y = function (x) { return x * x; }; -var z = function (x) { return x * x; }; -var w = function () { return 3; }; +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function () { + return 0; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function (x, y, z) { + return x + y + z; +}); +foo(function () { + return 0; +}); +foo((function (x) { + return x; +})); +foo(function (x) { + return x * x; +}); +var y = function (x) { + return x * x; +}; +var z = function (x) { + return x * x; +}; +var w = function () { + return 3; +}; function ternaryTest(isWhile) { - var f = isWhile ? function (n) { return n > 0; } : function (n) { return n === 0; }; + var f = isWhile ? function (n) { + return n > 0; + } : function (n) { + return n === 0; + }; } var messenger = { message: "Hello World", start: function () { var _this = this; - setTimeout(function () { _this.message.toString(); }, 3000); + setTimeout(function () { + _this.message.toString(); + }, 3000); } }; diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.js b/tests/baselines/reference/fatarrowfunctionsErrors.js index 2ac20f1966a..56fd91f3d1c 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.js +++ b/tests/baselines/reference/fatarrowfunctionsErrors.js @@ -20,19 +20,28 @@ foo(function () { } return 0; }); -foo((1), { return: 0 }); -foo(function (x) { return x; }); +foo((1), { + return: 0 +}); +foo(function (x) { + return x; +}); foo(function (x) { if (x === void 0) { x = 0; } return x; }); var y = x, number; x * x; -false ? (function () { return null; }) : null; +false ? (function () { + return null; +}) : null; // missing fatarrow -var x1 = function () { }; -var x2 = function (a) { }; -var x3 = function (a) { }; +var x1 = function () { +}; +var x2 = function (a) { +}; +var x3 = function (a) { +}; var x4 = function () { var a = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js index d73eec12bcd..e5c8134a4bb 100644 --- a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js +++ b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.js @@ -12,7 +12,9 @@ fn.call(4); // Should be 4 //// [fatarrowfunctionsInFunctionParameterDefaults.js] function fn(x, y) { var _this = this; - if (x === void 0) { x = function () { return _this; }; } + if (x === void 0) { x = function () { + return _this; + }; } if (y === void 0) { y = x(); } // should be 4 return y; diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js index e6e43f8bbf4..bdd80477162 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js @@ -134,27 +134,39 @@ foo( //// [fatarrowfunctionsOptionalArgs.js] // valid // no params -(function () { return 1; }); +(function () { + return 1; +}); // one param, no type -(function (arg) { return 2; }); +(function (arg) { + return 2; +}); // one param, no type -(function (arg) { return 2; }); +(function (arg) { + return 2; +}); // one param, no type with default value (function (arg) { if (arg === void 0) { arg = 1; } return 3; }); // one param, no type, optional -(function (arg) { return 4; }); +(function (arg) { + return 4; +}); // typed param -(function (arg) { return 5; }); +(function (arg) { + return 5; +}); // typed param with default value (function (arg) { if (arg === void 0) { arg = 0; } return 6; }); // optional param -(function (arg) { return 7; }); +(function (arg) { + return 7; +}); // var arg param (function () { var arg = []; @@ -164,20 +176,28 @@ foo( return 8; }); // multiple arguments -(function (arg1, arg2) { return 12; }); +(function (arg1, arg2) { + return 12; +}); (function (arg1, arg2) { if (arg1 === void 0) { arg1 = 1; } if (arg2 === void 0) { arg2 = 3; } return 13; }); -(function (arg1, arg2) { return 14; }); -(function (arg1, arg2) { return 15; }); +(function (arg1, arg2) { + return 14; +}); +(function (arg1, arg2) { + return 15; +}); (function (arg1, arg2) { if (arg1 === void 0) { arg1 = 0; } if (arg2 === void 0) { arg2 = 1; } return 16; }); -(function (arg1, arg2) { return 17; }); +(function (arg1, arg2) { + return 17; +}); (function (arg1) { var arg2 = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -185,21 +205,33 @@ foo( } return 18; }); -(function (arg1, arg2) { return 19; }); +(function (arg1, arg2) { + return 19; +}); // in paren -(function () { return 21; }); -(function (arg) { return 22; }); +(function () { + return 21; +}); +(function (arg) { + return 22; +}); (function (arg) { if (arg === void 0) { arg = 1; } return 23; }); -(function (arg) { return 24; }); -(function (arg) { return 25; }); +(function (arg) { + return 24; +}); +(function (arg) { + return 25; +}); (function (arg) { if (arg === void 0) { arg = 0; } return 26; }); -(function (arg) { return 27; }); +(function (arg) { + return 27; +}); (function () { var arg = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -208,17 +240,29 @@ foo( return 28; }); // in multiple paren -((((function (arg) { return 32; })))); +((((function (arg) { + return 32; +})))); // in ternary exression -false ? function () { return 41; } : null; -false ? function (arg) { return 42; } : null; +false ? function () { + return 41; +} : null; +false ? function (arg) { + return 42; +} : null; false ? function (arg) { if (arg === void 0) { arg = 1; } return 43; } : null; -false ? function (arg) { return 44; } : null; -false ? function (arg) { return 45; } : null; -false ? function (arg) { return 46; } : null; +false ? function (arg) { + return 44; +} : null; +false ? function (arg) { + return 45; +} : null; +false ? function (arg) { + return 46; +} : null; false ? function (arg) { if (arg === void 0) { arg = 0; } return 47; @@ -231,15 +275,25 @@ false ? function () { return 48; } : null; // in ternary exression within paren -false ? (function () { return 51; }) : null; -false ? (function (arg) { return 52; }) : null; +false ? (function () { + return 51; +}) : null; +false ? (function (arg) { + return 52; +}) : null; false ? (function (arg) { if (arg === void 0) { arg = 1; } return 53; }) : null; -false ? (function (arg) { return 54; }) : null; -false ? (function (arg) { return 55; }) : null; -false ? (function (arg) { return 56; }) : null; +false ? (function (arg) { + return 54; +}) : null; +false ? (function (arg) { + return 55; +}) : null; +false ? (function (arg) { + return 56; +}) : null; false ? (function (arg) { if (arg === void 0) { arg = 0; } return 57; @@ -252,15 +306,25 @@ false ? (function () { return 58; }) : null; // ternary exression's else clause -false ? null : function () { return 61; }; -false ? null : function (arg) { return 62; }; +false ? null : function () { + return 61; +}; +false ? null : function (arg) { + return 62; +}; false ? null : function (arg) { if (arg === void 0) { arg = 1; } return 63; }; -false ? null : function (arg) { return 64; }; -false ? null : function (arg) { return 65; }; -false ? null : function (arg) { return 66; }; +false ? null : function (arg) { + return 64; +}; +false ? null : function (arg) { + return 65; +}; +false ? null : function (arg) { + return 66; +}; false ? null : function (arg) { if (arg === void 0) { arg = 0; } return 67; @@ -273,24 +337,48 @@ false ? null : function () { return 68; }; // nested ternary expressions -(function (a) { return a; }) ? function (b) { return b; } : function (c) { return c; }; +(function (a) { + return a; +}) ? function (b) { + return b; +} : function (c) { + return c; +}; //multiple levels -(function (a) { return a; }); -(function (b) { return function (c) { return 81; }; }); -(function (c) { return function (d) { return 82; }; }); +(function (a) { + return a; +}); +(function (b) { + return function (c) { + return 81; + }; +}); +(function (c) { + return function (d) { + return 82; + }; +}); // In Expressions -(function (arg) { return 90; }) instanceof Function; +(function (arg) { + return 90; +}) instanceof Function; (function (arg) { if (arg === void 0) { arg = 1; } return 91; }) instanceof Function; -(function (arg) { return 92; }) instanceof Function; -(function (arg) { return 93; }) instanceof Function; +(function (arg) { + return 92; +}) instanceof Function; +(function (arg) { + return 93; +}) instanceof Function; (function (arg) { if (arg === void 0) { arg = 1; } return 94; }) instanceof Function; -(function (arg) { return 95; }) instanceof Function; +(function (arg) { + return 95; +}) instanceof Function; (function () { var arg = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -298,8 +386,14 @@ false ? null : function () { } return 96; }) instanceof Function; -'' + (function (arg) { return 100; }); -(function (arg) { return 0; }) + '' + (function (arg) { return 101; }); +'' + (function (arg) { + return 100; +}); +(function (arg) { + return 0; +}) + '' + (function (arg) { + return 101; +}); (function (arg) { if (arg === void 0) { arg = 1; } return 0; @@ -307,8 +401,16 @@ false ? null : function () { if (arg === void 0) { arg = 2; } return 102; }); -(function (arg) { return 0; }) + '' + (function (arg) { return 103; }); -(function (arg) { return 0; }) + '' + (function (arg) { return 104; }); +(function (arg) { + return 0; +}) + '' + (function (arg) { + return 103; +}); +(function (arg) { + return 0; +}) + '' + (function (arg) { + return 104; +}); (function (arg) { if (arg === void 0) { arg = 1; } return 0; @@ -336,7 +438,11 @@ false ? null : function () { } return 107; }); -(function (arg1, arg2) { return 0; }) + '' + (function (arg1, arg2) { return 108; }); +(function (arg1, arg2) { + return 0; +}) + '' + (function (arg1, arg2) { + return 108; +}); (function (arg1) { var arg2 = []; for (var _i = 1; _i < arguments.length; _i++) { @@ -357,9 +463,19 @@ function foo() { arg[_i - 0] = arguments[_i]; } } -foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { +foo(function (a) { + return 110; +}, (function (a) { + return 111; +}), function (a) { return 112; -}, function (a) { return 113; }, function (a, b) { return 114; }, function (a) { return 115; }, function (a) { +}, function (a) { + return 113; +}, function (a, b) { + return 114; +}, function (a) { + return 115; +}, function (a) { if (a === void 0) { a = 0; } return 116; }, function (a) { @@ -381,4 +497,14 @@ foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { c[_i - 2] = arguments[_i]; } return 120; -}, function (a) { return function (b) { return function (c) { return 121; }; }; }, false ? function (a) { return 0; } : function (b) { return 122; }); +}, function (a) { + return function (b) { + return function (c) { + return 121; + }; + }; +}, false ? function (a) { + return 0; +} : function (b) { + return 122; +}); diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js index 428a085ca56..0ee54452a9b 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors1.js @@ -8,7 +8,9 @@ (arg1 = 1, arg2) => 1; //// [fatarrowfunctionsOptionalArgsErrors1.js] -(function (arg1, arg2) { return 101; }); +(function (arg1, arg2) { + return 101; +}); (function () { var arg = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js index dfd7e9f74dc..e6628081064 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors4.js @@ -42,9 +42,19 @@ false ? null : function (arg) { if (arg === void 0) { arg = 2; } return 106; }); -foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { +foo(function (a) { + return 110; +}, (function (a) { + return 111; +}), function (a) { return 112; -}, function (a) { return 113; }, function (a, b) { return 114; }, function (a) { return 115; }, function (a) { +}, function (a) { + return 113; +}, function (a, b) { + return 114; +}, function (a) { + return 115; +}, function (a) { if (a === void 0) { a = 0; } return 116; }, function (a) { @@ -66,4 +76,14 @@ foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { c[_i - 2] = arguments[_i]; } return 120; -}, function (a) { return function (b) { return function (c) { return 121; }; }; }, false ? function (a) { return 0; } : function (b) { return 122; }); +}, function (a) { + return function (b) { + return function (c) { + return 121; + }; + }; +}, false ? function (a) { + return 0; +} : function (b) { + return 122; +}); diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.js b/tests/baselines/reference/fieldAndGetterWithSameName.js index ddd95b9e8f2..64129ff9365 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.js +++ b/tests/baselines/reference/fieldAndGetterWithSameName.js @@ -10,7 +10,9 @@ define(["require", "exports"], function (require, exports) { function C() { } Object.defineProperty(C.prototype, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js index dea003057c4..d8521e56a14 100644 --- a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js +++ b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js @@ -3,5 +3,6 @@ function bar(item1: T, item2: T) { } bar(1, ""); // Should be ok //// [fixTypeParameterInSignatureWithRestParameters.js] -function bar(item1, item2) { } +function bar(item1, item2) { +} bar(1, ""); // Should be ok diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index 32e1389232d..08ef1dbcccd 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -88,38 +88,71 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; var aString; -for (aString in {}) { } +for (aString in {}) { +} var anAny; -for (anAny in {}) { } -for (var x in {}) { } -for (var x in []) { } -for (var x in [1, 2, 3, 4, 5]) { } -function fn() { } -for (var x in fn()) { } -for (var x in /[a-z]/) { } -for (var x in new Date()) { } +for (anAny in {}) { +} +for (var x in {}) { +} +for (var x in []) { +} +for (var x in [ + 1, + 2, + 3, + 4, + 5 +]) { +} +function fn() { +} +for (var x in fn()) { +} +for (var x in /[a-z]/) { +} +for (var x in new Date()) { +} var c, d, e; -for (var x in c || d) { } -for (var x in e ? c : d) { } -for (var x in 42 ? c : d) { } -for (var x in '' ? c : d) { } -for (var x in 42 ? d[x] : c[x]) { } -for (var x in c[d]) { } -for (var x in (function (x) { return x; })) { } -for (var x in function (x, y) { return x + y; }) { } +for (var x in c || d) { +} +for (var x in e ? c : d) { +} +for (var x in 42 ? c : d) { +} +for (var x in '' ? c : d) { +} +for (var x in 42 ? d[x] : c[x]) { +} +for (var x in c[d]) { +} +for (var x in (function (x) { + return x; +})) { +} +for (var x in function (x, y) { + return x + y; +}) { +} var A = (function () { function A() { } A.prototype.biz = function () { - for (var x in this.biz()) { } - for (var x in this.biz) { } - for (var x in this) { } + for (var x in this.biz()) { + } + for (var x in this.biz) { + } + for (var x in this) { + } return null; }; A.baz = function () { - for (var x in this) { } - for (var x in this.baz) { } - for (var x in this.baz()) { } + for (var x in this) { + } + for (var x in this.baz) { + } + for (var x in this.baz()) { + } return null; }; return A; @@ -130,17 +163,23 @@ var B = (function (_super) { _super.apply(this, arguments); } B.prototype.boz = function () { - for (var x in this.biz()) { } - for (var x in this.biz) { } - for (var x in this) { } - for (var x in _super.prototype.biz) { } - for (var x in _super.prototype.biz.call(this)) { } + for (var x in this.biz()) { + } + for (var x in this.biz) { + } + for (var x in this) { + } + for (var x in _super.prototype.biz) { + } + for (var x in _super.prototype.biz.call(this)) { + } return null; }; return B; })(A); var i; -for (var x in i[42]) { } +for (var x in i[42]) { +} var M; (function (M) { var X = (function () { @@ -150,12 +189,16 @@ var M; })(); M.X = X; })(M || (M = {})); -for (var x in M) { } -for (var x in M.X) { } +for (var x in M) { +} +for (var x in M.X) { +} var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Blue"] = 1] = "Blue"; })(Color || (Color = {})); -for (var x in Color) { } -for (var x in 1 /* Blue */) { } +for (var x in Color) { +} +for (var x in 1 /* Blue */) { +} diff --git a/tests/baselines/reference/for-inStatementsDestructuring.js b/tests/baselines/reference/for-inStatementsDestructuring.js index e5e00d5b3ab..25a696f9fc5 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring.js +++ b/tests/baselines/reference/for-inStatementsDestructuring.js @@ -2,4 +2,5 @@ for (var [a, b] in []) {} //// [for-inStatementsDestructuring.js] -for (var _a = void 0, a = _a[0], b = _a[1] in []) { } +for (var _a = void 0, a = _a[0], b = _a[1] in []) { +} diff --git a/tests/baselines/reference/for-inStatementsDestructuring2.js b/tests/baselines/reference/for-inStatementsDestructuring2.js index 41a6d30919f..7051a5a058a 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring2.js +++ b/tests/baselines/reference/for-inStatementsDestructuring2.js @@ -2,4 +2,5 @@ for (var {a, b} in []) {} //// [for-inStatementsDestructuring2.js] -for (var _a = void 0, a = _a.a, b = _a.b in []) { } +for (var _a = void 0, a = _a.a, b = _a.b in []) { +} diff --git a/tests/baselines/reference/for-inStatementsDestructuring3.js b/tests/baselines/reference/for-inStatementsDestructuring3.js index 0970740acab..2784e48708b 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring3.js +++ b/tests/baselines/reference/for-inStatementsDestructuring3.js @@ -4,4 +4,8 @@ for ([a, b] in []) { } //// [for-inStatementsDestructuring3.js] var a, b; -for ([a, b] in []) { } +for ([ + a, + b +] in []) { +} diff --git a/tests/baselines/reference/for-inStatementsDestructuring4.js b/tests/baselines/reference/for-inStatementsDestructuring4.js index 0cce61ac96d..6eb56960240 100644 --- a/tests/baselines/reference/for-inStatementsDestructuring4.js +++ b/tests/baselines/reference/for-inStatementsDestructuring4.js @@ -4,4 +4,8 @@ for ({a, b} in []) { } //// [for-inStatementsDestructuring4.js] var a, b; -for ({ a: a, b: b } in []) { } +for ({ + a: a, + b: b +} in []) { +} diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index 6d42a550a01..a485c8ba7ce 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -71,36 +71,60 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; var aNumber; -for (aNumber in {}) { } +for (aNumber in {}) { +} var aBoolean; -for (aBoolean in {}) { } +for (aBoolean in {}) { +} var aRegExp; -for (aRegExp in {}) { } -for (var idx in {}) { } -function fn() { } -for (var x in fn()) { } +for (aRegExp in {}) { +} +for (var idx in {}) { +} +function fn() { +} +for (var x in fn()) { +} var c, d, e; -for (var x in c || d) { } -for (var x in e ? c : d) { } -for (var x in 42 ? c : d) { } -for (var x in '' ? c : d) { } -for (var x in 42 ? d[x] : c[x]) { } -for (var x in c[23]) { } -for (var x in (function (x) { return x; })) { } -for (var x in function (x, y) { return x + y; }) { } +for (var x in c || d) { +} +for (var x in e ? c : d) { +} +for (var x in 42 ? c : d) { +} +for (var x in '' ? c : d) { +} +for (var x in 42 ? d[x] : c[x]) { +} +for (var x in c[23]) { +} +for (var x in (function (x) { + return x; +})) { +} +for (var x in function (x, y) { + return x + y; +}) { +} var A = (function () { function A() { } A.prototype.biz = function () { - for (var x in this.biz()) { } - for (var x in this.biz) { } - for (var x in this) { } + for (var x in this.biz()) { + } + for (var x in this.biz) { + } + for (var x in this) { + } return null; }; A.baz = function () { - for (var x in this) { } - for (var x in this.baz) { } - for (var x in this.baz()) { } + for (var x in this) { + } + for (var x in this.baz) { + } + for (var x in this.baz()) { + } return null; }; return A; @@ -111,14 +135,20 @@ var B = (function (_super) { _super.apply(this, arguments); } B.prototype.boz = function () { - for (var x in this.biz()) { } - for (var x in this.biz) { } - for (var x in this) { } - for (var x in _super.prototype.biz) { } - for (var x in _super.prototype.biz.call(this)) { } + for (var x in this.biz()) { + } + for (var x in this.biz) { + } + for (var x in this) { + } + for (var x in _super.prototype.biz) { + } + for (var x in _super.prototype.biz.call(this)) { + } return null; }; return B; })(A); var i; -for (var x in i[42]) { } +for (var x in i[42]) { +} diff --git a/tests/baselines/reference/for-of1.js b/tests/baselines/reference/for-of1.js index 9df6a96d78f..fb74d6ecede 100644 --- a/tests/baselines/reference/for-of1.js +++ b/tests/baselines/reference/for-of1.js @@ -4,4 +4,5 @@ for (v of []) { } //// [for-of1.js] var v; -for (v of []) { } +for (v of []) { +} diff --git a/tests/baselines/reference/for-of10.js b/tests/baselines/reference/for-of10.js index 7fd05f5479b..3b01719417f 100644 --- a/tests/baselines/reference/for-of10.js +++ b/tests/baselines/reference/for-of10.js @@ -4,4 +4,7 @@ for (v of [0]) { } //// [for-of10.js] var v; -for (v of [0]) { } +for (v of [ + 0 +]) { +} diff --git a/tests/baselines/reference/for-of11.js b/tests/baselines/reference/for-of11.js index 055ed0039dc..58486c477e7 100644 --- a/tests/baselines/reference/for-of11.js +++ b/tests/baselines/reference/for-of11.js @@ -4,4 +4,8 @@ for (v of [0, ""]) { } //// [for-of11.js] var v; -for (v of [0, ""]) { } +for (v of [ + 0, + "" +]) { +} diff --git a/tests/baselines/reference/for-of12.js b/tests/baselines/reference/for-of12.js index 6185ca8e331..f489eaa40f9 100644 --- a/tests/baselines/reference/for-of12.js +++ b/tests/baselines/reference/for-of12.js @@ -4,4 +4,8 @@ for (v of [0, ""].values()) { } //// [for-of12.js] var v; -for (v of [0, ""].values()) { } +for (v of [ + 0, + "" +].values()) { +} diff --git a/tests/baselines/reference/for-of13.js b/tests/baselines/reference/for-of13.js index e66668f1736..87d908b42b8 100644 --- a/tests/baselines/reference/for-of13.js +++ b/tests/baselines/reference/for-of13.js @@ -4,4 +4,7 @@ for (v of [""].values()) { } //// [for-of13.js] var v; -for (v of [""].values()) { } +for (v of [ + "" +].values()) { +} diff --git a/tests/baselines/reference/for-of14.js b/tests/baselines/reference/for-of14.js index d5f9e29b766..65ac7119fb6 100644 --- a/tests/baselines/reference/for-of14.js +++ b/tests/baselines/reference/for-of14.js @@ -10,7 +10,8 @@ class StringIterator { //// [for-of14.js] var v; -for (v of new StringIterator) { } // Should fail because the iterator is not iterable +for (v of new StringIterator) { +} // Should fail because the iterator is not iterable var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of15.js b/tests/baselines/reference/for-of15.js index 36955389756..74e34c2b2ae 100644 --- a/tests/baselines/reference/for-of15.js +++ b/tests/baselines/reference/for-of15.js @@ -13,7 +13,8 @@ class StringIterator { //// [for-of15.js] var v; -for (v of new StringIterator) { } // Should fail +for (v of new StringIterator) { +} // Should fail var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of16.js b/tests/baselines/reference/for-of16.js index 21ba2adb75c..526dc277be7 100644 --- a/tests/baselines/reference/for-of16.js +++ b/tests/baselines/reference/for-of16.js @@ -10,7 +10,8 @@ class StringIterator { //// [for-of16.js] var v; -for (v of new StringIterator) { } // Should fail +for (v of new StringIterator) { +} // Should fail var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of17.js b/tests/baselines/reference/for-of17.js index 5c56cdab445..268ead7ee18 100644 --- a/tests/baselines/reference/for-of17.js +++ b/tests/baselines/reference/for-of17.js @@ -16,7 +16,8 @@ class NumberIterator { //// [for-of17.js] var v; -for (v of new NumberIterator) { } // Should succeed +for (v of new NumberIterator) { +} // Should succeed var NumberIterator = (function () { function NumberIterator() { } diff --git a/tests/baselines/reference/for-of18.js b/tests/baselines/reference/for-of18.js index 57168d9bf07..3be876409dc 100644 --- a/tests/baselines/reference/for-of18.js +++ b/tests/baselines/reference/for-of18.js @@ -16,7 +16,8 @@ class StringIterator { //// [for-of18.js] var v; -for (v of new StringIterator) { } // Should succeed +for (v of new StringIterator) { +} // Should succeed var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of2.js b/tests/baselines/reference/for-of2.js index d7eceb7c49e..49d3f76746a 100644 --- a/tests/baselines/reference/for-of2.js +++ b/tests/baselines/reference/for-of2.js @@ -4,4 +4,5 @@ for (v of []) { } //// [for-of2.js] const v; -for (v of []) { } +for (v of []) { +} diff --git a/tests/baselines/reference/for-of24.js b/tests/baselines/reference/for-of24.js index b4918519603..bb605011ef6 100644 --- a/tests/baselines/reference/for-of24.js +++ b/tests/baselines/reference/for-of24.js @@ -5,4 +5,5 @@ for (var v of x) { } //// [for-of24.js] var x; -for (var v of x) { } +for (var v of x) { +} diff --git a/tests/baselines/reference/for-of25.js b/tests/baselines/reference/for-of25.js index 21b5ce1408b..86c175f861e 100644 --- a/tests/baselines/reference/for-of25.js +++ b/tests/baselines/reference/for-of25.js @@ -10,7 +10,8 @@ class StringIterator { //// [for-of25.js] var x; -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of26.js b/tests/baselines/reference/for-of26.js index a45492a81c0..edb6b4c38b2 100644 --- a/tests/baselines/reference/for-of26.js +++ b/tests/baselines/reference/for-of26.js @@ -13,7 +13,8 @@ class StringIterator { //// [for-of26.js] var x; -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of27.js b/tests/baselines/reference/for-of27.js index 91e1e7194c1..379b95c5b09 100644 --- a/tests/baselines/reference/for-of27.js +++ b/tests/baselines/reference/for-of27.js @@ -6,7 +6,8 @@ class StringIterator { } //// [for-of27.js] -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of28.js b/tests/baselines/reference/for-of28.js index 06029e6bb08..79b1590e12f 100644 --- a/tests/baselines/reference/for-of28.js +++ b/tests/baselines/reference/for-of28.js @@ -9,7 +9,8 @@ class StringIterator { } //// [for-of28.js] -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of29.js b/tests/baselines/reference/for-of29.js index 450cafbde85..c369731bee0 100644 --- a/tests/baselines/reference/for-of29.js +++ b/tests/baselines/reference/for-of29.js @@ -8,4 +8,5 @@ for (var v of iterableWithOptionalIterator) { } //// [for-of29.js] var iterableWithOptionalIterator; -for (var v of iterableWithOptionalIterator) { } +for (var v of iterableWithOptionalIterator) { +} diff --git a/tests/baselines/reference/for-of3.js b/tests/baselines/reference/for-of3.js index 7ef27187702..f47802dac6b 100644 --- a/tests/baselines/reference/for-of3.js +++ b/tests/baselines/reference/for-of3.js @@ -4,4 +4,5 @@ for (v++ of []) { } //// [for-of3.js] var v; -for (v++ of []) { } +for (v++ of []) { +} diff --git a/tests/baselines/reference/for-of30.js b/tests/baselines/reference/for-of30.js index 4618dae5ff6..759c7823e63 100644 --- a/tests/baselines/reference/for-of30.js +++ b/tests/baselines/reference/for-of30.js @@ -17,7 +17,8 @@ class StringIterator { } //// [for-of30.js] -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { this.return = 0; diff --git a/tests/baselines/reference/for-of31.js b/tests/baselines/reference/for-of31.js index 588c75a1145..6773c8a3452 100644 --- a/tests/baselines/reference/for-of31.js +++ b/tests/baselines/reference/for-of31.js @@ -15,7 +15,8 @@ class StringIterator { } //// [for-of31.js] -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of32.js b/tests/baselines/reference/for-of32.js index d25d16fbebe..bce2097e3ca 100644 --- a/tests/baselines/reference/for-of32.js +++ b/tests/baselines/reference/for-of32.js @@ -2,4 +2,5 @@ for (var v of v) { } //// [for-of32.js] -for (var v of v) { } +for (var v of v) { +} diff --git a/tests/baselines/reference/for-of33.js b/tests/baselines/reference/for-of33.js index 91d8de41c6a..f3a75eec137 100644 --- a/tests/baselines/reference/for-of33.js +++ b/tests/baselines/reference/for-of33.js @@ -8,7 +8,8 @@ class StringIterator { } //// [for-of33.js] -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of34.js b/tests/baselines/reference/for-of34.js index ccb6006c63d..521b4f3c2a4 100644 --- a/tests/baselines/reference/for-of34.js +++ b/tests/baselines/reference/for-of34.js @@ -12,7 +12,8 @@ class StringIterator { } //// [for-of34.js] -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of35.js b/tests/baselines/reference/for-of35.js index a4f1a37e3bf..cb6dc0e532f 100644 --- a/tests/baselines/reference/for-of35.js +++ b/tests/baselines/reference/for-of35.js @@ -15,7 +15,8 @@ class StringIterator { } //// [for-of35.js] -for (var v of new StringIterator) { } +for (var v of new StringIterator) { +} var StringIterator = (function () { function StringIterator() { } diff --git a/tests/baselines/reference/for-of36.js b/tests/baselines/reference/for-of36.js index 14523695151..fb70b1d60cc 100644 --- a/tests/baselines/reference/for-of36.js +++ b/tests/baselines/reference/for-of36.js @@ -5,7 +5,10 @@ for (var v of tuple) { } //// [for-of36.js] -var tuple = ["", true]; +var tuple = [ + "", + true +]; for (var v of tuple) { v; } diff --git a/tests/baselines/reference/for-of37.js b/tests/baselines/reference/for-of37.js index 472193e6cb5..cada43a6326 100644 --- a/tests/baselines/reference/for-of37.js +++ b/tests/baselines/reference/for-of37.js @@ -5,7 +5,12 @@ for (var v of map) { } //// [for-of37.js] -var map = new Map([["", true]]); +var map = new Map([ + [ + "", + true + ] +]); for (var v of map) { v; } diff --git a/tests/baselines/reference/for-of38.js b/tests/baselines/reference/for-of38.js index 1f0ac09682e..48b697f906e 100644 --- a/tests/baselines/reference/for-of38.js +++ b/tests/baselines/reference/for-of38.js @@ -6,7 +6,12 @@ for (var [k, v] of map) { } //// [for-of38.js] -var map = new Map([["", true]]); +var map = new Map([ + [ + "", + true + ] +]); for (var [k, v] of map) { k; v; diff --git a/tests/baselines/reference/for-of39.js b/tests/baselines/reference/for-of39.js index 91dbc56c0ab..3b7d8d9a56a 100644 --- a/tests/baselines/reference/for-of39.js +++ b/tests/baselines/reference/for-of39.js @@ -6,7 +6,16 @@ for (var [k, v] of map) { } //// [for-of39.js] -var map = new Map([["", true], ["", 0]]); +var map = new Map([ + [ + "", + true + ], + [ + "", + 0 + ] +]); for (var [k, v] of map) { k; v; diff --git a/tests/baselines/reference/for-of4.js b/tests/baselines/reference/for-of4.js index 147619d2fe2..03cef92c1f5 100644 --- a/tests/baselines/reference/for-of4.js +++ b/tests/baselines/reference/for-of4.js @@ -4,6 +4,8 @@ for (var v of [0]) { } //// [for-of4.js] -for (var v of [0]) { +for (var v of [ + 0 +]) { v; } diff --git a/tests/baselines/reference/for-of40.js b/tests/baselines/reference/for-of40.js index 243f81097db..06fc45adfa7 100644 --- a/tests/baselines/reference/for-of40.js +++ b/tests/baselines/reference/for-of40.js @@ -6,7 +6,12 @@ for (var [k = "", v = false] of map) { } //// [for-of40.js] -var map = new Map([["", true]]); +var map = new Map([ + [ + "", + true + ] +]); for (var [k = "", v = false] of map) { k; v; diff --git a/tests/baselines/reference/for-of41.js b/tests/baselines/reference/for-of41.js index 0fa380c53c4..f3ae215c5b8 100644 --- a/tests/baselines/reference/for-of41.js +++ b/tests/baselines/reference/for-of41.js @@ -6,7 +6,16 @@ for (var {x: [a], y: {p}} of array) { } //// [for-of41.js] -var array = [{ x: [0], y: { p: "" } }]; +var array = [ + { + x: [ + 0 + ], + y: { + p: "" + } + } +]; for (var { x: [a], y: { p } } of array) { a; p; diff --git a/tests/baselines/reference/for-of42.js b/tests/baselines/reference/for-of42.js index 1fa9219df47..774ce512e9f 100644 --- a/tests/baselines/reference/for-of42.js +++ b/tests/baselines/reference/for-of42.js @@ -6,7 +6,12 @@ for (var {x: a, y: b} of array) { } //// [for-of42.js] -var array = [{ x: "", y: 0 }]; +var array = [ + { + x: "", + y: 0 + } +]; for (var { x: a, y: b } of array) { a; b; diff --git a/tests/baselines/reference/for-of43.js b/tests/baselines/reference/for-of43.js index de3b4fcd9b0..dc8c9c885d8 100644 --- a/tests/baselines/reference/for-of43.js +++ b/tests/baselines/reference/for-of43.js @@ -6,7 +6,12 @@ for (var {x: a = "", y: b = true} of array) { } //// [for-of43.js] -var array = [{ x: "", y: 0 }]; +var array = [ + { + x: "", + y: 0 + } +]; for (var { x: a = "", y: b = true } of array) { a; b; diff --git a/tests/baselines/reference/for-of44.js b/tests/baselines/reference/for-of44.js index 087485ed73f..9d4745d1366 100644 --- a/tests/baselines/reference/for-of44.js +++ b/tests/baselines/reference/for-of44.js @@ -6,7 +6,20 @@ for (var [num, strBoolSym] of array) { } //// [for-of44.js] -var array = [[0, ""], [0, true], [1, Symbol()]]; +var array = [ + [ + 0, + "" + ], + [ + 0, + true + ], + [ + 1, + Symbol() + ] +]; for (var [num, strBoolSym] of array) { num; strBoolSym; diff --git a/tests/baselines/reference/for-of45.js b/tests/baselines/reference/for-of45.js index 1222b2dcdd5..3394c50c215 100644 --- a/tests/baselines/reference/for-of45.js +++ b/tests/baselines/reference/for-of45.js @@ -8,8 +8,16 @@ for ([k = "", v = false] of map) { //// [for-of45.js] var k, v; -var map = new Map([["", true]]); -for ([k = "", v = false] of map) { +var map = new Map([ + [ + "", + true + ] +]); +for ([ + k = "", + v = false +] of map) { k; v; } diff --git a/tests/baselines/reference/for-of46.js b/tests/baselines/reference/for-of46.js index 2ea15936c54..7146993513c 100644 --- a/tests/baselines/reference/for-of46.js +++ b/tests/baselines/reference/for-of46.js @@ -8,8 +8,16 @@ for ([k = false, v = ""] of map) { //// [for-of46.js] var k, v; -var map = new Map([["", true]]); -for ([k = false, v = ""] of map) { +var map = new Map([ + [ + "", + true + ] +]); +for ([ + k = false, + v = "" +] of map) { k; v; } diff --git a/tests/baselines/reference/for-of47.js b/tests/baselines/reference/for-of47.js index b2de46d677f..f5e03dce571 100644 --- a/tests/baselines/reference/for-of47.js +++ b/tests/baselines/reference/for-of47.js @@ -9,12 +9,20 @@ for ({x, y: y = E.x} of array) { //// [for-of47.js] var x, y; -var array = [{ x: "", y: true }]; +var array = [ + { + x: "", + y: true + } +]; var E; (function (E) { E[E["x"] = 0] = "x"; })(E || (E = {})); -for ({ x, y: y = 0 /* x */ } of array) { +for ({ + x, + y: y = 0 /* x */ +} of array) { x; y; } diff --git a/tests/baselines/reference/for-of48.js b/tests/baselines/reference/for-of48.js index 15b9f5f12f6..3b96f460e97 100644 --- a/tests/baselines/reference/for-of48.js +++ b/tests/baselines/reference/for-of48.js @@ -9,12 +9,20 @@ for ({x, y = E.x} of array) { //// [for-of48.js] var x, y; -var array = [{ x: "", y: true }]; +var array = [ + { + x: "", + y: true + } +]; var E; (function (E) { E[E["x"] = 0] = "x"; })(E || (E = {})); -for ({ x, y: = 0 /* x */ } of array) { +for ({ + x, + y: = 0 /* x */ +} of array) { x; y; } diff --git a/tests/baselines/reference/for-of49.js b/tests/baselines/reference/for-of49.js index ac7f99f3607..ad3bc415d1d 100644 --- a/tests/baselines/reference/for-of49.js +++ b/tests/baselines/reference/for-of49.js @@ -8,8 +8,18 @@ for ([k, ...[v]] of map) { //// [for-of49.js] var k, v; -var map = new Map([["", true]]); -for ([k, ...[v]] of map) { +var map = new Map([ + [ + "", + true + ] +]); +for ([ + k, + ...[ + v + ] +] of map) { k; v; } diff --git a/tests/baselines/reference/for-of5.js b/tests/baselines/reference/for-of5.js index 4d93b0bd483..374e1aa79a0 100644 --- a/tests/baselines/reference/for-of5.js +++ b/tests/baselines/reference/for-of5.js @@ -4,6 +4,8 @@ for (let v of [0]) { } //// [for-of5.js] -for (let v of [0]) { +for (let v of [ + 0 +]) { v; } diff --git a/tests/baselines/reference/for-of50.js b/tests/baselines/reference/for-of50.js index a300812e6a9..21e6f1e7325 100644 --- a/tests/baselines/reference/for-of50.js +++ b/tests/baselines/reference/for-of50.js @@ -6,7 +6,12 @@ for (const [k, v] of map) { } //// [for-of50.js] -var map = new Map([["", true]]); +var map = new Map([ + [ + "", + true + ] +]); for (const [k, v] of map) { k; v; diff --git a/tests/baselines/reference/for-of51.js b/tests/baselines/reference/for-of51.js index cae8c8b38fe..29b907b0f80 100644 --- a/tests/baselines/reference/for-of51.js +++ b/tests/baselines/reference/for-of51.js @@ -2,4 +2,5 @@ for (let let of []) {} //// [for-of51.js] -for (let let of []) { } +for (let let of []) { +} diff --git a/tests/baselines/reference/for-of52.js b/tests/baselines/reference/for-of52.js index 48e1dca936c..066dd4f81ac 100644 --- a/tests/baselines/reference/for-of52.js +++ b/tests/baselines/reference/for-of52.js @@ -2,4 +2,7 @@ for (let [v, v] of [[]]) {} //// [for-of52.js] -for (let [v, v] of [[]]) { } +for (let [v, v] of [ + [] +]) { +} diff --git a/tests/baselines/reference/for-of55.js b/tests/baselines/reference/for-of55.js index a0f949c6ce5..30baacc8b13 100644 --- a/tests/baselines/reference/for-of55.js +++ b/tests/baselines/reference/for-of55.js @@ -5,7 +5,9 @@ for (let v of v) { } //// [for-of55.js] -let v = [1]; +let v = [ + 1 +]; for (let v of v) { v; } diff --git a/tests/baselines/reference/for-of56.js b/tests/baselines/reference/for-of56.js index 0992b9c0bb9..5d540151c12 100644 --- a/tests/baselines/reference/for-of56.js +++ b/tests/baselines/reference/for-of56.js @@ -2,4 +2,5 @@ for (var let of []) {} //// [for-of56.js] -for (var let of []) { } +for (var let of []) { +} diff --git a/tests/baselines/reference/for-of6.js b/tests/baselines/reference/for-of6.js index 24e93e2a9fd..f176488595a 100644 --- a/tests/baselines/reference/for-of6.js +++ b/tests/baselines/reference/for-of6.js @@ -4,6 +4,8 @@ for (v of [0]) { } //// [for-of6.js] -for (v of [0]) { +for (v of [ + 0 +]) { let v; } diff --git a/tests/baselines/reference/for-of7.js b/tests/baselines/reference/for-of7.js index 04aadd9736a..9bc205676d7 100644 --- a/tests/baselines/reference/for-of7.js +++ b/tests/baselines/reference/for-of7.js @@ -4,4 +4,7 @@ for (let v of [0]) { } //// [for-of7.js] v; -for (let v of [0]) { } +for (let v of [ + 0 +]) { +} diff --git a/tests/baselines/reference/for-of8.js b/tests/baselines/reference/for-of8.js index f33d69166dc..d5219780446 100644 --- a/tests/baselines/reference/for-of8.js +++ b/tests/baselines/reference/for-of8.js @@ -4,4 +4,7 @@ for (var v of [0]) { } //// [for-of8.js] v; -for (var v of [0]) { } +for (var v of [ + 0 +]) { +} diff --git a/tests/baselines/reference/for-of9.js b/tests/baselines/reference/for-of9.js index f96d353bd7a..b53092414ad 100644 --- a/tests/baselines/reference/for-of9.js +++ b/tests/baselines/reference/for-of9.js @@ -5,5 +5,9 @@ for (v of "hello") { } //// [for-of9.js] var v; -for (v of ["hello"]) { } -for (v of "hello") { } +for (v of [ + "hello" +]) { +} +for (v of "hello") { +} diff --git a/tests/baselines/reference/forBreakStatements.js b/tests/baselines/reference/forBreakStatements.js index 9ed65627c9c..017837cded4 100644 --- a/tests/baselines/reference/forBreakStatements.js +++ b/tests/baselines/reference/forBreakStatements.js @@ -61,6 +61,7 @@ SEVEN: for (;;) for (;;) break SEVEN; EIGHT: for (;;) { - var fn = function () { }; + var fn = function () { + }; break EIGHT; } diff --git a/tests/baselines/reference/forContinueStatements.js b/tests/baselines/reference/forContinueStatements.js index 34f70bb1fc1..b1ace24f4b1 100644 --- a/tests/baselines/reference/forContinueStatements.js +++ b/tests/baselines/reference/forContinueStatements.js @@ -61,6 +61,7 @@ SEVEN: for (;;) for (;;) continue SEVEN; EIGHT: for (;;) { - var fn = function () { }; + var fn = function () { + }; continue EIGHT; } diff --git a/tests/baselines/reference/forInBreakStatements.js b/tests/baselines/reference/forInBreakStatements.js index 24b7cc57b8d..09f0071d4bf 100644 --- a/tests/baselines/reference/forInBreakStatements.js +++ b/tests/baselines/reference/forInBreakStatements.js @@ -61,6 +61,7 @@ SEVEN: for (var x in {}) for (var x in {}) break SEVEN; EIGHT: for (var x in {}) { - var fn = function () { }; + var fn = function () { + }; break EIGHT; } diff --git a/tests/baselines/reference/forInContinueStatements.js b/tests/baselines/reference/forInContinueStatements.js index 8b036c59721..68cac5221ae 100644 --- a/tests/baselines/reference/forInContinueStatements.js +++ b/tests/baselines/reference/forInContinueStatements.js @@ -61,6 +61,7 @@ SEVEN: for (var x in {}) for (var x in {}) continue SEVEN; EIGHT: for (var x in {}) { - var fn = function () { }; + var fn = function () { + }; continue EIGHT; } diff --git a/tests/baselines/reference/forStatements.js b/tests/baselines/reference/forStatements.js index 39fdb6c8871..12f1c691cc5 100644 --- a/tests/baselines/reference/forStatements.js +++ b/tests/baselines/reference/forStatements.js @@ -57,7 +57,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -66,24 +68,50 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); -for (var aNumber = 9.9;;) { } -for (var aString = 'this is a string';;) { } -for (var aDate = new Date(12);;) { } -for (var anObject = new Object();;) { } -for (var anAny = null;;) { } -for (var aSecondAny = undefined;;) { } -for (var aVoid = undefined;;) { } -for (var anInterface = new C();;) { } -for (var aClass = new C();;) { } -for (var aGenericClass = new D();;) { } -for (var anObjectLiteral = { id: 12 };;) { } -for (var anOtherObjectLiteral = new C();;) { } -for (var aFunction = F;;) { } -for (var anOtherFunction = F;;) { } -for (var aLambda = function (x) { return 2; };;) { } -for (var aModule = M;;) { } -for (var aClassInModule = new M.A();;) { } -for (var aFunctionInModule = function (x) { return 'this is a string'; };;) { } +for (var aNumber = 9.9;;) { +} +for (var aString = 'this is a string';;) { +} +for (var aDate = new Date(12);;) { +} +for (var anObject = new Object();;) { +} +for (var anAny = null;;) { +} +for (var aSecondAny = undefined;;) { +} +for (var aVoid = undefined;;) { +} +for (var anInterface = new C();;) { +} +for (var aClass = new C();;) { +} +for (var aGenericClass = new D();;) { +} +for (var anObjectLiteral = { + id: 12 +};;) { +} +for (var anOtherObjectLiteral = new C();;) { +} +for (var aFunction = F;;) { +} +for (var anOtherFunction = F;;) { +} +for (var aLambda = function (x) { + return 2; +};;) { +} +for (var aModule = M;;) { +} +for (var aClassInModule = new M.A();;) { +} +for (var aFunctionInModule = function (x) { + return 'this is a string'; +};;) { +} diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 2282136be3a..40888c7ce8b 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -77,7 +77,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -86,25 +88,58 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); // all of these are errors -for (var a;;) { } -for (var a = 1;;) { } -for (var a = 'a string';;) { } -for (var a = new C();;) { } -for (var a = new D();;) { } -for (var a = M;;) { } -for (var b;;) { } -for (var b = new C();;) { } -for (var b = new C2();;) { } -for (var f = F;;) { } -for (var f = function (x) { return ''; };;) { } -for (var arr;;) { } -for (var arr = [1, 2, 3, 4];;) { } -for (var arr = [new C(), new C2(), new D()];;) { } -for (var arr2 = [new D()];;) { } -for (var arr2 = new Array();;) { } -for (var m;;) { } -for (var m = M.A;;) { } +for (var a;;) { +} +for (var a = 1;;) { +} +for (var a = 'a string';;) { +} +for (var a = new C();;) { +} +for (var a = new D();;) { +} +for (var a = M;;) { +} +for (var b;;) { +} +for (var b = new C();;) { +} +for (var b = new C2();;) { +} +for (var f = F;;) { +} +for (var f = function (x) { + return ''; +};;) { +} +for (var arr;;) { +} +for (var arr = [ + 1, + 2, + 3, + 4 +];;) { +} +for (var arr = [ + new C(), + new C2(), + new D() +];;) { +} +for (var arr2 = [ + new D() +];;) { +} +for (var arr2 = new Array();;) { +} +for (var m;;) { +} +for (var m = M.A;;) { +} diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.js b/tests/baselines/reference/forStatementsMultipleValidDecl.js index e95e37d63ac..aaf88edfe8b 100644 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleValidDecl.js @@ -35,29 +35,74 @@ for (var a: typeof a; ;) { } //// [forStatementsMultipleValidDecl.js] // all expected to be valid -for (var x;;) { } -for (var x = 2;;) { } -for (var x = undefined;;) { } +for (var x;;) { +} +for (var x = 2;;) { +} +for (var x = undefined;;) { +} // new declaration space, making redeclaring x as a string valid function declSpace() { - for (var x = 'this is a string';;) { } + for (var x = 'this is a string';;) { + } +} +for (var p;;) { +} +for (var p = { + x: 1, + y: 2 +};;) { +} +for (var p = { + x: 0, + y: undefined +};;) { +} +for (var p = { + x: 1, + y: undefined +};;) { +} +for (var p = { + x: 1, + y: 2 +};;) { +} +for (var p = { + x: 0, + y: undefined +};;) { +} +for (var p;;) { +} +for (var fn = function (s) { + return 42; +};;) { +} +for (var fn = function (s) { + return 3; +};;) { +} +for (var fn;;) { +} +for (var fn;;) { +} +for (var fn = null;;) { +} +for (var fn;;) { +} +for (var a;;) { +} +for (var a = [ + 'a', + 'b' +];;) { +} +for (var a = [];;) { +} +for (var a = [];;) { +} +for (var a = new Array();;) { +} +for (var a;;) { } -for (var p;;) { } -for (var p = { x: 1, y: 2 };;) { } -for (var p = { x: 0, y: undefined };;) { } -for (var p = { x: 1, y: undefined };;) { } -for (var p = { x: 1, y: 2 };;) { } -for (var p = { x: 0, y: undefined };;) { } -for (var p;;) { } -for (var fn = function (s) { return 42; };;) { } -for (var fn = function (s) { return 3; };;) { } -for (var fn;;) { } -for (var fn;;) { } -for (var fn = null;;) { } -for (var fn;;) { } -for (var a;;) { } -for (var a = ['a', 'b'];;) { } -for (var a = [];;) { } -for (var a = [];;) { } -for (var a = new Array();;) { } -for (var a;;) { } diff --git a/tests/baselines/reference/funClodule.js b/tests/baselines/reference/funClodule.js index cc7dba7e476..8629ed63055 100644 --- a/tests/baselines/reference/funClodule.js +++ b/tests/baselines/reference/funClodule.js @@ -20,10 +20,12 @@ module foo3 { class foo3 { } // Should error //// [funClodule.js] -function foo3() { } +function foo3() { +} var foo3; (function (foo3) { - function x() { } + function x() { + } foo3.x = x; })(foo3 || (foo3 = {})); var foo3 = (function () { diff --git a/tests/baselines/reference/funcdecl.js b/tests/baselines/reference/funcdecl.js index 348d25bd670..de080873b9f 100644 --- a/tests/baselines/reference/funcdecl.js +++ b/tests/baselines/reference/funcdecl.js @@ -115,7 +115,8 @@ function overload1(ns) { return ns.toString(); } var withOverloadSignature = overload1; -function f(n) { } +function f(n) { +} var m2; (function (m2) { function foo(n) { diff --git a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js index d59cff501ed..004e65d92af 100644 --- a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js +++ b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js @@ -8,4 +8,5 @@ interface Foo { } //// [functionAndInterfaceWithSeparateErrors.js] -function Foo(n) { } +function Foo(n) { +} diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.js b/tests/baselines/reference/functionAndPropertyNameConflict.js index 28a2cd54c9e..1368f8241d5 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.js +++ b/tests/baselines/reference/functionAndPropertyNameConflict.js @@ -10,7 +10,8 @@ class C65 { var C65 = (function () { function C65() { } - C65.prototype.aaaaa = function () { }; + C65.prototype.aaaaa = function () { + }; Object.defineProperty(C65.prototype, "aaaaa", { get: function () { return 1; diff --git a/tests/baselines/reference/functionArgShadowing.js b/tests/baselines/reference/functionArgShadowing.js index 451e46536e0..c74570902ed 100644 --- a/tests/baselines/reference/functionArgShadowing.js +++ b/tests/baselines/reference/functionArgShadowing.js @@ -18,13 +18,15 @@ class C { var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); function foo(x) { diff --git a/tests/baselines/reference/functionAssignment.js b/tests/baselines/reference/functionAssignment.js index 3237f53bf9a..52b66946500 100644 --- a/tests/baselines/reference/functionAssignment.js +++ b/tests/baselines/reference/functionAssignment.js @@ -38,19 +38,30 @@ callb((a) =>{ a.length; }); //// [functionAssignment.js] -function f(n) { } -f(function () { }); +function f(n) { +} +f(function () { +}); var barbaz; var test; test.get(function (param) { - var x = barbaz.get(function () { }); + var x = barbaz.get(function () { + }); }); -function f2(n) { } +function f2(n) { +} f2(function () { var n = ''; n = 4; }); -function f3(a) { } -f3({ a: 0, b: 0 }); -function callb(a) { } -callb(function (a) { a.length; }); +function f3(a) { +} +f3({ + a: 0, + b: 0 +}); +function callb(a) { +} +callb(function (a) { + a.length; +}); diff --git a/tests/baselines/reference/functionAssignmentError.js b/tests/baselines/reference/functionAssignmentError.js index dd35ccb271a..e19547096b8 100644 --- a/tests/baselines/reference/functionAssignmentError.js +++ b/tests/baselines/reference/functionAssignmentError.js @@ -3,5 +3,9 @@ var func = function (){return "ONE";}; func = function (){return "ONE";}; //// [functionAssignmentError.js] -var func = function () { return "ONE"; }; -func = function () { return "ONE"; }; +var func = function () { + return "ONE"; +}; +func = function () { + return "ONE"; +}; diff --git a/tests/baselines/reference/functionCall1.js b/tests/baselines/reference/functionCall1.js index cb8c1a46a23..8025ad5a6f5 100644 --- a/tests/baselines/reference/functionCall1.js +++ b/tests/baselines/reference/functionCall1.js @@ -3,6 +3,8 @@ function foo():any{return ""}; var x = foo(); //// [functionCall1.js] -function foo() { return ""; } +function foo() { + return ""; +} ; var x = foo(); diff --git a/tests/baselines/reference/functionCall11.js b/tests/baselines/reference/functionCall11.js index 019ea213dbc..9c36dedba36 100644 --- a/tests/baselines/reference/functionCall11.js +++ b/tests/baselines/reference/functionCall11.js @@ -8,7 +8,8 @@ foo('foo', 1, 'bar'); //// [functionCall11.js] -function foo(a, b) { } +function foo(a, b) { +} foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall12.js b/tests/baselines/reference/functionCall12.js index 2c3396c209a..ca71c25a172 100644 --- a/tests/baselines/reference/functionCall12.js +++ b/tests/baselines/reference/functionCall12.js @@ -9,7 +9,8 @@ foo('foo', 1, 3); //// [functionCall12.js] -function foo(a, b, c) { } +function foo(a, b, c) { +} foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall2.js b/tests/baselines/reference/functionCall2.js index 5351dc116ff..5b6da378103 100644 --- a/tests/baselines/reference/functionCall2.js +++ b/tests/baselines/reference/functionCall2.js @@ -3,6 +3,8 @@ function foo():number{return 1}; var x = foo(); //// [functionCall2.js] -function foo() { return 1; } +function foo() { + return 1; +} ; var x = foo(); diff --git a/tests/baselines/reference/functionCall3.js b/tests/baselines/reference/functionCall3.js index 74540c2ccf6..0e229ccddbf 100644 --- a/tests/baselines/reference/functionCall3.js +++ b/tests/baselines/reference/functionCall3.js @@ -3,5 +3,9 @@ function foo():any[]{return [1];} var x = foo(); //// [functionCall3.js] -function foo() { return [1]; } +function foo() { + return [ + 1 + ]; +} var x = foo(); diff --git a/tests/baselines/reference/functionCall4.js b/tests/baselines/reference/functionCall4.js index 0f937337d49..05021c33563 100644 --- a/tests/baselines/reference/functionCall4.js +++ b/tests/baselines/reference/functionCall4.js @@ -4,8 +4,12 @@ function bar():()=>any{return foo}; var x = bar(); //// [functionCall4.js] -function foo() { return ""; } +function foo() { + return ""; +} ; -function bar() { return foo; } +function bar() { + return foo; +} ; var x = bar(); diff --git a/tests/baselines/reference/functionCall5.js b/tests/baselines/reference/functionCall5.js index dc7db4a9959..e6b0e049ef6 100644 --- a/tests/baselines/reference/functionCall5.js +++ b/tests/baselines/reference/functionCall5.js @@ -13,6 +13,8 @@ var m1; })(); m1.c1 = c1; })(m1 || (m1 = {})); -function foo() { return new m1.c1(); } +function foo() { + return new m1.c1(); +} ; var x = foo(); diff --git a/tests/baselines/reference/functionCall6.js b/tests/baselines/reference/functionCall6.js index 01197a5fd8d..21582666b94 100644 --- a/tests/baselines/reference/functionCall6.js +++ b/tests/baselines/reference/functionCall6.js @@ -7,7 +7,8 @@ foo(); //// [functionCall6.js] -function foo(a) { } +function foo(a) { +} ; foo('bar'); foo(2); diff --git a/tests/baselines/reference/functionCall7.js b/tests/baselines/reference/functionCall7.js index cb30e5d8b24..b32c21b5892 100644 --- a/tests/baselines/reference/functionCall7.js +++ b/tests/baselines/reference/functionCall7.js @@ -18,7 +18,9 @@ var m1; })(); m1.c1 = c1; })(m1 || (m1 = {})); -function foo(a) { a.a = 1; } +function foo(a) { + a.a = 1; +} ; var myC = new m1.c1(); foo(myC); diff --git a/tests/baselines/reference/functionCall8.js b/tests/baselines/reference/functionCall8.js index 5859fdfb375..7eb5a9f60d9 100644 --- a/tests/baselines/reference/functionCall8.js +++ b/tests/baselines/reference/functionCall8.js @@ -7,7 +7,8 @@ foo(); //// [functionCall8.js] -function foo(a) { } +function foo(a) { +} foo('foo'); foo('foo', 'bar'); foo(4); diff --git a/tests/baselines/reference/functionCall9.js b/tests/baselines/reference/functionCall9.js index bc7e112f0c8..d2d81a3ca04 100644 --- a/tests/baselines/reference/functionCall9.js +++ b/tests/baselines/reference/functionCall9.js @@ -7,7 +7,8 @@ foo('foo', 1, 'bar'); foo(); //// [functionCall9.js] -function foo(a, b) { } +function foo(a, b) { +} ; foo('foo', 1); foo('foo'); diff --git a/tests/baselines/reference/functionConstraintSatisfaction.js b/tests/baselines/reference/functionConstraintSatisfaction.js index b8741456178..20c5df00987 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction.js +++ b/tests/baselines/reference/functionConstraintSatisfaction.js @@ -63,7 +63,9 @@ function foo2(x: T, y: U) { //// [functionConstraintSatisfaction.js] // satisfaction of a constraint to Function, no errors expected -function foo(x) { return x; } +function foo(x) { + return x; +} var i; var C = (function () { function C() { @@ -74,10 +76,18 @@ var a; var b; var c; var r = foo(new Function()); -var r1 = foo(function (x) { return x; }); -var r2 = foo(function (x) { return x; }); -var r3 = foo(function (x) { return x; }); -var r4 = foo(function (x) { return x; }); +var r1 = foo(function (x) { + return x; +}); +var r2 = foo(function (x) { + return x; +}); +var r3 = foo(function (x) { + return x; +}); +var r4 = foo(function (x) { + return x; +}); var r5 = foo(i); var r6 = foo(C); var r7 = foo(b); @@ -91,10 +101,18 @@ var C2 = (function () { var a2; var b2; var c2; -var r9 = foo(function (x) { return x; }); -var r10 = foo(function (x) { return x; }); -var r11 = foo(function (x) { return x; }); -var r12 = foo(function (x, y) { return x; }); +var r9 = foo(function (x) { + return x; +}); +var r10 = foo(function (x) { + return x; +}); +var r11 = foo(function (x) { + return x; +}); +var r12 = foo(function (x, y) { + return x; +}); var r13 = foo(i2); var r14 = foo(C2); var r15 = foo(b2); diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.js b/tests/baselines/reference/functionConstraintSatisfaction2.js index 9e70a508ccd..45757759536 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.js +++ b/tests/baselines/reference/functionConstraintSatisfaction2.js @@ -42,11 +42,17 @@ function fff(x: T, y: U) { //// [functionConstraintSatisfaction2.js] // satisfaction of a constraint to Function, all of these invocations are errors unless otherwise noted -function foo(x) { return x; } +function foo(x) { + return x; +} foo(1); -foo(function () { }, 1); -foo(1, function () { }); -function foo2(x) { return x; } +foo(function () { +}, 1); +foo(1, function () { +}); +function foo2(x) { + return x; +} var C = (function () { function C() { } @@ -60,11 +66,17 @@ var C2 = (function () { })(); var b2; var r = foo2(new Function()); -var r2 = foo2(function (x) { return x; }); +var r2 = foo2(function (x) { + return x; +}); var r6 = foo2(C); var r7 = foo2(b); -var r8 = foo2(function (x) { return x; }); // no error expected -var r11 = foo2(function (x, y) { return x; }); +var r8 = foo2(function (x) { + return x; +}); // no error expected +var r11 = foo2(function (x, y) { + return x; +}); var r13 = foo2(C2); var r14 = foo2(b2); var f2; diff --git a/tests/baselines/reference/functionConstraintSatisfaction3.js b/tests/baselines/reference/functionConstraintSatisfaction3.js index 2c1bfa4d399..a33c2c6408d 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction3.js +++ b/tests/baselines/reference/functionConstraintSatisfaction3.js @@ -43,7 +43,9 @@ var r15 = foo(c2); //// [functionConstraintSatisfaction3.js] // satisfaction of a constraint to Function, no errors expected -function foo(x) { return x; } +function foo(x) { + return x; +} var i; var C = (function () { function C() { @@ -53,10 +55,18 @@ var C = (function () { var a; var b; var c; -var r1 = foo(function (x) { return x; }); -var r2 = foo(function (x) { return x; }); -var r3 = foo(function (x) { return x; }); -var r4 = foo(function (x) { return x; }); +var r1 = foo(function (x) { + return x; +}); +var r2 = foo(function (x) { + return x; +}); +var r3 = foo(function (x) { + return x; +}); +var r4 = foo(function (x) { + return x; +}); var r5 = foo(i); var r8 = foo(c); var i2; @@ -68,7 +78,11 @@ var C2 = (function () { var a2; var b2; var c2; -var r9 = foo(function (x) { return x; }); -var r10 = foo(function (x) { return x; }); +var r9 = foo(function (x) { + return x; +}); +var r10 = foo(function (x) { + return x; +}); var r12 = foo(i2); var r15 = foo(c2); diff --git a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js index fe10f96f7bb..2c882b82857 100644 --- a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js +++ b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js @@ -14,8 +14,11 @@ var CDoc = (function () { function CDoc() { function doSomething(a) { } - doSomething(function () { return undefined; }); - doSomething(function () { }); + doSomething(function () { + return undefined; + }); + doSomething(function () { + }); } return CDoc; })(); diff --git a/tests/baselines/reference/functionExpressionInWithBlock.js b/tests/baselines/reference/functionExpressionInWithBlock.js index f2353412d5c..5e06ad8169a 100644 --- a/tests/baselines/reference/functionExpressionInWithBlock.js +++ b/tests/baselines/reference/functionExpressionInWithBlock.js @@ -11,7 +11,9 @@ function x() { function x() { with ({}) { function f() { - (function () { return this; }); + (function () { + return this; + }); } } } diff --git a/tests/baselines/reference/functionExpressionReturningItself.js b/tests/baselines/reference/functionExpressionReturningItself.js index 9485100164e..8553d2da867 100644 --- a/tests/baselines/reference/functionExpressionReturningItself.js +++ b/tests/baselines/reference/functionExpressionReturningItself.js @@ -2,7 +2,9 @@ var x = function somefn() { return somefn; }; //// [functionExpressionReturningItself.js] -var x = function somefn() { return somefn; }; +var x = function somefn() { + return somefn; +}; //// [functionExpressionReturningItself.d.ts] diff --git a/tests/baselines/reference/functionImplementationErrors.js b/tests/baselines/reference/functionImplementationErrors.js index 5eaf9027335..95b0d9e700b 100644 --- a/tests/baselines/reference/functionImplementationErrors.js +++ b/tests/baselines/reference/functionImplementationErrors.js @@ -96,10 +96,14 @@ var f3 = function () { // FunctionExpression with no return type annotation with return branch of number[] and other of string[] var f4 = function () { if (true) { - return ['']; + return [ + '' + ]; } else { - return [1]; + return [ + 1 + ]; } }; // Function implemetnation with non -void return type annotation with no return diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index c478f892fd5..e3a498dbeb2 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -164,7 +164,8 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // FunctionExpression with no return type annotation and no return statement returns void -var v = function () { }(); +var v = function () { +}(); // FunctionExpression f with no return type annotation and directly references f in its body returns any var a = function f() { return f; @@ -268,7 +269,10 @@ function opt1(n) { } // Function signature with optional parameter, no type annotation and initializer has initializer's widened type function opt2(n) { - if (n === void 0) { n = { x: null, y: undefined }; } + if (n === void 0) { n = { + x: null, + y: undefined + }; } var m = n; var m; } diff --git a/tests/baselines/reference/functionLiteral.js b/tests/baselines/reference/functionLiteral.js index 8ee515e8f8c..bf42f9e859a 100644 --- a/tests/baselines/reference/functionLiteral.js +++ b/tests/baselines/reference/functionLiteral.js @@ -15,10 +15,14 @@ var z: new (x: number) => number; //// [functionLiteral.js] // basic valid forms of function literals -var x = function () { return 1; }; +var x = function () { + return 1; +}; var x; var y; var y; -var y2 = function (x) { return x; }; +var y2 = function (x) { + return x; +}; var z; var z; diff --git a/tests/baselines/reference/functionLiteralForOverloads.js b/tests/baselines/reference/functionLiteralForOverloads.js index 1a0bc874c48..06631101e0f 100644 --- a/tests/baselines/reference/functionLiteralForOverloads.js +++ b/tests/baselines/reference/functionLiteralForOverloads.js @@ -23,7 +23,15 @@ var f4: { //// [functionLiteralForOverloads.js] // basic uses of function literals with overloads -var f = function (x) { return x; }; -var f2 = function (x) { return x; }; -var f3 = function (x) { return x; }; -var f4 = function (x) { return x; }; +var f = function (x) { + return x; +}; +var f2 = function (x) { + return x; +}; +var f3 = function (x) { + return x; +}; +var f4 = function (x) { + return x; +}; diff --git a/tests/baselines/reference/functionNameConflicts.js b/tests/baselines/reference/functionNameConflicts.js index 87b61e3733d..99ede14dfde 100644 --- a/tests/baselines/reference/functionNameConflicts.js +++ b/tests/baselines/reference/functionNameConflicts.js @@ -32,17 +32,22 @@ function overrr() { //Function overload with different name from implementation signature var M; (function (M) { - function fn1() { } + function fn1() { + } var fn1; var fn2; - function fn2() { } + function fn2() { + } })(M || (M = {})); -function fn3() { } +function fn3() { +} var fn3; function func() { var fn4; - function fn4() { } - function fn5() { } + function fn4() { + } + function fn5() { + } var fn5; } function overrr() { diff --git a/tests/baselines/reference/functionOverloadAmbiguity1.js b/tests/baselines/reference/functionOverloadAmbiguity1.js index 2833ccbcdc3..d53ec68c9d9 100644 --- a/tests/baselines/reference/functionOverloadAmbiguity1.js +++ b/tests/baselines/reference/functionOverloadAmbiguity1.js @@ -11,7 +11,13 @@ callb2((a) => { a.length; } ); // ok, chose first overload //// [functionOverloadAmbiguity1.js] -function callb(a) { } -callb(function (a) { a.length; }); // error, chose first overload -function callb2(a) { } -callb2(function (a) { a.length; }); // ok, chose first overload +function callb(a) { +} +callb(function (a) { + a.length; +}); // error, chose first overload +function callb2(a) { +} +callb2(function (a) { + a.length; +}); // ok, chose first overload diff --git a/tests/baselines/reference/functionOverloadErrors.js b/tests/baselines/reference/functionOverloadErrors.js index b0c0f449456..623b0e6f4dc 100644 --- a/tests/baselines/reference/functionOverloadErrors.js +++ b/tests/baselines/reference/functionOverloadErrors.js @@ -119,7 +119,8 @@ function initExpr() { } //// [functionOverloadErrors.js] -function fn1() { } +function fn1() { +} function fn2a() { } function fn2b() { @@ -127,37 +128,52 @@ function fn2b() { function fn3() { return null; } -function fn6() { } -function fn7() { } -function fn8() { } -function fn9() { } -function fn10() { } -function fn11() { } -function fn12() { } +function fn6() { +} +function fn7() { +} +function fn8() { +} +function fn9() { +} +function fn10() { +} +function fn11() { +} +function fn12() { +} //Function overloads that differ by accessibility var cls = (function () { function cls() { } - cls.prototype.f = function () { }; - cls.prototype.g = function () { }; + cls.prototype.f = function () { + }; + cls.prototype.g = function () { + }; return cls; })(); //Function overloads with differing export var M; (function (M) { - function fn1() { } - function fn2() { } + function fn1() { + } + function fn2() { + } M.fn2 = fn2; })(M || (M = {})); -function dfn1() { } -function dfn2() { } +function dfn1() { +} +function dfn2() { +} function fewerParams(n) { } -function fn13(n) { } +function fn13(n) { +} function fn14() { return 3; } function fn15() { return undefined; } -function initExpr() { } +function initExpr() { +} diff --git a/tests/baselines/reference/functionOverloadErrorsSyntax.js b/tests/baselines/reference/functionOverloadErrorsSyntax.js index 1a5537d2de2..3706f4da744 100644 --- a/tests/baselines/reference/functionOverloadErrorsSyntax.js +++ b/tests/baselines/reference/functionOverloadErrorsSyntax.js @@ -12,6 +12,9 @@ function fn5() { } //// [functionOverloadErrorsSyntax.js] -function fn4a() { } -function fn4b() { } -function fn5() { } +function fn4a() { +} +function fn4b() { +} +function fn5() { +} diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName.js b/tests/baselines/reference/functionOverloadImplementationOfWrongName.js index 465753f1040..6b66bc89ffa 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName.js +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName.js @@ -4,4 +4,5 @@ function foo(x, y); function bar() { } //// [functionOverloadImplementationOfWrongName.js] -function bar() { } +function bar() { +} diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js index 34cf73d3239..c3008e7a6c2 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js @@ -4,4 +4,5 @@ function bar() { } function foo(x, y); //// [functionOverloadImplementationOfWrongName2.js] -function bar() { } +function bar() { +} diff --git a/tests/baselines/reference/functionOverloads.js b/tests/baselines/reference/functionOverloads.js index 7e38b8fe993..5504b286628 100644 --- a/tests/baselines/reference/functionOverloads.js +++ b/tests/baselines/reference/functionOverloads.js @@ -5,6 +5,8 @@ function foo(bar?: string): any { return "" }; var x = foo(5); //// [functionOverloads.js] -function foo(bar) { return ""; } +function foo(bar) { + return ""; +} ; var x = foo(5); diff --git a/tests/baselines/reference/functionOverloads1.js b/tests/baselines/reference/functionOverloads1.js index 5b4acabd02c..695a9c37808 100644 --- a/tests/baselines/reference/functionOverloads1.js +++ b/tests/baselines/reference/functionOverloads1.js @@ -5,4 +5,6 @@ function foo():string { return "a" } //// [functionOverloads1.js] 1 + 1; -function foo() { return "a"; } +function foo() { + return "a"; +} diff --git a/tests/baselines/reference/functionOverloads10.js b/tests/baselines/reference/functionOverloads10.js index 08b71698dce..2cd24bcd1cb 100644 --- a/tests/baselines/reference/functionOverloads10.js +++ b/tests/baselines/reference/functionOverloads10.js @@ -5,4 +5,5 @@ function foo(foo:any){ } //// [functionOverloads10.js] -function foo(foo) { } +function foo(foo) { +} diff --git a/tests/baselines/reference/functionOverloads11.js b/tests/baselines/reference/functionOverloads11.js index 8d85b0ffb7b..efc9c793125 100644 --- a/tests/baselines/reference/functionOverloads11.js +++ b/tests/baselines/reference/functionOverloads11.js @@ -4,4 +4,6 @@ function foo():string { return "" } //// [functionOverloads11.js] -function foo() { return ""; } +function foo() { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads12.js b/tests/baselines/reference/functionOverloads12.js index 4681e43ee5b..ff789083eeb 100644 --- a/tests/baselines/reference/functionOverloads12.js +++ b/tests/baselines/reference/functionOverloads12.js @@ -5,7 +5,9 @@ function foo():any { if (true) return ""; else return 0;} //// [functionOverloads12.js] -function foo() { if (true) - return ""; -else - return 0; } +function foo() { + if (true) + return ""; + else + return 0; +} diff --git a/tests/baselines/reference/functionOverloads13.js b/tests/baselines/reference/functionOverloads13.js index ff43c85e3df..f9eb4d59e47 100644 --- a/tests/baselines/reference/functionOverloads13.js +++ b/tests/baselines/reference/functionOverloads13.js @@ -5,4 +5,6 @@ function foo(bar?:number):any { return "" } //// [functionOverloads13.js] -function foo(bar) { return ""; } +function foo(bar) { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads14.js b/tests/baselines/reference/functionOverloads14.js index 826b096290a..e580c4e2283 100644 --- a/tests/baselines/reference/functionOverloads14.js +++ b/tests/baselines/reference/functionOverloads14.js @@ -5,4 +5,8 @@ function foo():{a:any;} { return {a:1} } //// [functionOverloads14.js] -function foo() { return { a: 1 }; } +function foo() { + return { + a: 1 + }; +} diff --git a/tests/baselines/reference/functionOverloads15.js b/tests/baselines/reference/functionOverloads15.js index fe0c90f82af..2b80df6630c 100644 --- a/tests/baselines/reference/functionOverloads15.js +++ b/tests/baselines/reference/functionOverloads15.js @@ -5,4 +5,6 @@ function foo(foo:{a:string; b?:number;}):any { return "" } //// [functionOverloads15.js] -function foo(foo) { return ""; } +function foo(foo) { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads16.js b/tests/baselines/reference/functionOverloads16.js index a0fdaa88894..ebf82febd16 100644 --- a/tests/baselines/reference/functionOverloads16.js +++ b/tests/baselines/reference/functionOverloads16.js @@ -5,4 +5,6 @@ function foo(foo:{a:string; b?:number;}):any { return "" } //// [functionOverloads16.js] -function foo(foo) { return ""; } +function foo(foo) { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads17.js b/tests/baselines/reference/functionOverloads17.js index 3a5dcd81914..ef1a9e765fc 100644 --- a/tests/baselines/reference/functionOverloads17.js +++ b/tests/baselines/reference/functionOverloads17.js @@ -4,4 +4,8 @@ function foo():{a:string;} { return {a:""} } //// [functionOverloads17.js] -function foo() { return { a: "" }; } +function foo() { + return { + a: "" + }; +} diff --git a/tests/baselines/reference/functionOverloads18.js b/tests/baselines/reference/functionOverloads18.js index 8c196831e48..65a16c2896a 100644 --- a/tests/baselines/reference/functionOverloads18.js +++ b/tests/baselines/reference/functionOverloads18.js @@ -4,4 +4,8 @@ function foo(bar:{a:string;}) { return {a:""} } //// [functionOverloads18.js] -function foo(bar) { return { a: "" }; } +function foo(bar) { + return { + a: "" + }; +} diff --git a/tests/baselines/reference/functionOverloads19.js b/tests/baselines/reference/functionOverloads19.js index 4183f6a48b8..d5749d3eef2 100644 --- a/tests/baselines/reference/functionOverloads19.js +++ b/tests/baselines/reference/functionOverloads19.js @@ -5,4 +5,8 @@ function foo(bar:{a:any;}) { return {a:""} } //// [functionOverloads19.js] -function foo(bar) { return { a: "" }; } +function foo(bar) { + return { + a: "" + }; +} diff --git a/tests/baselines/reference/functionOverloads2.js b/tests/baselines/reference/functionOverloads2.js index 39a58663cf4..7e9eb45d236 100644 --- a/tests/baselines/reference/functionOverloads2.js +++ b/tests/baselines/reference/functionOverloads2.js @@ -5,6 +5,8 @@ function foo(bar: any): any { return bar }; var x = foo(true); //// [functionOverloads2.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} ; var x = foo(true); diff --git a/tests/baselines/reference/functionOverloads20.js b/tests/baselines/reference/functionOverloads20.js index 4f259a88538..012f2ce09cd 100644 --- a/tests/baselines/reference/functionOverloads20.js +++ b/tests/baselines/reference/functionOverloads20.js @@ -5,4 +5,6 @@ function foo(bar:{a:any;}): string {return ""} //// [functionOverloads20.js] -function foo(bar) { return ""; } +function foo(bar) { + return ""; +} diff --git a/tests/baselines/reference/functionOverloads21.js b/tests/baselines/reference/functionOverloads21.js index 6e69169efbf..78fb1fe011f 100644 --- a/tests/baselines/reference/functionOverloads21.js +++ b/tests/baselines/reference/functionOverloads21.js @@ -5,4 +5,6 @@ function foo(bar:{a:any; b?:string;}[]) { return 0 } //// [functionOverloads21.js] -function foo(bar) { return 0; } +function foo(bar) { + return 0; +} diff --git a/tests/baselines/reference/functionOverloads22.js b/tests/baselines/reference/functionOverloads22.js index 54b745d96dd..d682b441822 100644 --- a/tests/baselines/reference/functionOverloads22.js +++ b/tests/baselines/reference/functionOverloads22.js @@ -5,4 +5,10 @@ function foo(bar:any):{a:any;b?:any;}[] { return [{a:""}] } //// [functionOverloads22.js] -function foo(bar) { return [{ a: "" }]; } +function foo(bar) { + return [ + { + a: "" + } + ]; +} diff --git a/tests/baselines/reference/functionOverloads23.js b/tests/baselines/reference/functionOverloads23.js index aa3a7172ada..d8cac7eb8ee 100644 --- a/tests/baselines/reference/functionOverloads23.js +++ b/tests/baselines/reference/functionOverloads23.js @@ -5,4 +5,6 @@ function foo(bar:(a?)=>void) { return 0 } //// [functionOverloads23.js] -function foo(bar) { return 0; } +function foo(bar) { + return 0; +} diff --git a/tests/baselines/reference/functionOverloads24.js b/tests/baselines/reference/functionOverloads24.js index 8fcc3c81902..5ff4e248c0a 100644 --- a/tests/baselines/reference/functionOverloads24.js +++ b/tests/baselines/reference/functionOverloads24.js @@ -5,4 +5,7 @@ function foo(bar:any):(a)=>void { return function(){} } //// [functionOverloads24.js] -function foo(bar) { return function () { }; } +function foo(bar) { + return function () { + }; +} diff --git a/tests/baselines/reference/functionOverloads25.js b/tests/baselines/reference/functionOverloads25.js index d466aa82d21..bbaef498926 100644 --- a/tests/baselines/reference/functionOverloads25.js +++ b/tests/baselines/reference/functionOverloads25.js @@ -6,6 +6,8 @@ var x = foo(); //// [functionOverloads25.js] -function foo(bar) { return ''; } +function foo(bar) { + return ''; +} ; var x = foo(); diff --git a/tests/baselines/reference/functionOverloads26.js b/tests/baselines/reference/functionOverloads26.js index bc4d017b9bb..088c06147ba 100644 --- a/tests/baselines/reference/functionOverloads26.js +++ b/tests/baselines/reference/functionOverloads26.js @@ -6,5 +6,7 @@ var x = foo('baz'); //// [functionOverloads26.js] -function foo(bar) { return ''; } +function foo(bar) { + return ''; +} var x = foo('baz'); diff --git a/tests/baselines/reference/functionOverloads27.js b/tests/baselines/reference/functionOverloads27.js index 199905d8219..2b11b1f6c4e 100644 --- a/tests/baselines/reference/functionOverloads27.js +++ b/tests/baselines/reference/functionOverloads27.js @@ -6,5 +6,7 @@ var x = foo(5); //// [functionOverloads27.js] -function foo(bar) { return ''; } +function foo(bar) { + return ''; +} var x = foo(5); diff --git a/tests/baselines/reference/functionOverloads28.js b/tests/baselines/reference/functionOverloads28.js index d10ef52e2b2..566972ee25d 100644 --- a/tests/baselines/reference/functionOverloads28.js +++ b/tests/baselines/reference/functionOverloads28.js @@ -6,6 +6,8 @@ var t:any; var x = foo(t); //// [functionOverloads28.js] -function foo(bar) { return ''; } +function foo(bar) { + return ''; +} var t; var x = foo(t); diff --git a/tests/baselines/reference/functionOverloads29.js b/tests/baselines/reference/functionOverloads29.js index edc1ea178bc..c828bb95917 100644 --- a/tests/baselines/reference/functionOverloads29.js +++ b/tests/baselines/reference/functionOverloads29.js @@ -6,5 +6,7 @@ var x = foo(); //// [functionOverloads29.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(); diff --git a/tests/baselines/reference/functionOverloads30.js b/tests/baselines/reference/functionOverloads30.js index bc7593a0771..27b1436b6fb 100644 --- a/tests/baselines/reference/functionOverloads30.js +++ b/tests/baselines/reference/functionOverloads30.js @@ -6,5 +6,7 @@ var x = foo('bar'); //// [functionOverloads30.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo('bar'); diff --git a/tests/baselines/reference/functionOverloads31.js b/tests/baselines/reference/functionOverloads31.js index 2c2a15821a7..01cee2c342b 100644 --- a/tests/baselines/reference/functionOverloads31.js +++ b/tests/baselines/reference/functionOverloads31.js @@ -6,5 +6,7 @@ var x = foo(5); //// [functionOverloads31.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(5); diff --git a/tests/baselines/reference/functionOverloads32.js b/tests/baselines/reference/functionOverloads32.js index a5557042dfb..4e0efa98b09 100644 --- a/tests/baselines/reference/functionOverloads32.js +++ b/tests/baselines/reference/functionOverloads32.js @@ -6,6 +6,8 @@ var baz:number; var x = foo(baz); //// [functionOverloads32.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var baz; var x = foo(baz); diff --git a/tests/baselines/reference/functionOverloads33.js b/tests/baselines/reference/functionOverloads33.js index 98bcc09b8b4..0c01cd54d1e 100644 --- a/tests/baselines/reference/functionOverloads33.js +++ b/tests/baselines/reference/functionOverloads33.js @@ -6,5 +6,7 @@ var x = foo(5); //// [functionOverloads33.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(5); diff --git a/tests/baselines/reference/functionOverloads34.js b/tests/baselines/reference/functionOverloads34.js index 3d4311e4193..48ac2b5fc59 100644 --- a/tests/baselines/reference/functionOverloads34.js +++ b/tests/baselines/reference/functionOverloads34.js @@ -6,5 +6,7 @@ var x = foo(); //// [functionOverloads34.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(); diff --git a/tests/baselines/reference/functionOverloads35.js b/tests/baselines/reference/functionOverloads35.js index b25ac6c3c5f..64ff527dee9 100644 --- a/tests/baselines/reference/functionOverloads35.js +++ b/tests/baselines/reference/functionOverloads35.js @@ -6,5 +6,9 @@ var x = foo({a:1}); //// [functionOverloads35.js] -function foo(bar) { return bar; } -var x = foo({ a: 1 }); +function foo(bar) { + return bar; +} +var x = foo({ + a: 1 +}); diff --git a/tests/baselines/reference/functionOverloads36.js b/tests/baselines/reference/functionOverloads36.js index 4e790917d93..3872aa3191f 100644 --- a/tests/baselines/reference/functionOverloads36.js +++ b/tests/baselines/reference/functionOverloads36.js @@ -6,5 +6,9 @@ var x = foo({a:'foo'}); //// [functionOverloads36.js] -function foo(bar) { return bar; } -var x = foo({ a: 'foo' }); +function foo(bar) { + return bar; +} +var x = foo({ + a: 'foo' +}); diff --git a/tests/baselines/reference/functionOverloads37.js b/tests/baselines/reference/functionOverloads37.js index c4e0d4fd18b..f9e6130dbd9 100644 --- a/tests/baselines/reference/functionOverloads37.js +++ b/tests/baselines/reference/functionOverloads37.js @@ -6,5 +6,7 @@ var x = foo(); //// [functionOverloads37.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} var x = foo(); diff --git a/tests/baselines/reference/functionOverloads38.js b/tests/baselines/reference/functionOverloads38.js index c973cbe7b67..fa8aa4693b3 100644 --- a/tests/baselines/reference/functionOverloads38.js +++ b/tests/baselines/reference/functionOverloads38.js @@ -6,5 +6,11 @@ var x = foo([{a:1}]); //// [functionOverloads38.js] -function foo(bar) { return bar; } -var x = foo([{ a: 1 }]); +function foo(bar) { + return bar; +} +var x = foo([ + { + a: 1 + } +]); diff --git a/tests/baselines/reference/functionOverloads39.js b/tests/baselines/reference/functionOverloads39.js index ad4ded394d8..218c3e9f698 100644 --- a/tests/baselines/reference/functionOverloads39.js +++ b/tests/baselines/reference/functionOverloads39.js @@ -6,5 +6,11 @@ var x = foo([{a:true}]); //// [functionOverloads39.js] -function foo(bar) { return bar; } -var x = foo([{ a: true }]); +function foo(bar) { + return bar; +} +var x = foo([ + { + a: true + } +]); diff --git a/tests/baselines/reference/functionOverloads4.js b/tests/baselines/reference/functionOverloads4.js index 3a1ff2ced33..b428f6938b4 100644 --- a/tests/baselines/reference/functionOverloads4.js +++ b/tests/baselines/reference/functionOverloads4.js @@ -3,4 +3,6 @@ function foo():number; function foo():string { return "a" } //// [functionOverloads4.js] -function foo() { return "a"; } +function foo() { + return "a"; +} diff --git a/tests/baselines/reference/functionOverloads40.js b/tests/baselines/reference/functionOverloads40.js index 11edff26a4b..3ad42e1b91d 100644 --- a/tests/baselines/reference/functionOverloads40.js +++ b/tests/baselines/reference/functionOverloads40.js @@ -6,5 +6,11 @@ var x = foo([{a:'bar'}]); //// [functionOverloads40.js] -function foo(bar) { return bar; } -var x = foo([{ a: 'bar' }]); +function foo(bar) { + return bar; +} +var x = foo([ + { + a: 'bar' + } +]); diff --git a/tests/baselines/reference/functionOverloads41.js b/tests/baselines/reference/functionOverloads41.js index dd730e25b31..449250dd1cd 100644 --- a/tests/baselines/reference/functionOverloads41.js +++ b/tests/baselines/reference/functionOverloads41.js @@ -6,5 +6,9 @@ var x = foo([{}]); //// [functionOverloads41.js] -function foo(bar) { return bar; } -var x = foo([{}]); +function foo(bar) { + return bar; +} +var x = foo([ + {} +]); diff --git a/tests/baselines/reference/functionOverloads42.js b/tests/baselines/reference/functionOverloads42.js index 979bfa86d62..0f87b5139d2 100644 --- a/tests/baselines/reference/functionOverloads42.js +++ b/tests/baselines/reference/functionOverloads42.js @@ -6,5 +6,11 @@ var x = foo([{a:'s'}]); //// [functionOverloads42.js] -function foo(bar) { return bar; } -var x = foo([{ a: 's' }]); +function foo(bar) { + return bar; +} +var x = foo([ + { + a: 's' + } +]); diff --git a/tests/baselines/reference/functionOverloads5.js b/tests/baselines/reference/functionOverloads5.js index b59154d2417..15507a9fb61 100644 --- a/tests/baselines/reference/functionOverloads5.js +++ b/tests/baselines/reference/functionOverloads5.js @@ -9,6 +9,7 @@ class baz { var baz = (function () { function baz() { } - baz.prototype.foo = function (bar) { }; + baz.prototype.foo = function (bar) { + }; return baz; })(); diff --git a/tests/baselines/reference/functionOverloads6.js b/tests/baselines/reference/functionOverloads6.js index 2c19b376dc8..b7f9fd8c1f2 100644 --- a/tests/baselines/reference/functionOverloads6.js +++ b/tests/baselines/reference/functionOverloads6.js @@ -10,6 +10,7 @@ class foo { var foo = (function () { function foo() { } - foo.fnOverload = function (foo) { }; + foo.fnOverload = function (foo) { + }; return foo; })(); diff --git a/tests/baselines/reference/functionOverloads7.js b/tests/baselines/reference/functionOverloads7.js index 540abf9eb8c..52cac83af72 100644 --- a/tests/baselines/reference/functionOverloads7.js +++ b/tests/baselines/reference/functionOverloads7.js @@ -14,7 +14,9 @@ class foo { var foo = (function () { function foo() { } - foo.prototype.bar = function (foo) { return "foo"; }; + foo.prototype.bar = function (foo) { + return "foo"; + }; foo.prototype.n = function () { var foo = this.bar(); foo = this.bar("test"); diff --git a/tests/baselines/reference/functionOverloads8.js b/tests/baselines/reference/functionOverloads8.js index 55539a61659..08c2c0b65a1 100644 --- a/tests/baselines/reference/functionOverloads8.js +++ b/tests/baselines/reference/functionOverloads8.js @@ -5,4 +5,6 @@ function foo(foo?:any){ return '' } //// [functionOverloads8.js] -function foo(foo) { return ''; } +function foo(foo) { + return ''; +} diff --git a/tests/baselines/reference/functionOverloads9.js b/tests/baselines/reference/functionOverloads9.js index 9d2ae21f4fa..53cc0385a59 100644 --- a/tests/baselines/reference/functionOverloads9.js +++ b/tests/baselines/reference/functionOverloads9.js @@ -5,6 +5,8 @@ var x = foo('foo'); //// [functionOverloads9.js] -function foo(foo) { return ''; } +function foo(foo) { + return ''; +} ; var x = foo('foo'); diff --git a/tests/baselines/reference/functionReturn.js b/tests/baselines/reference/functionReturn.js index c433eec190d..bfcd12e2b95 100644 --- a/tests/baselines/reference/functionReturn.js +++ b/tests/baselines/reference/functionReturn.js @@ -15,12 +15,16 @@ function f5(): string { } //// [functionReturn.js] -function f0() { } +function f0() { +} function f1() { var n = f0(); } -function f2() { } -function f3() { return; } +function f2() { +} +function f3() { + return; +} function f4() { return ''; return; diff --git a/tests/baselines/reference/functionType.js b/tests/baselines/reference/functionType.js index 6e3edc7347e..c2d6eea784c 100644 --- a/tests/baselines/reference/functionType.js +++ b/tests/baselines/reference/functionType.js @@ -7,6 +7,7 @@ salt.apply("hello", []); //// [functionType.js] -function salt() { } +function salt() { +} salt.apply("hello", []); (new Function("return 5"))(); diff --git a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.js b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.js index 15080e99d73..b4ed20e9ed0 100644 --- a/tests/baselines/reference/functionTypeArgumentAssignmentCompat.js +++ b/tests/baselines/reference/functionTypeArgumentAssignmentCompat.js @@ -15,7 +15,9 @@ console.log(s); //// [functionTypeArgumentAssignmentCompat.js] var f; -var g = function () { return []; }; +var g = function () { + return []; +}; f = g; var s = f("str").toUpperCase(); console.log(s); diff --git a/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js b/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js index dae960bad68..6bca14b063b 100644 --- a/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js +++ b/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js @@ -6,6 +6,9 @@ var f3 = (): any => { }; //// [functionWithAnyReturnTypeAndNoReturnExpression.js] // All should be allowed -function f() { } -var f2 = function () { }; -var f3 = function () { }; +function f() { +} +var f2 = function () { +}; +var f3 = function () { +}; diff --git a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements10.js b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements10.js index f312966ea4f..a72b15a1b9c 100644 --- a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements10.js +++ b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements10.js @@ -6,8 +6,12 @@ function bar(a = [0]) { //// [functionWithDefaultParameterWithNoStatements10.js] function foo(a) { - if (a === void 0) { a = [0]; } + if (a === void 0) { a = [ + 0 + ]; } } function bar(a) { - if (a === void 0) { a = [0]; } + if (a === void 0) { a = [ + 0 + ]; } } diff --git a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements13.js b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements13.js index 7fcbae72541..db98c6353cc 100644 --- a/tests/baselines/reference/functionWithDefaultParameterWithNoStatements13.js +++ b/tests/baselines/reference/functionWithDefaultParameterWithNoStatements13.js @@ -9,8 +9,12 @@ function bar(a = [1 + 1]) { //// [functionWithDefaultParameterWithNoStatements13.js] var v; function foo(a) { - if (a === void 0) { a = [1 + 1]; } + if (a === void 0) { a = [ + 1 + 1 + ]; } } function bar(a) { - if (a === void 0) { a = [1 + 1]; } + if (a === void 0) { a = [ + 1 + 1 + ]; } } diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements2.js b/tests/baselines/reference/functionWithMultipleReturnStatements2.js index 4674c6db953..396c4a8d9c0 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements2.js +++ b/tests/baselines/reference/functionWithMultipleReturnStatements2.js @@ -166,18 +166,22 @@ function f10() { // returns number => void function f11() { if (true) { - return function (x) { }; + return function (x) { + }; } else { - return function (x) { }; + return function (x) { + }; } } // returns Object => void function f12() { if (true) { - return function (x) { }; + return function (x) { + }; } else { - return function (x) { }; + return function (x) { + }; } } diff --git a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js index 592a03d7158..ae8e7d9c918 100644 --- a/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js +++ b/tests/baselines/reference/functionsMissingReturnStatementsAndExpressions.js @@ -228,8 +228,7 @@ var C = (function () { // Not fine, since we can *only* consist of a single throw statement // if no return statements are present but we are a get accessor. throw null; - throw undefined. - ; + throw undefined.; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/functionsWithModifiersInBlocks1.js b/tests/baselines/reference/functionsWithModifiersInBlocks1.js index 757fe509747..1d381bccfe1 100644 --- a/tests/baselines/reference/functionsWithModifiersInBlocks1.js +++ b/tests/baselines/reference/functionsWithModifiersInBlocks1.js @@ -7,6 +7,7 @@ //// [functionsWithModifiersInBlocks1.js] { - function f() { } + function f() { + } exports.f = f; } diff --git a/tests/baselines/reference/funduleSplitAcrossFiles.js b/tests/baselines/reference/funduleSplitAcrossFiles.js index bb59338a630..330fbcdec74 100644 --- a/tests/baselines/reference/funduleSplitAcrossFiles.js +++ b/tests/baselines/reference/funduleSplitAcrossFiles.js @@ -10,7 +10,8 @@ module D { D.y; //// [funduleSplitAcrossFiles_function.js] -function D() { } +function D() { +} //// [funduleSplitAcrossFiles_module.js] var D; (function (D) { diff --git a/tests/baselines/reference/fuzzy.js b/tests/baselines/reference/fuzzy.js index b98a9ced107..4729b59e2c3 100644 --- a/tests/baselines/reference/fuzzy.js +++ b/tests/baselines/reference/fuzzy.js @@ -38,13 +38,20 @@ var M; this.x = x; } C.prototype.works = function () { - return ({ anything: 1 }); + return ({ + anything: 1 + }); }; C.prototype.doesntWork = function () { - return { anything: 1, oneI: this }; + return { + anything: 1, + oneI: this + }; }; C.prototype.worksToo = function () { - return ({ oneI: this }); + return ({ + oneI: this + }); }; return C; })(); diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index a88929669fd..ec79d3a7522 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -381,1072 +381,2973 @@ var Derived2 = (function (_super) { return Derived2; })(Base); var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); -var x1 = function () { return [d1, d2]; }; -var x2 = function () { return [d1, d2]; }; -var x3 = function named() { return [d1, d2]; }; -var x4 = function () { return [d1, d2]; }; -var x5 = function () { return [d1, d2]; }; -var x6 = function named() { return [d1, d2]; }; -var x7 = [d1, d2]; -var x8 = [d1, d2]; -var x9 = [d1, d2]; -var x10 = { n: [d1, d2] }; -var x11 = function (n) { var n; return null; }; -var x12 = { func: function (n) { return [d1, d2]; } }; +var x1 = function () { + return [ + d1, + d2 + ]; +}; +var x2 = function () { + return [ + d1, + d2 + ]; +}; +var x3 = function named() { + return [ + d1, + d2 + ]; +}; +var x4 = function () { + return [ + d1, + d2 + ]; +}; +var x5 = function () { + return [ + d1, + d2 + ]; +}; +var x6 = function named() { + return [ + d1, + d2 + ]; +}; +var x7 = [ + d1, + d2 +]; +var x8 = [ + d1, + d2 +]; +var x9 = [ + d1, + d2 +]; +var x10 = { + n: [ + d1, + d2 + ] +}; +var x11 = function (n) { + var n; + return null; +}; +var x12 = { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; var x13 = (function () { function x13() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x13; })(); var x14 = (function () { function x14() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x14; })(); var x15 = (function () { function x15() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x15; })(); var x16 = (function () { function x16() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x16; })(); var x17 = (function () { function x17() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x17; })(); var x18 = (function () { function x18() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x18; })(); var x19 = (function () { function x19() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x19; })(); var x20 = (function () { function x20() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x20; })(); var x21 = (function () { function x21() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x21; })(); var x22 = (function () { function x22() { - this.member = { n: [d1, d2] }; + this.member = { + n: [ + d1, + d2 + ] + }; } return x22; })(); var x23 = (function () { function x23() { - this.member = function (n) { var n; return null; }; + this.member = function (n) { + var n; + return null; + }; } return x23; })(); var x24 = (function () { function x24() { - this.member = { func: function (n) { return [d1, d2]; } }; + this.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } return x24; })(); var x25 = (function () { function x25() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x25; })(); var x26 = (function () { function x26() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x26; })(); var x27 = (function () { function x27() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x27; })(); var x28 = (function () { function x28() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x28; })(); var x29 = (function () { function x29() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x29; })(); var x30 = (function () { function x30() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x30; })(); var x31 = (function () { function x31() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x31; })(); var x32 = (function () { function x32() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x32; })(); var x33 = (function () { function x33() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x33; })(); var x34 = (function () { function x34() { - this.member = { n: [d1, d2] }; + this.member = { + n: [ + d1, + d2 + ] + }; } return x34; })(); var x35 = (function () { function x35() { - this.member = function (n) { var n; return null; }; + this.member = function (n) { + var n; + return null; + }; } return x35; })(); var x36 = (function () { function x36() { - this.member = { func: function (n) { return [d1, d2]; } }; + this.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } return x36; })(); var x37 = (function () { function x37() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x37; })(); var x38 = (function () { function x38() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x38; })(); var x39 = (function () { function x39() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x39; })(); var x40 = (function () { function x40() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x40; })(); var x41 = (function () { function x41() { - this.member = function () { return [d1, d2]; }; + this.member = function () { + return [ + d1, + d2 + ]; + }; } return x41; })(); var x42 = (function () { function x42() { - this.member = function named() { return [d1, d2]; }; + this.member = function named() { + return [ + d1, + d2 + ]; + }; } return x42; })(); var x43 = (function () { function x43() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x43; })(); var x44 = (function () { function x44() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x44; })(); var x45 = (function () { function x45() { - this.member = [d1, d2]; + this.member = [ + d1, + d2 + ]; } return x45; })(); var x46 = (function () { function x46() { - this.member = { n: [d1, d2] }; + this.member = { + n: [ + d1, + d2 + ] + }; } return x46; })(); var x47 = (function () { function x47() { - this.member = function (n) { var n; return null; }; + this.member = function (n) { + var n; + return null; + }; } return x47; })(); var x48 = (function () { function x48() { - this.member = { func: function (n) { return [d1, d2]; } }; + this.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } return x48; })(); var x49 = (function () { function x49() { } - x49.member = function () { return [d1, d2]; }; + x49.member = function () { + return [ + d1, + d2 + ]; + }; return x49; })(); var x50 = (function () { function x50() { } - x50.member = function () { return [d1, d2]; }; + x50.member = function () { + return [ + d1, + d2 + ]; + }; return x50; })(); var x51 = (function () { function x51() { } - x51.member = function named() { return [d1, d2]; }; + x51.member = function named() { + return [ + d1, + d2 + ]; + }; return x51; })(); var x52 = (function () { function x52() { } - x52.member = function () { return [d1, d2]; }; + x52.member = function () { + return [ + d1, + d2 + ]; + }; return x52; })(); var x53 = (function () { function x53() { } - x53.member = function () { return [d1, d2]; }; + x53.member = function () { + return [ + d1, + d2 + ]; + }; return x53; })(); var x54 = (function () { function x54() { } - x54.member = function named() { return [d1, d2]; }; + x54.member = function named() { + return [ + d1, + d2 + ]; + }; return x54; })(); var x55 = (function () { function x55() { } - x55.member = [d1, d2]; + x55.member = [ + d1, + d2 + ]; return x55; })(); var x56 = (function () { function x56() { } - x56.member = [d1, d2]; + x56.member = [ + d1, + d2 + ]; return x56; })(); var x57 = (function () { function x57() { } - x57.member = [d1, d2]; + x57.member = [ + d1, + d2 + ]; return x57; })(); var x58 = (function () { function x58() { } - x58.member = { n: [d1, d2] }; + x58.member = { + n: [ + d1, + d2 + ] + }; return x58; })(); var x59 = (function () { function x59() { } - x59.member = function (n) { var n; return null; }; + x59.member = function (n) { + var n; + return null; + }; return x59; })(); var x60 = (function () { function x60() { } - x60.member = { func: function (n) { return [d1, d2]; } }; + x60.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; return x60; })(); var x61 = (function () { function x61() { } - x61.member = function () { return [d1, d2]; }; + x61.member = function () { + return [ + d1, + d2 + ]; + }; return x61; })(); var x62 = (function () { function x62() { } - x62.member = function () { return [d1, d2]; }; + x62.member = function () { + return [ + d1, + d2 + ]; + }; return x62; })(); var x63 = (function () { function x63() { } - x63.member = function named() { return [d1, d2]; }; + x63.member = function named() { + return [ + d1, + d2 + ]; + }; return x63; })(); var x64 = (function () { function x64() { } - x64.member = function () { return [d1, d2]; }; + x64.member = function () { + return [ + d1, + d2 + ]; + }; return x64; })(); var x65 = (function () { function x65() { } - x65.member = function () { return [d1, d2]; }; + x65.member = function () { + return [ + d1, + d2 + ]; + }; return x65; })(); var x66 = (function () { function x66() { } - x66.member = function named() { return [d1, d2]; }; + x66.member = function named() { + return [ + d1, + d2 + ]; + }; return x66; })(); var x67 = (function () { function x67() { } - x67.member = [d1, d2]; + x67.member = [ + d1, + d2 + ]; return x67; })(); var x68 = (function () { function x68() { } - x68.member = [d1, d2]; + x68.member = [ + d1, + d2 + ]; return x68; })(); var x69 = (function () { function x69() { } - x69.member = [d1, d2]; + x69.member = [ + d1, + d2 + ]; return x69; })(); var x70 = (function () { function x70() { } - x70.member = { n: [d1, d2] }; + x70.member = { + n: [ + d1, + d2 + ] + }; return x70; })(); var x71 = (function () { function x71() { } - x71.member = function (n) { var n; return null; }; + x71.member = function (n) { + var n; + return null; + }; return x71; })(); var x72 = (function () { function x72() { } - x72.member = { func: function (n) { return [d1, d2]; } }; + x72.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; return x72; })(); var x73 = (function () { function x73() { } - x73.member = function () { return [d1, d2]; }; + x73.member = function () { + return [ + d1, + d2 + ]; + }; return x73; })(); var x74 = (function () { function x74() { } - x74.member = function () { return [d1, d2]; }; + x74.member = function () { + return [ + d1, + d2 + ]; + }; return x74; })(); var x75 = (function () { function x75() { } - x75.member = function named() { return [d1, d2]; }; + x75.member = function named() { + return [ + d1, + d2 + ]; + }; return x75; })(); var x76 = (function () { function x76() { } - x76.member = function () { return [d1, d2]; }; + x76.member = function () { + return [ + d1, + d2 + ]; + }; return x76; })(); var x77 = (function () { function x77() { } - x77.member = function () { return [d1, d2]; }; + x77.member = function () { + return [ + d1, + d2 + ]; + }; return x77; })(); var x78 = (function () { function x78() { } - x78.member = function named() { return [d1, d2]; }; + x78.member = function named() { + return [ + d1, + d2 + ]; + }; return x78; })(); var x79 = (function () { function x79() { } - x79.member = [d1, d2]; + x79.member = [ + d1, + d2 + ]; return x79; })(); var x80 = (function () { function x80() { } - x80.member = [d1, d2]; + x80.member = [ + d1, + d2 + ]; return x80; })(); var x81 = (function () { function x81() { } - x81.member = [d1, d2]; + x81.member = [ + d1, + d2 + ]; return x81; })(); var x82 = (function () { function x82() { } - x82.member = { n: [d1, d2] }; + x82.member = { + n: [ + d1, + d2 + ] + }; return x82; })(); var x83 = (function () { function x83() { } - x83.member = function (n) { var n; return null; }; + x83.member = function (n) { + var n; + return null; + }; return x83; })(); var x84 = (function () { function x84() { } - x84.member = { func: function (n) { return [d1, d2]; } }; + x84.member = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; return x84; })(); var x85 = (function () { function x85(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } return x85; })(); var x86 = (function () { function x86(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } return x86; })(); var x87 = (function () { function x87(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } } return x87; })(); var x88 = (function () { function x88(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } return x88; })(); var x89 = (function () { function x89(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } return x89; })(); var x90 = (function () { function x90(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } } return x90; })(); var x91 = (function () { function x91(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } return x91; })(); var x92 = (function () { function x92(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } return x92; })(); var x93 = (function () { function x93(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } return x93; })(); var x94 = (function () { function x94(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } + if (parm === void 0) { parm = { + n: [ + d1, + d2 + ] + }; } } return x94; })(); var x95 = (function () { function x95(parm) { - if (parm === void 0) { parm = function (n) { var n; return null; }; } + if (parm === void 0) { parm = function (n) { + var n; + return null; + }; } } return x95; })(); var x96 = (function () { function x96(parm) { - if (parm === void 0) { parm = { func: function (n) { return [d1, d2]; } }; } + if (parm === void 0) { parm = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } } return x96; })(); var x97 = (function () { function x97(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x97; })(); var x98 = (function () { function x98(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x98; })(); var x99 = (function () { function x99(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x99; })(); var x100 = (function () { function x100(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x100; })(); var x101 = (function () { function x101(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x101; })(); var x102 = (function () { function x102(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x102; })(); var x103 = (function () { function x103(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x103; })(); var x104 = (function () { function x104(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x104; })(); var x105 = (function () { function x105(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x105; })(); var x106 = (function () { function x106(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } + if (parm === void 0) { parm = { + n: [ + d1, + d2 + ] + }; } this.parm = parm; } return x106; })(); var x107 = (function () { function x107(parm) { - if (parm === void 0) { parm = function (n) { var n; return null; }; } + if (parm === void 0) { parm = function (n) { + var n; + return null; + }; } this.parm = parm; } return x107; })(); var x108 = (function () { function x108(parm) { - if (parm === void 0) { parm = { func: function (n) { return [d1, d2]; } }; } + if (parm === void 0) { parm = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } this.parm = parm; } return x108; })(); var x109 = (function () { function x109(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x109; })(); var x110 = (function () { function x110(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x110; })(); var x111 = (function () { function x111(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x111; })(); var x112 = (function () { function x112(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x112; })(); var x113 = (function () { function x113(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x113; })(); var x114 = (function () { function x114(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } this.parm = parm; } return x114; })(); var x115 = (function () { function x115(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x115; })(); var x116 = (function () { function x116(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x116; })(); var x117 = (function () { function x117(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } this.parm = parm; } return x117; })(); var x118 = (function () { function x118(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } + if (parm === void 0) { parm = { + n: [ + d1, + d2 + ] + }; } this.parm = parm; } return x118; })(); var x119 = (function () { function x119(parm) { - if (parm === void 0) { parm = function (n) { var n; return null; }; } + if (parm === void 0) { parm = function (n) { + var n; + return null; + }; } this.parm = parm; } return x119; })(); var x120 = (function () { function x120(parm) { - if (parm === void 0) { parm = { func: function (n) { return [d1, d2]; } }; } + if (parm === void 0) { parm = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } this.parm = parm; } return x120; })(); function x121(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } function x122(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } function x123(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } } function x124(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } function x125(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } + if (parm === void 0) { parm = function () { + return [ + d1, + d2 + ]; + }; } } function x126(parm) { - if (parm === void 0) { parm = function named() { return [d1, d2]; }; } + if (parm === void 0) { parm = function named() { + return [ + d1, + d2 + ]; + }; } } function x127(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } function x128(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } function x129(parm) { - if (parm === void 0) { parm = [d1, d2]; } + if (parm === void 0) { parm = [ + d1, + d2 + ]; } } function x130(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } + if (parm === void 0) { parm = { + n: [ + d1, + d2 + ] + }; } } function x131(parm) { - if (parm === void 0) { parm = function (n) { var n; return null; }; } + if (parm === void 0) { parm = function (n) { + var n; + return null; + }; } } function x132(parm) { - if (parm === void 0) { parm = { func: function (n) { return [d1, d2]; } }; } + if (parm === void 0) { parm = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; } } -function x133() { return function () { return [d1, d2]; }; } -function x134() { return function () { return [d1, d2]; }; } -function x135() { return function named() { return [d1, d2]; }; } -function x136() { return function () { return [d1, d2]; }; } -function x137() { return function () { return [d1, d2]; }; } -function x138() { return function named() { return [d1, d2]; }; } -function x139() { return [d1, d2]; } -function x140() { return [d1, d2]; } -function x141() { return [d1, d2]; } -function x142() { return { n: [d1, d2] }; } -function x143() { return function (n) { var n; return null; }; } -function x144() { return { func: function (n) { return [d1, d2]; } }; } -function x145() { return function () { return [d1, d2]; }; return function () { return [d1, d2]; }; } -function x146() { return function () { return [d1, d2]; }; return function () { return [d1, d2]; }; } -function x147() { return function named() { return [d1, d2]; }; return function named() { return [d1, d2]; }; } -function x148() { return function () { return [d1, d2]; }; return function () { return [d1, d2]; }; } -function x149() { return function () { return [d1, d2]; }; return function () { return [d1, d2]; }; } -function x150() { return function named() { return [d1, d2]; }; return function named() { return [d1, d2]; }; } -function x151() { return [d1, d2]; return [d1, d2]; } -function x152() { return [d1, d2]; return [d1, d2]; } -function x153() { return [d1, d2]; return [d1, d2]; } -function x154() { return { n: [d1, d2] }; return { n: [d1, d2] }; } -function x155() { return function (n) { var n; return null; }; return function (n) { var n; return null; }; } -function x156() { return { func: function (n) { return [d1, d2]; } }; return { func: function (n) { return [d1, d2]; } }; } -var x157 = function () { return function () { return [d1, d2]; }; }; -var x158 = function () { return function () { return [d1, d2]; }; }; -var x159 = function () { return function named() { return [d1, d2]; }; }; -var x160 = function () { return function () { return [d1, d2]; }; }; -var x161 = function () { return function () { return [d1, d2]; }; }; -var x162 = function () { return function named() { return [d1, d2]; }; }; -var x163 = function () { return [d1, d2]; }; -var x164 = function () { return [d1, d2]; }; -var x165 = function () { return [d1, d2]; }; -var x166 = function () { return { n: [d1, d2] }; }; -var x167 = function () { return function (n) { var n; return null; }; }; -var x168 = function () { return { func: function (n) { return [d1, d2]; } }; }; -var x169 = function () { return function () { return [d1, d2]; }; }; -var x170 = function () { return function () { return [d1, d2]; }; }; -var x171 = function () { return function named() { return [d1, d2]; }; }; -var x172 = function () { return function () { return [d1, d2]; }; }; -var x173 = function () { return function () { return [d1, d2]; }; }; -var x174 = function () { return function named() { return [d1, d2]; }; }; -var x175 = function () { return [d1, d2]; }; -var x176 = function () { return [d1, d2]; }; -var x177 = function () { return [d1, d2]; }; -var x178 = function () { return { n: [d1, d2] }; }; -var x179 = function () { return function (n) { var n; return null; }; }; -var x180 = function () { return { func: function (n) { return [d1, d2]; } }; }; +function x133() { + return function () { + return [ + d1, + d2 + ]; + }; +} +function x134() { + return function () { + return [ + d1, + d2 + ]; + }; +} +function x135() { + return function named() { + return [ + d1, + d2 + ]; + }; +} +function x136() { + return function () { + return [ + d1, + d2 + ]; + }; +} +function x137() { + return function () { + return [ + d1, + d2 + ]; + }; +} +function x138() { + return function named() { + return [ + d1, + d2 + ]; + }; +} +function x139() { + return [ + d1, + d2 + ]; +} +function x140() { + return [ + d1, + d2 + ]; +} +function x141() { + return [ + d1, + d2 + ]; +} +function x142() { + return { + n: [ + d1, + d2 + ] + }; +} +function x143() { + return function (n) { + var n; + return null; + }; +} +function x144() { + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; +} +function x145() { + return function () { + return [ + d1, + d2 + ]; + }; + return function () { + return [ + d1, + d2 + ]; + }; +} +function x146() { + return function () { + return [ + d1, + d2 + ]; + }; + return function () { + return [ + d1, + d2 + ]; + }; +} +function x147() { + return function named() { + return [ + d1, + d2 + ]; + }; + return function named() { + return [ + d1, + d2 + ]; + }; +} +function x148() { + return function () { + return [ + d1, + d2 + ]; + }; + return function () { + return [ + d1, + d2 + ]; + }; +} +function x149() { + return function () { + return [ + d1, + d2 + ]; + }; + return function () { + return [ + d1, + d2 + ]; + }; +} +function x150() { + return function named() { + return [ + d1, + d2 + ]; + }; + return function named() { + return [ + d1, + d2 + ]; + }; +} +function x151() { + return [ + d1, + d2 + ]; + return [ + d1, + d2 + ]; +} +function x152() { + return [ + d1, + d2 + ]; + return [ + d1, + d2 + ]; +} +function x153() { + return [ + d1, + d2 + ]; + return [ + d1, + d2 + ]; +} +function x154() { + return { + n: [ + d1, + d2 + ] + }; + return { + n: [ + d1, + d2 + ] + }; +} +function x155() { + return function (n) { + var n; + return null; + }; + return function (n) { + var n; + return null; + }; +} +function x156() { + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; +} +var x157 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x158 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x159 = function () { + return function named() { + return [ + d1, + d2 + ]; + }; +}; +var x160 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x161 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x162 = function () { + return function named() { + return [ + d1, + d2 + ]; + }; +}; +var x163 = function () { + return [ + d1, + d2 + ]; +}; +var x164 = function () { + return [ + d1, + d2 + ]; +}; +var x165 = function () { + return [ + d1, + d2 + ]; +}; +var x166 = function () { + return { + n: [ + d1, + d2 + ] + }; +}; +var x167 = function () { + return function (n) { + var n; + return null; + }; +}; +var x168 = function () { + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; +}; +var x169 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x170 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x171 = function () { + return function named() { + return [ + d1, + d2 + ]; + }; +}; +var x172 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x173 = function () { + return function () { + return [ + d1, + d2 + ]; + }; +}; +var x174 = function () { + return function named() { + return [ + d1, + d2 + ]; + }; +}; +var x175 = function () { + return [ + d1, + d2 + ]; +}; +var x176 = function () { + return [ + d1, + d2 + ]; +}; +var x177 = function () { + return [ + d1, + d2 + ]; +}; +var x178 = function () { + return { + n: [ + d1, + d2 + ] + }; +}; +var x179 = function () { + return function (n) { + var n; + return null; + }; +}; +var x180 = function () { + return { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; +}; var x181; (function (x181) { - var t = function () { return [d1, d2]; }; + var t = function () { + return [ + d1, + d2 + ]; + }; })(x181 || (x181 = {})); var x182; (function (x182) { - var t = function () { return [d1, d2]; }; + var t = function () { + return [ + d1, + d2 + ]; + }; })(x182 || (x182 = {})); var x183; (function (x183) { - var t = function named() { return [d1, d2]; }; + var t = function named() { + return [ + d1, + d2 + ]; + }; })(x183 || (x183 = {})); var x184; (function (x184) { - var t = function () { return [d1, d2]; }; + var t = function () { + return [ + d1, + d2 + ]; + }; })(x184 || (x184 = {})); var x185; (function (x185) { - var t = function () { return [d1, d2]; }; + var t = function () { + return [ + d1, + d2 + ]; + }; })(x185 || (x185 = {})); var x186; (function (x186) { - var t = function named() { return [d1, d2]; }; + var t = function named() { + return [ + d1, + d2 + ]; + }; })(x186 || (x186 = {})); var x187; (function (x187) { - var t = [d1, d2]; + var t = [ + d1, + d2 + ]; })(x187 || (x187 = {})); var x188; (function (x188) { - var t = [d1, d2]; + var t = [ + d1, + d2 + ]; })(x188 || (x188 = {})); var x189; (function (x189) { - var t = [d1, d2]; + var t = [ + d1, + d2 + ]; })(x189 || (x189 = {})); var x190; (function (x190) { - var t = { n: [d1, d2] }; + var t = { + n: [ + d1, + d2 + ] + }; })(x190 || (x190 = {})); var x191; (function (x191) { - var t = function (n) { var n; return null; }; + var t = function (n) { + var n; + return null; + }; })(x191 || (x191 = {})); var x192; (function (x192) { - var t = { func: function (n) { return [d1, d2]; } }; + var t = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; })(x192 || (x192 = {})); var x193; (function (x193) { - x193.t = function () { return [d1, d2]; }; + x193.t = function () { + return [ + d1, + d2 + ]; + }; })(x193 || (x193 = {})); var x194; (function (x194) { - x194.t = function () { return [d1, d2]; }; + x194.t = function () { + return [ + d1, + d2 + ]; + }; })(x194 || (x194 = {})); var x195; (function (x195) { - x195.t = function named() { return [d1, d2]; }; + x195.t = function named() { + return [ + d1, + d2 + ]; + }; })(x195 || (x195 = {})); var x196; (function (x196) { - x196.t = function () { return [d1, d2]; }; + x196.t = function () { + return [ + d1, + d2 + ]; + }; })(x196 || (x196 = {})); var x197; (function (x197) { - x197.t = function () { return [d1, d2]; }; + x197.t = function () { + return [ + d1, + d2 + ]; + }; })(x197 || (x197 = {})); var x198; (function (x198) { - x198.t = function named() { return [d1, d2]; }; + x198.t = function named() { + return [ + d1, + d2 + ]; + }; })(x198 || (x198 = {})); var x199; (function (x199) { - x199.t = [d1, d2]; + x199.t = [ + d1, + d2 + ]; })(x199 || (x199 = {})); var x200; (function (x200) { - x200.t = [d1, d2]; + x200.t = [ + d1, + d2 + ]; })(x200 || (x200 = {})); var x201; (function (x201) { - x201.t = [d1, d2]; + x201.t = [ + d1, + d2 + ]; })(x201 || (x201 = {})); var x202; (function (x202) { - x202.t = { n: [d1, d2] }; + x202.t = { + n: [ + d1, + d2 + ] + }; })(x202 || (x202 = {})); var x203; (function (x203) { - x203.t = function (n) { var n; return null; }; + x203.t = function (n) { + var n; + return null; + }; })(x203 || (x203 = {})); var x204; (function (x204) { - x204.t = { func: function (n) { return [d1, d2]; } }; + x204.t = { + func: function (n) { + return [ + d1, + d2 + ]; + } + }; })(x204 || (x204 = {})); -var x206 = function () { return [d1, d2]; }; -var x207 = function named() { return [d1, d2]; }; -var x209 = function () { return [d1, d2]; }; -var x210 = function named() { return [d1, d2]; }; -var x211 = [d1, d2]; -var x212 = [d1, d2]; -var x213 = [d1, d2]; -var x214 = { n: [d1, d2] }; -var x216 = { func: function (n) { return [d1, d2]; } }; -var x217 = undefined || function () { return [d1, d2]; }; -var x218 = undefined || function named() { return [d1, d2]; }; -var x219 = undefined || function () { return [d1, d2]; }; -var x220 = undefined || function named() { return [d1, d2]; }; -var x221 = undefined || [d1, d2]; -var x222 = undefined || [d1, d2]; -var x223 = undefined || [d1, d2]; -var x224 = undefined || { n: [d1, d2] }; +var x206 = function () { + return [ + d1, + d2 + ]; +}; +var x207 = function named() { + return [ + d1, + d2 + ]; +}; +var x209 = function () { + return [ + d1, + d2 + ]; +}; +var x210 = function named() { + return [ + d1, + d2 + ]; +}; +var x211 = [ + d1, + d2 +]; +var x212 = [ + d1, + d2 +]; +var x213 = [ + d1, + d2 +]; +var x214 = { + n: [ + d1, + d2 + ] +}; +var x216 = { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; +var x217 = undefined || function () { + return [ + d1, + d2 + ]; +}; +var x218 = undefined || function named() { + return [ + d1, + d2 + ]; +}; +var x219 = undefined || function () { + return [ + d1, + d2 + ]; +}; +var x220 = undefined || function named() { + return [ + d1, + d2 + ]; +}; +var x221 = undefined || [ + d1, + d2 +]; +var x222 = undefined || [ + d1, + d2 +]; +var x223 = undefined || [ + d1, + d2 +]; +var x224 = undefined || { + n: [ + d1, + d2 + ] +}; var x225; -x225 = function () { return [d1, d2]; }; +x225 = function () { + return [ + d1, + d2 + ]; +}; var x226; -x226 = function () { return [d1, d2]; }; +x226 = function () { + return [ + d1, + d2 + ]; +}; var x227; -x227 = function named() { return [d1, d2]; }; +x227 = function named() { + return [ + d1, + d2 + ]; +}; var x228; -x228 = function () { return [d1, d2]; }; +x228 = function () { + return [ + d1, + d2 + ]; +}; var x229; -x229 = function () { return [d1, d2]; }; +x229 = function () { + return [ + d1, + d2 + ]; +}; var x230; -x230 = function named() { return [d1, d2]; }; +x230 = function named() { + return [ + d1, + d2 + ]; +}; var x231; -x231 = [d1, d2]; +x231 = [ + d1, + d2 +]; var x232; -x232 = [d1, d2]; +x232 = [ + d1, + d2 +]; var x233; -x233 = [d1, d2]; +x233 = [ + d1, + d2 +]; var x234; -x234 = { n: [d1, d2] }; +x234 = { + n: [ + d1, + d2 + ] +}; var x235; -x235 = function (n) { var n; return null; }; +x235 = function (n) { + var n; + return null; +}; var x236; -x236 = { func: function (n) { return [d1, d2]; } }; -var x237 = { n: function () { return [d1, d2]; } }; -var x238 = { n: function () { return [d1, d2]; } }; -var x239 = { n: function named() { return [d1, d2]; } }; -var x240 = { n: function () { return [d1, d2]; } }; -var x241 = { n: function () { return [d1, d2]; } }; -var x242 = { n: function named() { return [d1, d2]; } }; -var x243 = { n: [d1, d2] }; -var x244 = { n: [d1, d2] }; -var x245 = { n: [d1, d2] }; -var x246 = { n: { n: [d1, d2] } }; -var x247 = { n: function (n) { var n; return null; } }; -var x248 = { n: { func: function (n) { return [d1, d2]; } } }; -var x252 = [function () { return [d1, d2]; }]; -var x253 = [function () { return [d1, d2]; }]; -var x254 = [function named() { return [d1, d2]; }]; -var x255 = [[d1, d2]]; -var x256 = [[d1, d2]]; -var x257 = [[d1, d2]]; -var x258 = [{ n: [d1, d2] }]; -var x260 = [{ func: function (n) { return [d1, d2]; } }]; -var x261 = function () { return [d1, d2]; } || undefined; -var x262 = function named() { return [d1, d2]; } || undefined; -var x263 = function () { return [d1, d2]; } || undefined; -var x264 = function named() { return [d1, d2]; } || undefined; -var x265 = [d1, d2] || undefined; -var x266 = [d1, d2] || undefined; -var x267 = [d1, d2] || undefined; -var x268 = { n: [d1, d2] } || undefined; -var x269 = undefined || function () { return [d1, d2]; }; -var x270 = undefined || function named() { return [d1, d2]; }; -var x271 = undefined || function () { return [d1, d2]; }; -var x272 = undefined || function named() { return [d1, d2]; }; -var x273 = undefined || [d1, d2]; -var x274 = undefined || [d1, d2]; -var x275 = undefined || [d1, d2]; -var x276 = undefined || { n: [d1, d2] }; -var x277 = function () { return [d1, d2]; } || function () { return [d1, d2]; }; -var x278 = function named() { return [d1, d2]; } || function named() { return [d1, d2]; }; -var x279 = function () { return [d1, d2]; } || function () { return [d1, d2]; }; -var x280 = function named() { return [d1, d2]; } || function named() { return [d1, d2]; }; -var x281 = [d1, d2] || [d1, d2]; -var x282 = [d1, d2] || [d1, d2]; -var x283 = [d1, d2] || [d1, d2]; -var x284 = { n: [d1, d2] } || { n: [d1, d2] }; -var x285 = true ? function () { return [d1, d2]; } : function () { return [d1, d2]; }; -var x286 = true ? function () { return [d1, d2]; } : function () { return [d1, d2]; }; -var x287 = true ? function named() { return [d1, d2]; } : function named() { return [d1, d2]; }; -var x288 = true ? function () { return [d1, d2]; } : function () { return [d1, d2]; }; -var x289 = true ? function () { return [d1, d2]; } : function () { return [d1, d2]; }; -var x290 = true ? function named() { return [d1, d2]; } : function named() { return [d1, d2]; }; -var x291 = true ? [d1, d2] : [d1, d2]; -var x292 = true ? [d1, d2] : [d1, d2]; -var x293 = true ? [d1, d2] : [d1, d2]; -var x294 = true ? { n: [d1, d2] } : { n: [d1, d2] }; -var x295 = true ? function (n) { var n; return null; } : function (n) { var n; return null; }; -var x296 = true ? { func: function (n) { return [d1, d2]; } } : { func: function (n) { return [d1, d2]; } }; -var x297 = true ? undefined : function () { return [d1, d2]; }; -var x298 = true ? undefined : function () { return [d1, d2]; }; -var x299 = true ? undefined : function named() { return [d1, d2]; }; -var x300 = true ? undefined : function () { return [d1, d2]; }; -var x301 = true ? undefined : function () { return [d1, d2]; }; -var x302 = true ? undefined : function named() { return [d1, d2]; }; -var x303 = true ? undefined : [d1, d2]; -var x304 = true ? undefined : [d1, d2]; -var x305 = true ? undefined : [d1, d2]; -var x306 = true ? undefined : { n: [d1, d2] }; -var x307 = true ? undefined : function (n) { var n; return null; }; -var x308 = true ? undefined : { func: function (n) { return [d1, d2]; } }; -var x309 = true ? function () { return [d1, d2]; } : undefined; -var x310 = true ? function () { return [d1, d2]; } : undefined; -var x311 = true ? function named() { return [d1, d2]; } : undefined; -var x312 = true ? function () { return [d1, d2]; } : undefined; -var x313 = true ? function () { return [d1, d2]; } : undefined; -var x314 = true ? function named() { return [d1, d2]; } : undefined; -var x315 = true ? [d1, d2] : undefined; -var x316 = true ? [d1, d2] : undefined; -var x317 = true ? [d1, d2] : undefined; -var x318 = true ? { n: [d1, d2] } : undefined; -var x319 = true ? function (n) { var n; return null; } : undefined; -var x320 = true ? { func: function (n) { return [d1, d2]; } } : undefined; -function x321(n) { } +x236 = { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; +var x237 = { + n: function () { + return [ + d1, + d2 + ]; + } +}; +var x238 = { + n: function () { + return [ + d1, + d2 + ]; + } +}; +var x239 = { + n: function named() { + return [ + d1, + d2 + ]; + } +}; +var x240 = { + n: function () { + return [ + d1, + d2 + ]; + } +}; +var x241 = { + n: function () { + return [ + d1, + d2 + ]; + } +}; +var x242 = { + n: function named() { + return [ + d1, + d2 + ]; + } +}; +var x243 = { + n: [ + d1, + d2 + ] +}; +var x244 = { + n: [ + d1, + d2 + ] +}; +var x245 = { + n: [ + d1, + d2 + ] +}; +var x246 = { + n: { + n: [ + d1, + d2 + ] + } +}; +var x247 = { + n: function (n) { + var n; + return null; + } +}; +var x248 = { + n: { + func: function (n) { + return [ + d1, + d2 + ]; + } + } +}; +var x252 = [ + function () { + return [ + d1, + d2 + ]; + } +]; +var x253 = [ + function () { + return [ + d1, + d2 + ]; + } +]; +var x254 = [ + function named() { + return [ + d1, + d2 + ]; + } +]; +var x255 = [ + [ + d1, + d2 + ] +]; +var x256 = [ + [ + d1, + d2 + ] +]; +var x257 = [ + [ + d1, + d2 + ] +]; +var x258 = [ + { + n: [ + d1, + d2 + ] + } +]; +var x260 = [ + { + func: function (n) { + return [ + d1, + d2 + ]; + } + } +]; +var x261 = function () { + return [ + d1, + d2 + ]; +} || undefined; +var x262 = function named() { + return [ + d1, + d2 + ]; +} || undefined; +var x263 = function () { + return [ + d1, + d2 + ]; +} || undefined; +var x264 = function named() { + return [ + d1, + d2 + ]; +} || undefined; +var x265 = [ + d1, + d2 +] || undefined; +var x266 = [ + d1, + d2 +] || undefined; +var x267 = [ + d1, + d2 +] || undefined; +var x268 = { + n: [ + d1, + d2 + ] +} || undefined; +var x269 = undefined || function () { + return [ + d1, + d2 + ]; +}; +var x270 = undefined || function named() { + return [ + d1, + d2 + ]; +}; +var x271 = undefined || function () { + return [ + d1, + d2 + ]; +}; +var x272 = undefined || function named() { + return [ + d1, + d2 + ]; +}; +var x273 = undefined || [ + d1, + d2 +]; +var x274 = undefined || [ + d1, + d2 +]; +var x275 = undefined || [ + d1, + d2 +]; +var x276 = undefined || { + n: [ + d1, + d2 + ] +}; +var x277 = function () { + return [ + d1, + d2 + ]; +} || function () { + return [ + d1, + d2 + ]; +}; +var x278 = function named() { + return [ + d1, + d2 + ]; +} || function named() { + return [ + d1, + d2 + ]; +}; +var x279 = function () { + return [ + d1, + d2 + ]; +} || function () { + return [ + d1, + d2 + ]; +}; +var x280 = function named() { + return [ + d1, + d2 + ]; +} || function named() { + return [ + d1, + d2 + ]; +}; +var x281 = [ + d1, + d2 +] || [ + d1, + d2 +]; +var x282 = [ + d1, + d2 +] || [ + d1, + d2 +]; +var x283 = [ + d1, + d2 +] || [ + d1, + d2 +]; +var x284 = { + n: [ + d1, + d2 + ] +} || { + n: [ + d1, + d2 + ] +}; +var x285 = true ? function () { + return [ + d1, + d2 + ]; +} : function () { + return [ + d1, + d2 + ]; +}; +var x286 = true ? function () { + return [ + d1, + d2 + ]; +} : function () { + return [ + d1, + d2 + ]; +}; +var x287 = true ? function named() { + return [ + d1, + d2 + ]; +} : function named() { + return [ + d1, + d2 + ]; +}; +var x288 = true ? function () { + return [ + d1, + d2 + ]; +} : function () { + return [ + d1, + d2 + ]; +}; +var x289 = true ? function () { + return [ + d1, + d2 + ]; +} : function () { + return [ + d1, + d2 + ]; +}; +var x290 = true ? function named() { + return [ + d1, + d2 + ]; +} : function named() { + return [ + d1, + d2 + ]; +}; +var x291 = true ? [ + d1, + d2 +] : [ + d1, + d2 +]; +var x292 = true ? [ + d1, + d2 +] : [ + d1, + d2 +]; +var x293 = true ? [ + d1, + d2 +] : [ + d1, + d2 +]; +var x294 = true ? { + n: [ + d1, + d2 + ] +} : { + n: [ + d1, + d2 + ] +}; +var x295 = true ? function (n) { + var n; + return null; +} : function (n) { + var n; + return null; +}; +var x296 = true ? { + func: function (n) { + return [ + d1, + d2 + ]; + } +} : { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; +var x297 = true ? undefined : function () { + return [ + d1, + d2 + ]; +}; +var x298 = true ? undefined : function () { + return [ + d1, + d2 + ]; +}; +var x299 = true ? undefined : function named() { + return [ + d1, + d2 + ]; +}; +var x300 = true ? undefined : function () { + return [ + d1, + d2 + ]; +}; +var x301 = true ? undefined : function () { + return [ + d1, + d2 + ]; +}; +var x302 = true ? undefined : function named() { + return [ + d1, + d2 + ]; +}; +var x303 = true ? undefined : [ + d1, + d2 +]; +var x304 = true ? undefined : [ + d1, + d2 +]; +var x305 = true ? undefined : [ + d1, + d2 +]; +var x306 = true ? undefined : { + n: [ + d1, + d2 + ] +}; +var x307 = true ? undefined : function (n) { + var n; + return null; +}; +var x308 = true ? undefined : { + func: function (n) { + return [ + d1, + d2 + ]; + } +}; +var x309 = true ? function () { + return [ + d1, + d2 + ]; +} : undefined; +var x310 = true ? function () { + return [ + d1, + d2 + ]; +} : undefined; +var x311 = true ? function named() { + return [ + d1, + d2 + ]; +} : undefined; +var x312 = true ? function () { + return [ + d1, + d2 + ]; +} : undefined; +var x313 = true ? function () { + return [ + d1, + d2 + ]; +} : undefined; +var x314 = true ? function named() { + return [ + d1, + d2 + ]; +} : undefined; +var x315 = true ? [ + d1, + d2 +] : undefined; +var x316 = true ? [ + d1, + d2 +] : undefined; +var x317 = true ? [ + d1, + d2 +] : undefined; +var x318 = true ? { + n: [ + d1, + d2 + ] +} : undefined; +var x319 = true ? function (n) { + var n; + return null; +} : undefined; +var x320 = true ? { + func: function (n) { + return [ + d1, + d2 + ]; + } +} : undefined; +function x321(n) { +} ; -x321(function () { return [d1, d2]; }); -function x322(n) { } +x321(function () { + return [ + d1, + d2 + ]; +}); +function x322(n) { +} ; -x322(function () { return [d1, d2]; }); -function x323(n) { } +x322(function () { + return [ + d1, + d2 + ]; +}); +function x323(n) { +} ; -x323(function named() { return [d1, d2]; }); -function x324(n) { } +x323(function named() { + return [ + d1, + d2 + ]; +}); +function x324(n) { +} ; -x324(function () { return [d1, d2]; }); -function x325(n) { } +x324(function () { + return [ + d1, + d2 + ]; +}); +function x325(n) { +} ; -x325(function () { return [d1, d2]; }); -function x326(n) { } +x325(function () { + return [ + d1, + d2 + ]; +}); +function x326(n) { +} ; -x326(function named() { return [d1, d2]; }); -function x327(n) { } +x326(function named() { + return [ + d1, + d2 + ]; +}); +function x327(n) { +} ; -x327([d1, d2]); -function x328(n) { } +x327([ + d1, + d2 +]); +function x328(n) { +} ; -x328([d1, d2]); -function x329(n) { } +x328([ + d1, + d2 +]); +function x329(n) { +} ; -x329([d1, d2]); -function x330(n) { } +x329([ + d1, + d2 +]); +function x330(n) { +} ; -x330({ n: [d1, d2] }); -function x331(n) { } +x330({ + n: [ + d1, + d2 + ] +}); +function x331(n) { +} ; -x331(function (n) { var n; return null; }); -function x332(n) { } +x331(function (n) { + var n; + return null; +}); +function x332(n) { +} ; -x332({ func: function (n) { return [d1, d2]; } }); -var x333 = function (n) { return n; }; -x333(function () { return [d1, d2]; }); -var x334 = function (n) { return n; }; -x334(function () { return [d1, d2]; }); -var x335 = function (n) { return n; }; -x335(function named() { return [d1, d2]; }); -var x336 = function (n) { return n; }; -x336(function () { return [d1, d2]; }); -var x337 = function (n) { return n; }; -x337(function () { return [d1, d2]; }); -var x338 = function (n) { return n; }; -x338(function named() { return [d1, d2]; }); -var x339 = function (n) { return n; }; -x339([d1, d2]); -var x340 = function (n) { return n; }; -x340([d1, d2]); -var x341 = function (n) { return n; }; -x341([d1, d2]); -var x342 = function (n) { return n; }; -x342({ n: [d1, d2] }); -var x343 = function (n) { return n; }; -x343(function (n) { var n; return null; }); -var x344 = function (n) { return n; }; -x344({ func: function (n) { return [d1, d2]; } }); -var x345 = function (n) { }; -x345(function () { return [d1, d2]; }); -var x346 = function (n) { }; -x346(function () { return [d1, d2]; }); -var x347 = function (n) { }; -x347(function named() { return [d1, d2]; }); -var x348 = function (n) { }; -x348(function () { return [d1, d2]; }); -var x349 = function (n) { }; -x349(function () { return [d1, d2]; }); -var x350 = function (n) { }; -x350(function named() { return [d1, d2]; }); -var x351 = function (n) { }; -x351([d1, d2]); -var x352 = function (n) { }; -x352([d1, d2]); -var x353 = function (n) { }; -x353([d1, d2]); -var x354 = function (n) { }; -x354({ n: [d1, d2] }); -var x355 = function (n) { }; -x355(function (n) { var n; return null; }); -var x356 = function (n) { }; -x356({ func: function (n) { return [d1, d2]; } }); +x332({ + func: function (n) { + return [ + d1, + d2 + ]; + } +}); +var x333 = function (n) { + return n; +}; +x333(function () { + return [ + d1, + d2 + ]; +}); +var x334 = function (n) { + return n; +}; +x334(function () { + return [ + d1, + d2 + ]; +}); +var x335 = function (n) { + return n; +}; +x335(function named() { + return [ + d1, + d2 + ]; +}); +var x336 = function (n) { + return n; +}; +x336(function () { + return [ + d1, + d2 + ]; +}); +var x337 = function (n) { + return n; +}; +x337(function () { + return [ + d1, + d2 + ]; +}); +var x338 = function (n) { + return n; +}; +x338(function named() { + return [ + d1, + d2 + ]; +}); +var x339 = function (n) { + return n; +}; +x339([ + d1, + d2 +]); +var x340 = function (n) { + return n; +}; +x340([ + d1, + d2 +]); +var x341 = function (n) { + return n; +}; +x341([ + d1, + d2 +]); +var x342 = function (n) { + return n; +}; +x342({ + n: [ + d1, + d2 + ] +}); +var x343 = function (n) { + return n; +}; +x343(function (n) { + var n; + return null; +}); +var x344 = function (n) { + return n; +}; +x344({ + func: function (n) { + return [ + d1, + d2 + ]; + } +}); +var x345 = function (n) { +}; +x345(function () { + return [ + d1, + d2 + ]; +}); +var x346 = function (n) { +}; +x346(function () { + return [ + d1, + d2 + ]; +}); +var x347 = function (n) { +}; +x347(function named() { + return [ + d1, + d2 + ]; +}); +var x348 = function (n) { +}; +x348(function () { + return [ + d1, + d2 + ]; +}); +var x349 = function (n) { +}; +x349(function () { + return [ + d1, + d2 + ]; +}); +var x350 = function (n) { +}; +x350(function named() { + return [ + d1, + d2 + ]; +}); +var x351 = function (n) { +}; +x351([ + d1, + d2 +]); +var x352 = function (n) { +}; +x352([ + d1, + d2 +]); +var x353 = function (n) { +}; +x353([ + d1, + d2 +]); +var x354 = function (n) { +}; +x354({ + n: [ + d1, + d2 + ] +}); +var x355 = function (n) { +}; +x355(function (n) { + var n; + return null; +}); +var x356 = function (n) { +}; +x356({ + func: function (n) { + return [ + d1, + d2 + ]; + } +}); diff --git a/tests/baselines/reference/generativeRecursionWithTypeOf.js b/tests/baselines/reference/generativeRecursionWithTypeOf.js index 2b7eebfd11c..599751ebde7 100644 --- a/tests/baselines/reference/generativeRecursionWithTypeOf.js +++ b/tests/baselines/reference/generativeRecursionWithTypeOf.js @@ -14,7 +14,8 @@ module M { var C = (function () { function C() { } - C.foo = function (x) { }; + C.foo = function (x) { + }; return C; })(); var M; diff --git a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.js b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.js index dd06b855b68..321400fc24d 100644 --- a/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.js +++ b/tests/baselines/reference/genericArgumentCallSigAssignmentCompat.js @@ -23,6 +23,13 @@ _.all([true], _.identity); //// [genericArgumentCallSigAssignmentCompat.js] // No error, Call signatures of types '(value: T) => T' and 'Underscore.Iterator<{}, boolean>' are compatible when instantiated with any. // Ideally, we would not have a generic signature here, because it should be instantiated with {} during inferential typing -_.all([true, 1, null, 'yes'], _.identity); +_.all([ + true, + 1, + null, + 'yes' +], _.identity); // Ok, because fixing makes us infer boolean for T -_.all([true], _.identity); +_.all([ + true +], _.identity); diff --git a/tests/baselines/reference/genericArray1.js b/tests/baselines/reference/genericArray1.js index b0bfcd2201a..e698d339073 100644 --- a/tests/baselines/reference/genericArray1.js +++ b/tests/baselines/reference/genericArray1.js @@ -26,7 +26,13 @@ interface String{ length: number; } */ -var lengths = ["a", "b", "c"].map(function (x) { return x.length; }); +var lengths = [ + "a", + "b", + "c" +].map(function (x) { + return x.length; +}); //// [genericArray1.d.ts] diff --git a/tests/baselines/reference/genericArrayMethods1.js b/tests/baselines/reference/genericArrayMethods1.js index c7fca1ee6b7..e6cebcb220e 100644 --- a/tests/baselines/reference/genericArrayMethods1.js +++ b/tests/baselines/reference/genericArrayMethods1.js @@ -3,4 +3,7 @@ var x:string[] = [0,1].slice(0); // this should be an error //// [genericArrayMethods1.js] -var x = [0, 1].slice(0); // this should be an error +var x = [ + 0, + 1 +].slice(0); // this should be an error diff --git a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js index 9b7d5b713e9..6f1928a2601 100644 --- a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js +++ b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js @@ -6,7 +6,9 @@ x1 = x2; x2 = x1; //// [genericAssignmentCompatOfFunctionSignatures1.js] -var x1 = function foo3(x, z) { }; -var x2 = function foo3(x, z) { }; +var x1 = function foo3(x, z) { +}; +var x2 = function foo3(x, z) { +}; x1 = x2; x2 = x1; diff --git a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.js b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.js index 70f70ae07ba..7f82cc6afb3 100644 --- a/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.js +++ b/tests/baselines/reference/genericAssignmentCompatWithInterfaces1.js @@ -23,13 +23,21 @@ var a4: I = >z; var A = (function () { function A() { } - A.prototype.compareTo = function (other) { return 1; }; + A.prototype.compareTo = function (other) { + return 1; + }; return A; })(); -var z = { x: new A() }; -var a1 = { x: new A() }; +var z = { + x: new A() +}; +var a1 = { + x: new A() +}; var a2 = function () { - var z = { x: new A() }; + var z = { + x: new A() + }; return z; }(); var a3 = z; diff --git a/tests/baselines/reference/genericCallWithArrayLiteralArgs.js b/tests/baselines/reference/genericCallWithArrayLiteralArgs.js index ba8c2884fff..ebc49f37c0d 100644 --- a/tests/baselines/reference/genericCallWithArrayLiteralArgs.js +++ b/tests/baselines/reference/genericCallWithArrayLiteralArgs.js @@ -17,11 +17,29 @@ var r6 = foo([1, '']); // Object[] function foo(t) { return t; } -var r = foo([1, 2]); // number[] -var r = foo([1, 2]); // number[] -var ra = foo([1, 2]); // any[] +var r = foo([ + 1, + 2 +]); // number[] +var r = foo([ + 1, + 2 +]); // number[] +var ra = foo([ + 1, + 2 +]); // any[] var r2 = foo([]); // any[] var r3 = foo([]); // number[] -var r4 = foo([1, '']); // {}[] -var r5 = foo([1, '']); // any[] -var r6 = foo([1, '']); // Object[] +var r4 = foo([ + 1, + '' +]); // {}[] +var r5 = foo([ + 1, + '' +]); // any[] +var r6 = foo([ + 1, + '' +]); // Object[] diff --git a/tests/baselines/reference/genericCallWithFixedArguments.js b/tests/baselines/reference/genericCallWithFixedArguments.js index e588c0d113d..10c0e2b496b 100644 --- a/tests/baselines/reference/genericCallWithFixedArguments.js +++ b/tests/baselines/reference/genericCallWithFixedArguments.js @@ -11,14 +11,17 @@ g(7) // the parameter list is fixed, so this should not error var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); -function g(x) { } +function g(x) { +} g(7); // the parameter list is fixed, so this should not error diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments.js index 30d4ed353ff..b6f2839bae1 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments.js @@ -42,25 +42,53 @@ function other(t: T, u: U) { function foo(x) { return x(null); } -var r = foo(function (x) { return ''; }); // {} -var r2 = foo(function (x) { return ''; }); // string -var r3 = foo(function (x) { return ''; }); // {} +var r = foo(function (x) { + return ''; +}); // {} +var r2 = foo(function (x) { + return ''; +}); // string +var r3 = foo(function (x) { + return ''; +}); // {} function foo2(x, cb) { return cb(x); } -var r4 = foo2(1, function (a) { return ''; }); // string, contextual signature instantiation is applied to generic functions -var r5 = foo2(1, function (a) { return ''; }); // string -var r6 = foo2('', function (a) { return 1; }); +var r4 = foo2(1, function (a) { + return ''; +}); // string, contextual signature instantiation is applied to generic functions +var r5 = foo2(1, function (a) { + return ''; +}); // string +var r6 = foo2('', function (a) { + return 1; +}); function foo3(x, cb, y) { return cb(x); } -var r7 = foo3(1, function (a) { return ''; }, ''); // string -var r8 = foo3(1, function (a) { return ''; }, 1); // error -var r9 = foo3(1, function (a) { return ''; }, ''); // string +var r7 = foo3(1, function (a) { + return ''; +}, ''); // string +var r8 = foo3(1, function (a) { + return ''; +}, 1); // error +var r9 = foo3(1, function (a) { + return ''; +}, ''); // string function other(t, u) { - var r10 = foo2(1, function (x) { return ''; }); // error - var r10 = foo2(1, function (x) { return ''; }); // string - var r11 = foo3(1, function (x) { return ''; }, ''); // error - var r11b = foo3(1, function (x) { return ''; }, 1); // error - var r12 = foo3(1, function (a) { return ''; }, 1); // error + var r10 = foo2(1, function (x) { + return ''; + }); // error + var r10 = foo2(1, function (x) { + return ''; + }); // string + var r11 = foo3(1, function (x) { + return ''; + }, ''); // error + var r11b = foo3(1, function (x) { + return ''; + }, 1); // error + var r12 = foo3(1, function (a) { + return ''; + }, 1); // error } diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js index 4e3e20071b2..1675b582d49 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.js @@ -27,16 +27,40 @@ var r7 = foo({ cb: () => '' }); // string function foo(arg) { return arg.cb(null); } -var arg = { cb: function (x) { return ''; } }; +var arg = { + cb: function (x) { + return ''; + } +}; var r = foo(arg); // {} // more args not allowed -var r2 = foo({ cb: function (x, y) { return ''; } }); // error -var r3 = foo({ cb: function (x, y) { return ''; } }); // error +var r2 = foo({ + cb: function (x, y) { + return ''; + } +}); // error +var r3 = foo({ + cb: function (x, y) { + return ''; + } +}); // error function foo2(arg) { return arg.cb(null, null); } // fewer args ok var r4 = foo(arg); // {} -var r5 = foo({ cb: function (x) { return ''; } }); // {} -var r6 = foo({ cb: function (x) { return ''; } }); // string -var r7 = foo({ cb: function () { return ''; } }); // string +var r5 = foo({ + cb: function (x) { + return ''; + } +}); // {} +var r6 = foo({ + cb: function (x) { + return ''; + } +}); // string +var r7 = foo({ + cb: function () { + return ''; + } +}); // string diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments.js index 17094dae69c..0f39ae16dee 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments.js @@ -50,21 +50,61 @@ function foo(a, b) { return r; } //var r1 = foo((x: number) => 1, (x: string) => ''); // error -var r1b = foo(function (x) { return 1; }, function (x) { return ''; }); // {} => {} -var r2 = foo(function (x) { return null; }, function (x) { return ''; }); // Object => Object -var r3 = foo(function (x) { return 1; }, function (x) { return null; }); // number => number -var r3ii = foo(function (x) { return 1; }, function (x) { return 1; }); // number => number +var r1b = foo(function (x) { + return 1; +}, function (x) { + return ''; +}); // {} => {} +var r2 = foo(function (x) { + return null; +}, function (x) { + return ''; +}); // Object => Object +var r3 = foo(function (x) { + return 1; +}, function (x) { + return null; +}); // number => number +var r3ii = foo(function (x) { + return 1; +}, function (x) { + return 1; +}); // number => number var a; var b; -var r4 = foo(function (x) { return a; }, function (x) { return b; }); // typeof a => typeof a -var r5 = foo(function (x) { return b; }, function (x) { return a; }); // typeof b => typeof b +var r4 = foo(function (x) { + return a; +}, function (x) { + return b; +}); // typeof a => typeof a +var r5 = foo(function (x) { + return b; +}, function (x) { + return a; +}); // typeof b => typeof b function other(x) { - var r6 = foo(function (a) { return a; }, function (b) { return b; }); // T => T - var r6b = foo(function (a) { return a; }, function (b) { return b; }); // {} => {} + var r6 = foo(function (a) { + return a; + }, function (b) { + return b; + }); // T => T + var r6b = foo(function (a) { + return a; + }, function (b) { + return b; + }); // {} => {} } function other2(x) { - var r7 = foo(function (a) { return a; }, function (b) { return b; }); // T => T - var r7b = foo(function (a) { return a; }, function (b) { return b; }); // {} => {} + var r7 = foo(function (a) { + return a; + }, function (b) { + return b; + }); // T => T + var r7b = foo(function (a) { + return a; + }, function (b) { + return b; + }); // {} => {} var r8 = r7(null); // BUG 835518 //var r9 = r7(new Date()); @@ -74,5 +114,9 @@ function foo2(a, b) { return r; } function other3(x) { - var r8 = foo2(function (a) { return a; }, function (b) { return b; }); // Date => Date + var r8 = foo2(function (a) { + return a; + }, function (b) { + return b; + }); // Date => Date } diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js index 7acdcc32536..4c0d57b9acf 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.js @@ -82,9 +82,17 @@ var onlyT; var r; return r; } - var r1 = foo(function (x) { return 1; }, function (x) { return ''; }); + var r1 = foo(function (x) { + return 1; + }, function (x) { + return ''; + }); function other2(x) { - var r7 = foo(function (a) { return a; }, function (b) { return b; }); // T => T + var r7 = foo(function (a) { + return a; + }, function (b) { + return b; + }); // T => T // BUG 835518 var r9 = r7(new Date()); // should be ok var r10 = r7(1); // error @@ -94,8 +102,16 @@ var onlyT; return r; } function other3(x) { - var r7 = foo2(function (a) { return a; }, function (b) { return b; }); // error - var r7b = foo2(function (a) { return a; }, function (b) { return b; }); // valid, T is inferred to be Date + var r7 = foo2(function (a) { + return a; + }, function (b) { + return b; + }); // error + var r7b = foo2(function (a) { + return a; + }, function (b) { + return b; + }); // valid, T is inferred to be Date } var E; (function (E) { @@ -109,7 +125,11 @@ var onlyT; var r; return r; } - var r7 = foo3(0 /* A */, function (x) { return 0 /* A */; }, function (x) { return 0 /* A */; }); // error + var r7 = foo3(0 /* A */, function (x) { + return 0 /* A */; + }, function (x) { + return 0 /* A */; + }); // error })(onlyT || (onlyT = {})); var TU; (function (TU) { @@ -117,9 +137,17 @@ var TU; var r; return r; } - var r1 = foo(function (x) { return 1; }, function (x) { return ''; }); + var r1 = foo(function (x) { + return 1; + }, function (x) { + return ''; + }); function other2(x) { - var r7 = foo(function (a) { return a; }, function (b) { return b; }); + var r7 = foo(function (a) { + return a; + }, function (b) { + return b; + }); var r9 = r7(new Date()); var r10 = r7(1); } @@ -128,8 +156,16 @@ var TU; return r; } function other3(x) { - var r7 = foo2(function (a) { return a; }, function (b) { return b; }); - var r7b = foo2(function (a) { return a; }, function (b) { return b; }); + var r7 = foo2(function (a) { + return a; + }, function (b) { + return b; + }); + var r7b = foo2(function (a) { + return a; + }, function (b) { + return b; + }); } var E; (function (E) { @@ -143,5 +179,9 @@ var TU; var r; return r; } - var r7 = foo3(0 /* A */, function (x) { return 0 /* A */; }, function (x) { return 0 /* A */; }); + var r7 = foo3(0 /* A */, function (x) { + return 0 /* A */; + }, function (x) { + return 0 /* A */; + }); })(TU || (TU = {})); diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js index ca28878daa3..8f691d936ec 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.js @@ -40,12 +40,36 @@ function foo(x, a, b) { var r; return r; } -var r1 = foo('', function (x) { return ''; }, function (x) { return null; }); // any => any -var r1ii = foo('', function (x) { return ''; }, function (x) { return null; }); // string => string -var r2 = foo('', function (x) { return ''; }, function (x) { return ''; }); // string => string -var r3 = foo(null, function (x) { return ''; }, function (x) { return ''; }); // Object => Object -var r4 = foo(null, function (x) { return ''; }, function (x) { return ''; }); // any => any -var r5 = foo(new Object(), function (x) { return ''; }, function (x) { return ''; }); // Object => Object +var r1 = foo('', function (x) { + return ''; +}, function (x) { + return null; +}); // any => any +var r1ii = foo('', function (x) { + return ''; +}, function (x) { + return null; +}); // string => string +var r2 = foo('', function (x) { + return ''; +}, function (x) { + return ''; +}); // string => string +var r3 = foo(null, function (x) { + return ''; +}, function (x) { + return ''; +}); // Object => Object +var r4 = foo(null, function (x) { + return ''; +}, function (x) { + return ''; +}); // any => any +var r5 = foo(new Object(), function (x) { + return ''; +}, function (x) { + return ''; +}); // Object => Object var E; (function (E) { E[E["A"] = 0] = "A"; @@ -54,14 +78,42 @@ var F; (function (F) { F[F["A"] = 0] = "A"; })(F || (F = {})); -var r6 = foo(0 /* A */, function (x) { return 0 /* A */; }, function (x) { return 0 /* A */; }); // number => number +var r6 = foo(0 /* A */, function (x) { + return 0 /* A */; +}, function (x) { + return 0 /* A */; +}); // number => number function foo2(x, a, b) { var r; return r; } -var r8 = foo2('', function (x) { return ''; }, function (x) { return null; }); // string => string -var r9 = foo2(null, function (x) { return ''; }, function (x) { return ''; }); // any => any -var r10 = foo2(null, function (x) { return ''; }, function (x) { return ''; }); // Object => Object +var r8 = foo2('', function (x) { + return ''; +}, function (x) { + return null; +}); // string => string +var r9 = foo2(null, function (x) { + return ''; +}, function (x) { + return ''; +}); // any => any +var r10 = foo2(null, function (x) { + return ''; +}, function (x) { + return ''; +}); // Object => Object var x; -var r11 = foo2(x, function (a1) { return function (n) { return 1; }; }, function (a2) { return 2; }); // error -var r12 = foo2(x, function (a1) { return function (n) { return 1; }; }, function (a2) { return 2; }); // error +var r11 = foo2(x, function (a1) { + return function (n) { + return 1; + }; +}, function (a2) { + return 2; +}); // error +var r12 = foo2(x, function (a1) { + return function (n) { + return 1; + }; +}, function (a2) { + return 2; +}); // error diff --git a/tests/baselines/reference/genericCallWithNonGenericArgs1.js b/tests/baselines/reference/genericCallWithNonGenericArgs1.js index 4f5239630ae..2282c64e851 100644 --- a/tests/baselines/reference/genericCallWithNonGenericArgs1.js +++ b/tests/baselines/reference/genericCallWithNonGenericArgs1.js @@ -4,5 +4,6 @@ f(null) //// [genericCallWithNonGenericArgs1.js] -function f(x) { } +function f(x) { +} f(null); diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArgs.js b/tests/baselines/reference/genericCallWithObjectLiteralArgs.js index 2515bbef293..17ca4ad937c 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArgs.js +++ b/tests/baselines/reference/genericCallWithObjectLiteralArgs.js @@ -12,7 +12,19 @@ var r4 = foo({ bar: 1, baz: '' }); // T = Object function foo(x) { return x; } -var r = foo({ bar: 1, baz: '' }); // error -var r2 = foo({ bar: 1, baz: 1 }); // T = number -var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo -var r4 = foo({ bar: 1, baz: '' }); // T = Object +var r = foo({ + bar: 1, + baz: '' +}); // error +var r2 = foo({ + bar: 1, + baz: 1 +}); // T = number +var r3 = foo({ + bar: foo, + baz: foo +}); // T = typeof foo +var r4 = foo({ + bar: 1, + baz: '' +}); // T = Object diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js index f140caaac61..92564c0a131 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.js @@ -8,10 +8,27 @@ var x4 = foo({ x: "", y: 4 }, ""); var x5 = foo({ x: "", y: 4 }, ""); //// [genericCallWithObjectLiteralArguments1.js] -function foo(n, m) { return m; } +function foo(n, m) { + return m; +} // these are all errors -var x = foo({ x: 3, y: "" }, 4); -var x2 = foo({ x: 3, y: "" }, 4); -var x3 = foo({ x: 3, y: "" }, 4); -var x4 = foo({ x: "", y: 4 }, ""); -var x5 = foo({ x: "", y: 4 }, ""); +var x = foo({ + x: 3, + y: "" +}, 4); +var x2 = foo({ + x: 3, + y: "" +}, 4); +var x3 = foo({ + x: 3, + y: "" +}, 4); +var x4 = foo({ + x: "", + y: 4 +}, ""); +var x5 = foo({ + x: "", + y: 4 +}, ""); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js index 3a72feff979..aa478a7fbed 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs2.js @@ -60,13 +60,27 @@ var Derived2 = (function (_super) { })(Base); // returns {}[] function f(a) { - return [a.x, a.y]; + return [ + a.x, + a.y + ]; } -var r = f({ x: new Derived(), y: new Derived2() }); // {}[] -var r2 = f({ x: new Base(), y: new Derived2() }); // {}[] +var r = f({ + x: new Derived(), + y: new Derived2() +}); // {}[] +var r2 = f({ + x: new Base(), + y: new Derived2() +}); // {}[] function f2(a) { - return function (x) { return a.y; }; + return function (x) { + return a.y; + }; } -var r3 = f2({ x: new Derived(), y: new Derived2() }); // Derived => Derived2 +var r3 = f2({ + x: new Derived(), + y: new Derived2() +}); // Derived => Derived2 var i; var r4 = f2(i); // Base => Derived diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js index c1f0945ba10..e530187859f 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints2.js @@ -63,8 +63,14 @@ function f(x) { var r; return r; } -var r = f({ foo: new Base(), bar: new Derived() }); -var r2 = f({ foo: new Derived(), bar: new Derived() }); +var r = f({ + foo: new Base(), + bar: new Derived() +}); +var r2 = f({ + foo: new Derived(), + bar: new Derived() +}); function f2(x) { var r; return r; @@ -74,7 +80,13 @@ var r3 = f2(i); function f3(x, y) { return y(null); } -var r4 = f3(new Base(), function (x) { return x; }); -var r5 = f3(new Derived(), function (x) { return x; }); +var r4 = f3(new Base(), function (x) { + return x; +}); +var r5 = f3(new Derived(), function (x) { + return x; +}); var r6 = f3(null, null); // any -var r7 = f3(null, function (x) { return x; }); // any +var r7 = f3(null, function (x) { + return x; +}); // any diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js index b9c722f80be..9dca38866c6 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.js @@ -68,17 +68,32 @@ function f(a) { var r; return r; } -var r1 = f({ x: new Derived(), y: new Derived2() }); // error because neither is supertype of the other +var r1 = f({ + x: new Derived(), + y: new Derived2() +}); // error because neither is supertype of the other function f2(a) { var r; return r; } -var r2 = f2({ x: new Derived(), y: new Derived2() }); // ok -var r3 = f2({ x: new Derived(), y: new Derived2() }); // ok +var r2 = f2({ + x: new Derived(), + y: new Derived2() +}); // ok +var r3 = f2({ + x: new Derived(), + y: new Derived2() +}); // ok function f3(y, x) { return y(null); } // all ok - second argument is processed before x is fixed -var r4 = f3(function (x) { return x; }, new Base()); -var r5 = f3(function (x) { return x; }, new Derived()); -var r6 = f3(function (x) { return x; }, null); +var r4 = f3(function (x) { + return x; +}, new Base()); +var r5 = f3(function (x) { + return x; +}, new Derived()); +var r6 = f3(function (x) { + return x; +}, null); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js index 10d32ddeae7..2872777d1bb 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js @@ -46,19 +46,29 @@ var D = (function () { return D; })(); function foo(t, t2) { - return function (x) { return t2; }; + return function (x) { + return t2; + }; } var c; var d; var r = foo(c, d); var r2 = foo(d, c); // error because C does not extend D -var r3 = foo(c, { x: '', foo: c }); +var r3 = foo(c, { + x: '', + foo: c +}); var r4 = foo(null, null); var r5 = foo({}, null); var r6 = foo(null, {}); var r7 = foo({}, {}); -var r8 = foo(function () { }, function () { }); -var r9 = foo(function () { }, function () { return 1; }); +var r8 = foo(function () { +}, function () { +}); +var r9 = foo(function () { +}, function () { + return 1; +}); function other() { var r4 = foo(c, d); var r5 = foo(c, d); // error diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js index 95b98767a09..c0432cfcacf 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js @@ -37,12 +37,17 @@ var D = (function () { return D; })(); function foo(t, t2) { - return function (x) { return t2; }; + return function (x) { + return t2; + }; } var c; var d; var r2 = foo(d, c); // the constraints are self-referencing, no downstream error -var r9 = foo(function () { return 1; }, function () { }); // the constraints are self-referencing, no downstream error +var r9 = foo(function () { + return 1; +}, function () { +}); // the constraints are self-referencing, no downstream error function other() { var r5 = foo(c, d); // error } diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js index dea5948242b..b66c9ccf6c2 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments.js @@ -54,28 +54,44 @@ var NonGenericParameter; return cb; } var r = foo4(a); - var r2 = foo4(function (x) { return x; }); - var r4 = foo4(function (x) { return x; }); + var r2 = foo4(function (x) { + return x; + }); + var r4 = foo4(function (x) { + return x; + }); })(NonGenericParameter || (NonGenericParameter = {})); var GenericParameter; (function (GenericParameter) { function foo5(cb) { return cb; } - var r5 = foo5(function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any + var r5 = foo5(function (x) { + return x; + }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any var a; var r7 = foo5(a); // any => string (+1 overload) function foo6(cb) { return cb; } - var r8 = foo6(function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any - var r9 = foo6(function (x) { return ''; }); // any => string (+1 overload) - var r11 = foo6(function (x, y) { return ''; }); // any => string (+1 overload) + var r8 = foo6(function (x) { + return x; + }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]. T is any + var r9 = foo6(function (x) { + return ''; + }); // any => string (+1 overload) + var r11 = foo6(function (x, y) { + return ''; + }); // any => string (+1 overload) function foo7(x, cb) { return cb; } - var r12 = foo7(1, function (x) { return x; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] - var r13 = foo7(1, function (x) { return ''; }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] + var r12 = foo7(1, function (x) { + return x; + }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] + var r13 = foo7(1, function (x) { + return ''; + }); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] var a; var r14 = foo7(1, a); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed] })(GenericParameter || (GenericParameter = {})); diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js index b4f96f67942..e61e2b06b4e 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.js @@ -46,22 +46,31 @@ var NonGenericParameter; function foo4(cb) { return cb; } - var r3 = foo4(function (x) { var r; return r; }); // ok + var r3 = foo4(function (x) { + var r; + return r; + }); // ok })(NonGenericParameter || (NonGenericParameter = {})); var GenericParameter; (function (GenericParameter) { function foo5(cb) { return cb; } - var r6 = foo5(function (x) { return x; }); // ok + var r6 = foo5(function (x) { + return x; + }); // ok function foo6(cb) { return cb; } - var r10 = foo6(function (x, y) { return ''; }); // error + var r10 = foo6(function (x, y) { + return ''; + }); // error function foo7(x, cb) { return cb; } - var r13 = foo7(1, function (x) { return x; }); // ok + var r13 = foo7(1, function (x) { + return x; + }); // ok var a; var r14 = foo7(1, a); // ok })(GenericParameter || (GenericParameter = {})); diff --git a/tests/baselines/reference/genericCallWithTupleType.js b/tests/baselines/reference/genericCallWithTupleType.js index 296a6dad63b..fa29f01384e 100644 --- a/tests/baselines/reference/genericCallWithTupleType.js +++ b/tests/baselines/reference/genericCallWithTupleType.js @@ -29,18 +29,48 @@ i2.tuple1 = [{}]; var i1; var i2; // no error -i1.tuple1 = ["foo", 5]; +i1.tuple1 = [ + "foo", + 5 +]; var e1 = i1.tuple1[0]; // string var e2 = i1.tuple1[1]; // number -i1.tuple1 = ["foo", 5, false, true]; +i1.tuple1 = [ + "foo", + 5, + false, + true +]; var e3 = i1.tuple1[2]; // {} -i1.tuple1[3] = { a: "string" }; +i1.tuple1[3] = { + a: "string" +}; var e4 = i1.tuple1[3]; // {} -i2.tuple1 = ["foo", 5]; -i2.tuple1 = ["foo", "bar"]; -i2.tuple1 = [5, "bar"]; -i2.tuple1 = [{}, {}]; +i2.tuple1 = [ + "foo", + 5 +]; +i2.tuple1 = [ + "foo", + "bar" +]; +i2.tuple1 = [ + 5, + "bar" +]; +i2.tuple1 = [ + {}, + {} +]; // error -i1.tuple1 = [5, "foo"]; -i1.tuple1 = [{}, {}]; -i2.tuple1 = [{}]; +i1.tuple1 = [ + 5, + "foo" +]; +i1.tuple1 = [ + {}, + {} +]; +i2.tuple1 = [ + {} +]; diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index e63c7a98272..682cd6010f1 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -56,11 +56,13 @@ var M; function D() { } D.prototype._subscribe = function (viewModel) { - var f = function (newValue) { }; + var f = function (newValue) { + }; var v = viewModel.value; // both of these should work v.subscribe(f); - v.subscribe(function (newValue) { }); + v.subscribe(function (newValue) { + }); }; return D; })(); diff --git a/tests/baselines/reference/genericCallsWithoutParens.js b/tests/baselines/reference/genericCallsWithoutParens.js index a479fbab375..e51ed55224c 100644 --- a/tests/baselines/reference/genericCallsWithoutParens.js +++ b/tests/baselines/reference/genericCallsWithoutParens.js @@ -10,7 +10,8 @@ var c = new C; // parse error //// [genericCallsWithoutParens.js] -function f() { } +function f() { +} var r = f(); // parse error var C = (function () { function C() { diff --git a/tests/baselines/reference/genericChainedCalls.js b/tests/baselines/reference/genericChainedCalls.js index a738e19023b..48bc37101cd 100644 --- a/tests/baselines/reference/genericChainedCalls.js +++ b/tests/baselines/reference/genericChainedCalls.js @@ -15,9 +15,20 @@ var s3 = s2.func(num => num.toString()) //// [genericChainedCalls.js] -var r1 = v1.func(function (num) { return num.toString(); }) - .func(function (str) { return str.length; }) // error, number doesn't have a length - .func(function (num) { return num.toString(); }); -var s1 = v1.func(function (num) { return num.toString(); }); -var s2 = s1.func(function (str) { return str.length; }); // should also error -var s3 = s2.func(function (num) { return num.toString(); }); +var r1 = v1.func(function (num) { + return num.toString(); +}).func(function (str) { + return str.length; +}) // error, number doesn't have a length +.func(function (num) { + return num.toString(); +}); +var s1 = v1.func(function (num) { + return num.toString(); +}); +var s2 = s1.func(function (str) { + return str.length; +}); // should also error +var s3 = s2.func(function (num) { + return num.toString(); +}); diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 4f26e35d1b0..8d1e87cb495 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -91,8 +91,11 @@ var Portal; var Validator = (function () { function Validator(message) { } - Validator.prototype.destroy = function () { }; - Validator.prototype._validate = function (value) { return 0; }; + Validator.prototype.destroy = function () { + }; + Validator.prototype._validate = function (value) { + return 0; + }; return Validator; })(); Validators.Validator = Validator; diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js index 5156c4d6b12..4aab45f5228 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.js @@ -78,9 +78,15 @@ var ImmediatelyFix; return C; })(); var c = new C(); - var r = c.foo(function (x) { return ''; }); // {} - var r2 = c.foo(function (x) { return ''; }); // string - var r3 = c.foo(function (x) { return ''; }); // {} + var r = c.foo(function (x) { + return ''; + }); // {} + var r2 = c.foo(function (x) { + return ''; + }); // string + var r3 = c.foo(function (x) { + return ''; + }); // {} var C2 = (function () { function C2() { } @@ -90,8 +96,12 @@ var ImmediatelyFix; return C2; })(); var c2 = new C2(); - var ra = c2.foo(function (x) { return 1; }); // number - var r3a = c2.foo(function (x) { return 1; }); // number + var ra = c2.foo(function (x) { + return 1; + }); // number + var r3a = c2.foo(function (x) { + return 1; + }); // number })(ImmediatelyFix || (ImmediatelyFix = {})); var WithCandidates; (function (WithCandidates) { @@ -104,9 +114,15 @@ var WithCandidates; return C; })(); var c; - var r4 = c.foo2(1, function (a) { return ''; }); // string, contextual signature instantiation is applied to generic functions - var r5 = c.foo2(1, function (a) { return ''; }); // string - var r6 = c.foo2('', function (a) { return 1; }); // number + var r4 = c.foo2(1, function (a) { + return ''; + }); // string, contextual signature instantiation is applied to generic functions + var r5 = c.foo2(1, function (a) { + return ''; + }); // string + var r6 = c.foo2('', function (a) { + return 1; + }); // number var C2 = (function () { function C2() { } @@ -116,8 +132,12 @@ var WithCandidates; return C2; })(); var c2; - var r7 = c2.foo3(1, function (a) { return ''; }, ''); // string - var r8 = c2.foo3(1, function (a) { return ''; }, ''); // string + var r7 = c2.foo3(1, function (a) { + return ''; + }, ''); // string + var r8 = c2.foo3(1, function (a) { + return ''; + }, ''); // string var C3 = (function () { function C3() { } @@ -128,10 +148,20 @@ var WithCandidates; })(); var c3; function other(t, u) { - var r10 = c.foo2(1, function (x) { return ''; }); // error - var r10 = c.foo2(1, function (x) { return ''; }); // string - var r11 = c3.foo3(1, function (x) { return ''; }, ''); // error - var r11b = c3.foo3(1, function (x) { return ''; }, 1); // error - var r12 = c3.foo3(1, function (a) { return ''; }, 1); // error + var r10 = c.foo2(1, function (x) { + return ''; + }); // error + var r10 = c.foo2(1, function (x) { + return ''; + }); // string + var r11 = c3.foo3(1, function (x) { + return ''; + }, ''); // error + var r11b = c3.foo3(1, function (x) { + return ''; + }, 1); // error + var r12 = c3.foo3(1, function (a) { + return ''; + }, 1); // error } })(WithCandidates || (WithCandidates = {})); diff --git a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js index 4caeacd19e2..4aca0e37520 100644 --- a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js +++ b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js @@ -25,9 +25,14 @@ var Foo = (function () { Foo.f = function (xs) { return xs.reverse(); }; - Foo.a = function (n) { }; + Foo.a = function (n) { + }; Foo.c = []; - Foo.d = false || (function (x) { return x || undefined; })(null); - Foo.e = function (x) { return null; }; + Foo.d = false || (function (x) { + return x || undefined; + })(null); + Foo.e = function (x) { + return null; + }; return Foo; })(); diff --git a/tests/baselines/reference/genericCloduleInModule.js b/tests/baselines/reference/genericCloduleInModule.js index 92c519aa012..f3938735695 100644 --- a/tests/baselines/reference/genericCloduleInModule.js +++ b/tests/baselines/reference/genericCloduleInModule.js @@ -18,8 +18,10 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { }; - B.bar = function () { }; + B.prototype.foo = function () { + }; + B.bar = function () { + }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/genericCloduleInModule2.js b/tests/baselines/reference/genericCloduleInModule2.js index bb8021ffe8c..1cb3bd66403 100644 --- a/tests/baselines/reference/genericCloduleInModule2.js +++ b/tests/baselines/reference/genericCloduleInModule2.js @@ -21,8 +21,10 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { }; - B.bar = function () { }; + B.prototype.foo = function () { + }; + B.bar = function () { + }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/genericCombinators2.js b/tests/baselines/reference/genericCombinators2.js index a23f163a906..af11f056197 100644 --- a/tests/baselines/reference/genericCombinators2.js +++ b/tests/baselines/reference/genericCombinators2.js @@ -19,6 +19,10 @@ var r5b = _.map(c2, rf1); //// [genericCombinators2.js] var _; var c2; -var rf1 = function (x, y) { return x.toFixed(); }; -var r5a = _.map(c2, function (x, y) { return x.toFixed(); }); +var rf1 = function (x, y) { + return x.toFixed(); +}; +var r5a = _.map(c2, function (x, y) { + return x.toFixed(); +}); var r5b = _.map(c2, rf1); diff --git a/tests/baselines/reference/genericConstraintDeclaration.js b/tests/baselines/reference/genericConstraintDeclaration.js index 6e3f8d5ff8b..cdf93d676d0 100644 --- a/tests/baselines/reference/genericConstraintDeclaration.js +++ b/tests/baselines/reference/genericConstraintDeclaration.js @@ -12,7 +12,9 @@ class List{ var List = (function () { function List() { } - List.empty = function () { return null; }; + List.empty = function () { + return null; + }; return List; })(); diff --git a/tests/baselines/reference/genericConstraintSatisfaction1.js b/tests/baselines/reference/genericConstraintSatisfaction1.js index 9436e62b3ba..b7438e6c456 100644 --- a/tests/baselines/reference/genericConstraintSatisfaction1.js +++ b/tests/baselines/reference/genericConstraintSatisfaction1.js @@ -9,4 +9,6 @@ x.f({s: 1}) //// [genericConstraintSatisfaction1.js] var x; -x.f({ s: 1 }); +x.f({ + s: 1 +}); diff --git a/tests/baselines/reference/genericContextualTypingSpecialization.js b/tests/baselines/reference/genericContextualTypingSpecialization.js index 75d8b995fa3..a577db15d32 100644 --- a/tests/baselines/reference/genericContextualTypingSpecialization.js +++ b/tests/baselines/reference/genericContextualTypingSpecialization.js @@ -4,4 +4,6 @@ b.reduce((c, d) => c + d, 0); // should not error on '+' //// [genericContextualTypingSpecialization.js] var b; -b.reduce(function (c, d) { return c + d; }, 0); // should not error on '+' +b.reduce(function (c, d) { + return c + d; +}, 0); // should not error on '+' diff --git a/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js b/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js index 30d57403aec..77cad2cc87f 100644 --- a/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js +++ b/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js @@ -3,6 +3,11 @@ function f(p: (x: T) => void) { }; f(x => f(y => x = y)); //// [genericFunctionHasFreshTypeArgs.js] -function f(p) { } +function f(p) { +} ; -f(function (x) { return f(function (y) { return x = y; }); }); +f(function (x) { + return f(function (y) { + return x = y; + }); +}); diff --git a/tests/baselines/reference/genericFunctionSpecializations1.js b/tests/baselines/reference/genericFunctionSpecializations1.js index c1043f792b6..2935959b69e 100644 --- a/tests/baselines/reference/genericFunctionSpecializations1.js +++ b/tests/baselines/reference/genericFunctionSpecializations1.js @@ -6,5 +6,7 @@ function foo4(test: string); // valid function foo4(test: T) { } //// [genericFunctionSpecializations1.js] -function foo3(test) { } -function foo4(test) { } +function foo3(test) { +} +function foo4(test) { +} diff --git a/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.js b/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.js index e9db28578f7..c1a8daa6a1b 100644 --- a/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.js +++ b/tests/baselines/reference/genericFunctionTypedArgumentsAreFixed.js @@ -3,4 +3,8 @@ declare function map(f: (x: T) => U, xs: T[]): U[]; map((a) => a.length, [1]); //// [genericFunctionTypedArgumentsAreFixed.js] -map(function (a) { return a.length; }, [1]); +map(function (a) { + return a.length; +}, [ + 1 +]); diff --git a/tests/baselines/reference/genericFunctions0.js b/tests/baselines/reference/genericFunctions0.js index b52f0583524..408abdb9ce0 100644 --- a/tests/baselines/reference/genericFunctions0.js +++ b/tests/baselines/reference/genericFunctions0.js @@ -4,7 +4,9 @@ function foo (x: T) { return x; } var x = foo(5); // 'x' should be number //// [genericFunctions0.js] -function foo(x) { return x; } +function foo(x) { + return x; +} var x = foo(5); // 'x' should be number diff --git a/tests/baselines/reference/genericFunctions1.js b/tests/baselines/reference/genericFunctions1.js index d9bb3413890..25cc91820b8 100644 --- a/tests/baselines/reference/genericFunctions1.js +++ b/tests/baselines/reference/genericFunctions1.js @@ -4,7 +4,9 @@ function foo (x: T) { return x; } var x = foo(5); // 'x' should be number //// [genericFunctions1.js] -function foo(x) { return x; } +function foo(x) { + return x; +} var x = foo(5); // 'x' should be number diff --git a/tests/baselines/reference/genericFunctions2.js b/tests/baselines/reference/genericFunctions2.js index f14c1be6dc9..ec01cc885bd 100644 --- a/tests/baselines/reference/genericFunctions2.js +++ b/tests/baselines/reference/genericFunctions2.js @@ -8,7 +8,9 @@ var lengths = map(myItems, x => x.length); //// [genericFunctions2.js] var myItems; -var lengths = map(myItems, function (x) { return x.length; }); +var lengths = map(myItems, function (x) { + return x.length; +}); //// [genericFunctions2.d.ts] diff --git a/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js b/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js index 9ad885a899a..2a5ce0a333c 100644 --- a/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js +++ b/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js @@ -19,13 +19,26 @@ var r5 = utils.mapReduce(c, f1, f2); var Collection = (function () { function Collection() { } - Collection.prototype.add = function (x) { }; + Collection.prototype.add = function (x) { + }; return Collection; })(); var utils; var c = new Collection(); -var r3 = utils.mapReduce(c, function (x) { return 1; }, function (y) { return new Date(); }); -var r4 = utils.mapReduce(c, function (x) { return 1; }, function (y) { return new Date(); }); -var f1 = function (x) { return 1; }; -var f2 = function (y) { return new Date(); }; +var r3 = utils.mapReduce(c, function (x) { + return 1; +}, function (y) { + return new Date(); +}); +var r4 = utils.mapReduce(c, function (x) { + return 1; +}, function (y) { + return new Date(); +}); +var f1 = function (x) { + return 1; +}; +var f2 = function (y) { + return new Date(); +}; var r5 = utils.mapReduce(c, f1, f2); diff --git a/tests/baselines/reference/genericFunduleInModule.js b/tests/baselines/reference/genericFunduleInModule.js index 95700edecab..5a85a46a395 100644 --- a/tests/baselines/reference/genericFunduleInModule.js +++ b/tests/baselines/reference/genericFunduleInModule.js @@ -12,7 +12,9 @@ A.B(1); //// [genericFunduleInModule.js] var A; (function (A) { - function B(x) { return x; } + function B(x) { + return x; + } A.B = B; var B; (function (B) { diff --git a/tests/baselines/reference/genericFunduleInModule2.js b/tests/baselines/reference/genericFunduleInModule2.js index 956e9129ec7..6b5a0a74e23 100644 --- a/tests/baselines/reference/genericFunduleInModule2.js +++ b/tests/baselines/reference/genericFunduleInModule2.js @@ -15,7 +15,9 @@ A.B(1); //// [genericFunduleInModule2.js] var A; (function (A) { - function B(x) { return x; } + function B(x) { + return x; + } A.B = B; })(A || (A = {})); var A; diff --git a/tests/baselines/reference/genericImplements.js b/tests/baselines/reference/genericImplements.js index b8d295153a4..17d3d2c0d20 100644 --- a/tests/baselines/reference/genericImplements.js +++ b/tests/baselines/reference/genericImplements.js @@ -37,20 +37,26 @@ var B = (function () { var X = (function () { function X() { } - X.prototype.f = function () { return undefined; }; + X.prototype.f = function () { + return undefined; + }; return X; })(); // { f: () => { b; } } // OK var Y = (function () { function Y() { } - Y.prototype.f = function () { return undefined; }; + Y.prototype.f = function () { + return undefined; + }; return Y; })(); // { f: () => { a; } } // OK var Z = (function () { function Z() { } - Z.prototype.f = function () { return undefined; }; + Z.prototype.f = function () { + return undefined; + }; return Z; })(); // { f: () => T } diff --git a/tests/baselines/reference/genericInference1.js b/tests/baselines/reference/genericInference1.js index dc81b9a9556..26a92970290 100644 --- a/tests/baselines/reference/genericInference1.js +++ b/tests/baselines/reference/genericInference1.js @@ -2,4 +2,10 @@ ['a', 'b', 'c'].map(x => x.length); //// [genericInference1.js] -['a', 'b', 'c'].map(function (x) { return x.length; }); +[ + 'a', + 'b', + 'c' +].map(function (x) { + return x.length; +}); diff --git a/tests/baselines/reference/genericInterfaceTypeCall.js b/tests/baselines/reference/genericInterfaceTypeCall.js index 7f5f586ec12..f171fa6e36d 100644 --- a/tests/baselines/reference/genericInterfaceTypeCall.js +++ b/tests/baselines/reference/genericInterfaceTypeCall.js @@ -17,5 +17,9 @@ test.fail2(arg => foo.reject(arg)); // Error: Supplied parameters do not match a //// [genericInterfaceTypeCall.js] var foo; var test; -test.fail(function (arg) { return foo.reject(arg); }); -test.fail2(function (arg) { return foo.reject(arg); }); // Error: Supplied parameters do not match any signature of call target +test.fail(function (arg) { + return foo.reject(arg); +}); +test.fail2(function (arg) { + return foo.reject(arg); +}); // Error: Supplied parameters do not match any signature of call target diff --git a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js index e1cc5cadbd5..f57f6713c9f 100644 --- a/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js +++ b/tests/baselines/reference/genericLambaArgWithoutTypeArguments.js @@ -12,4 +12,6 @@ foo((arg: Foo) => { return arg.x; }); function foo(a) { return null; } -foo(function (arg) { return arg.x; }); +foo(function (arg) { + return arg.x; +}); diff --git a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.js b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.js index 9b0fbf4bcad..5d4ecdc0838 100644 --- a/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.js +++ b/tests/baselines/reference/genericMergedDeclarationUsingTypeParameter.js @@ -7,7 +7,9 @@ module foo { //// [genericMergedDeclarationUsingTypeParameter.js] -function foo(y, z) { return y; } +function foo(y, z) { + return y; +} var foo; (function (foo) { foo.x; diff --git a/tests/baselines/reference/genericMethodOverspecialization.js b/tests/baselines/reference/genericMethodOverspecialization.js index 6ec28922af0..04d1466cfc4 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.js +++ b/tests/baselines/reference/genericMethodOverspecialization.js @@ -27,7 +27,13 @@ var widths:number[] = elements.map(function (e) { // should not error //// [genericMethodOverspecialization.js] -var names = ["list", "table1", "table2", "table3", "summary"]; +var names = [ + "list", + "table1", + "table2", + "table3", + "summary" +]; var elements = names.map(function (name) { return document.getElementById(name); }); diff --git a/tests/baselines/reference/genericObjectLitReturnType.js b/tests/baselines/reference/genericObjectLitReturnType.js index 826f5233b55..327da9ce0f5 100644 --- a/tests/baselines/reference/genericObjectLitReturnType.js +++ b/tests/baselines/reference/genericObjectLitReturnType.js @@ -15,7 +15,11 @@ t1.a = 5; // Should not error: t1 should have type {a: number}, instead has type var X = (function () { function X() { } - X.prototype.f = function (t) { return { a: t }; }; + X.prototype.f = function (t) { + return { + a: t + }; + }; return X; })(); var x; diff --git a/tests/baselines/reference/genericOfACloduleType1.js b/tests/baselines/reference/genericOfACloduleType1.js index 1f115aa486a..435575b0152 100644 --- a/tests/baselines/reference/genericOfACloduleType1.js +++ b/tests/baselines/reference/genericOfACloduleType1.js @@ -16,7 +16,9 @@ var g2 = new G() // was: error Type reference cannot refer to container 'M. var G = (function () { function G() { } - G.prototype.bar = function (x) { return x; }; + G.prototype.bar = function (x) { + return x; + }; return G; })(); var M; @@ -24,7 +26,8 @@ var M; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/genericOfACloduleType2.js b/tests/baselines/reference/genericOfACloduleType2.js index 1d671289cb2..4c73addcf72 100644 --- a/tests/baselines/reference/genericOfACloduleType2.js +++ b/tests/baselines/reference/genericOfACloduleType2.js @@ -19,7 +19,9 @@ module N { var G = (function () { function G() { } - G.prototype.bar = function (x) { return x; }; + G.prototype.bar = function (x) { + return x; + }; return G; })(); var M; @@ -27,7 +29,8 @@ var M; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/genericOverloadSignatures.js b/tests/baselines/reference/genericOverloadSignatures.js index 45a21d5a334..ec4c9ba74dc 100644 --- a/tests/baselines/reference/genericOverloadSignatures.js +++ b/tests/baselines/reference/genericOverloadSignatures.js @@ -31,7 +31,8 @@ interface D { } //// [genericOverloadSignatures.js] -function f(a) { } +function f(a) { +} var C2 = (function () { function C2() { } diff --git a/tests/baselines/reference/genericParameterAssignability1.js b/tests/baselines/reference/genericParameterAssignability1.js index a6a465b4089..ae8eb4348d3 100644 --- a/tests/baselines/reference/genericParameterAssignability1.js +++ b/tests/baselines/reference/genericParameterAssignability1.js @@ -4,6 +4,10 @@ var r = (x: T) => x; r = f; // should be allowed //// [genericParameterAssignability1.js] -function f(x) { return null; } -var r = function (x) { return x; }; +function f(x) { + return null; +} +var r = function (x) { + return x; +}; r = f; // should be allowed diff --git a/tests/baselines/reference/genericPrototypeProperty.js b/tests/baselines/reference/genericPrototypeProperty.js index fb6f9b78848..c38cdb753a7 100644 --- a/tests/baselines/reference/genericPrototypeProperty.js +++ b/tests/baselines/reference/genericPrototypeProperty.js @@ -13,7 +13,9 @@ var r3 = r.foo(null); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var r = C.prototype; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js index e01c9045345..11113b778d3 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors3.js @@ -69,10 +69,7 @@ var TypeScript; }; PullTypeSymbol.prototype.getScopedNameEx = function (scopeSymbol, useConstraintInName, getPrettyTypeName, getTypeParamMarkerInfo) { if (this.isArray()) { - var elementMemberName = this._elementType ? - (this._elementType.isArray() || this._elementType.isNamedTypeSymbol() ? - this._elementType.getScopedNameEx(scopeSymbol, false, getPrettyTypeName, getTypeParamMarkerInfo) : - this._elementType.getMemberTypeNameEx(false, scopeSymbol, getPrettyTypeName)) : 1; + var elementMemberName = this._elementType ? (this._elementType.isArray() || this._elementType.isNamedTypeSymbol() ? this._elementType.getScopedNameEx(scopeSymbol, false, getPrettyTypeName, getTypeParamMarkerInfo) : this._elementType.getMemberTypeNameEx(false, scopeSymbol, getPrettyTypeName)) : 1; return TypeScript.MemberName.create(elementMemberName, "", "[]"); } }; diff --git a/tests/baselines/reference/genericReduce.js b/tests/baselines/reference/genericReduce.js index ac160e43868..c725df8d8e4 100644 --- a/tests/baselines/reference/genericReduce.js +++ b/tests/baselines/reference/genericReduce.js @@ -14,14 +14,27 @@ n3.toExponential(2); // should error if 'n3' is correctly type 'string' n3.charAt(0); // should not error if 'n3' is correctly type 'string' //// [genericReduce.js] -var a = ["An", "array", "of", "strings"]; -var b = a.map(function (s) { return s.length; }); -var n1 = b.reduce(function (x, y) { return x + y; }); -var n2 = b.reduceRight(function (x, y) { return x + y; }); +var a = [ + "An", + "array", + "of", + "strings" +]; +var b = a.map(function (s) { + return s.length; +}); +var n1 = b.reduce(function (x, y) { + return x + y; +}); +var n2 = b.reduceRight(function (x, y) { + return x + y; +}); n1.x = "fail"; // should error, as 'n1' should be type 'number', not 'any'. n1.toExponential(2); // should not error if 'n1' is correctly number. n2.x = "fail"; // should error, as 'n2' should be type 'number', not 'any'. n2.toExponential(2); // should not error if 'n2' is correctly number. -var n3 = b.reduce(function (x, y) { return x + y; }, ""); // Initial value is of type string +var n3 = b.reduce(function (x, y) { + return x + y; +}, ""); // Initial value is of type string n3.toExponential(2); // should error if 'n3' is correctly type 'string' n3.charAt(0); // should not error if 'n3' is correctly type 'string' diff --git a/tests/baselines/reference/genericRestArgs.js b/tests/baselines/reference/genericRestArgs.js index 75c88d7cbf2..4c2ddcf0cd9 100644 --- a/tests/baselines/reference/genericRestArgs.js +++ b/tests/baselines/reference/genericRestArgs.js @@ -25,7 +25,11 @@ var a1Gb = makeArrayG(1, ""); var a1Gc = makeArrayG(1, ""); var a1Gd = makeArrayG(1, ""); // error function makeArrayGOpt(item1, item2, item3) { - return [item1, item2, item3]; + return [ + item1, + item2, + item3 + ]; } var a2Ga = makeArrayGOpt(1, ""); var a2Gb = makeArrayG(1, ""); diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.js b/tests/baselines/reference/genericReturnTypeFromGetter1.js index 741c7218345..208b12308e1 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.js +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.js @@ -14,7 +14,9 @@ define(["require", "exports"], function (require, exports) { function DbSet() { } Object.defineProperty(DbSet.prototype, "entityType", { - get: function () { return this._entityType; } // used to ICE without return type annotation + get: function () { + return this._entityType; + } // used to ICE without return type annotation , enumerable: true, configurable: true diff --git a/tests/baselines/reference/genericReversingTypeParameters.js b/tests/baselines/reference/genericReversingTypeParameters.js index 2a52c2e9ba6..0e51b0256ea 100644 --- a/tests/baselines/reference/genericReversingTypeParameters.js +++ b/tests/baselines/reference/genericReversingTypeParameters.js @@ -14,8 +14,12 @@ var r2b = i.get(1); var BiMap = (function () { function BiMap() { } - BiMap.prototype.get = function (key) { return null; }; - BiMap.prototype.inverse = function () { return null; }; + BiMap.prototype.get = function (key) { + return null; + }; + BiMap.prototype.inverse = function () { + return null; + }; return BiMap; })(); var b = new BiMap(); diff --git a/tests/baselines/reference/genericReversingTypeParameters2.js b/tests/baselines/reference/genericReversingTypeParameters2.js index 4f4bc564f89..eb904f4a2ed 100644 --- a/tests/baselines/reference/genericReversingTypeParameters2.js +++ b/tests/baselines/reference/genericReversingTypeParameters2.js @@ -13,8 +13,12 @@ var r2b = i.get(1); var BiMap = (function () { function BiMap() { } - BiMap.prototype.get = function (key) { return null; }; - BiMap.prototype.inverse = function () { return null; }; + BiMap.prototype.get = function (key) { + return null; + }; + BiMap.prototype.inverse = function () { + return null; + }; return BiMap; })(); var b = new BiMap(); diff --git a/tests/baselines/reference/genericSpecializations1.js b/tests/baselines/reference/genericSpecializations1.js index 3e59fceff97..3df2c5581b9 100644 --- a/tests/baselines/reference/genericSpecializations1.js +++ b/tests/baselines/reference/genericSpecializations1.js @@ -19,18 +19,24 @@ class StringFoo3 implements IFoo { var IntFooBad = (function () { function IntFooBad() { } - IntFooBad.prototype.foo = function (x) { return null; }; + IntFooBad.prototype.foo = function (x) { + return null; + }; return IntFooBad; })(); var StringFoo2 = (function () { function StringFoo2() { } - StringFoo2.prototype.foo = function (x) { return null; }; + StringFoo2.prototype.foo = function (x) { + return null; + }; return StringFoo2; })(); var StringFoo3 = (function () { function StringFoo3() { } - StringFoo3.prototype.foo = function (x) { return null; }; + StringFoo3.prototype.foo = function (x) { + return null; + }; return StringFoo3; })(); diff --git a/tests/baselines/reference/genericSpecializations2.js b/tests/baselines/reference/genericSpecializations2.js index 8497d2db8b4..666ea43eeba 100644 --- a/tests/baselines/reference/genericSpecializations2.js +++ b/tests/baselines/reference/genericSpecializations2.js @@ -31,18 +31,24 @@ var IFoo = (function () { var IntFooBad = (function () { function IntFooBad() { } - IntFooBad.prototype.foo = function (x) { return null; }; + IntFooBad.prototype.foo = function (x) { + return null; + }; return IntFooBad; })(); var StringFoo2 = (function () { function StringFoo2() { } - StringFoo2.prototype.foo = function (x) { return null; }; + StringFoo2.prototype.foo = function (x) { + return null; + }; return StringFoo2; })(); var StringFoo3 = (function () { function StringFoo3() { } - StringFoo3.prototype.foo = function (x) { return null; }; + StringFoo3.prototype.foo = function (x) { + return null; + }; return StringFoo3; })(); diff --git a/tests/baselines/reference/genericSpecializations3.js b/tests/baselines/reference/genericSpecializations3.js index 3c582ae31fd..8d157761160 100644 --- a/tests/baselines/reference/genericSpecializations3.js +++ b/tests/baselines/reference/genericSpecializations3.js @@ -41,21 +41,27 @@ iFoo.foo(1); var IntFooBad = (function () { function IntFooBad() { } - IntFooBad.prototype.foo = function (x) { return null; }; + IntFooBad.prototype.foo = function (x) { + return null; + }; return IntFooBad; })(); var intFooBad; var IntFoo = (function () { function IntFoo() { } - IntFoo.prototype.foo = function (x) { return null; }; + IntFoo.prototype.foo = function (x) { + return null; + }; return IntFoo; })(); var intFoo; var StringFoo2 = (function () { function StringFoo2() { } - StringFoo2.prototype.foo = function (x) { return null; }; + StringFoo2.prototype.foo = function (x) { + return null; + }; return StringFoo2; })(); var stringFoo2; @@ -65,7 +71,9 @@ stringFoo2 = intFoo; // error var StringFoo3 = (function () { function StringFoo3() { } - StringFoo3.prototype.foo = function (x) { return null; }; + StringFoo3.prototype.foo = function (x) { + return null; + }; return StringFoo3; })(); var stringFoo3; diff --git a/tests/baselines/reference/genericStaticAnyTypeFunction.js b/tests/baselines/reference/genericStaticAnyTypeFunction.js index 6816afec910..055e6b4f683 100644 --- a/tests/baselines/reference/genericStaticAnyTypeFunction.js +++ b/tests/baselines/reference/genericStaticAnyTypeFunction.js @@ -25,7 +25,9 @@ var A = (function () { A.one = function (source, value) { return source; }; - A.goo = function () { return 0; }; + A.goo = function () { + return 0; + }; A.two = function (source) { return this.one(source, 42); // should not error }; diff --git a/tests/baselines/reference/genericTypeArgumentInference1.js b/tests/baselines/reference/genericTypeArgumentInference1.js index 48c279f52c3..8bf6f35cb33 100644 --- a/tests/baselines/reference/genericTypeArgumentInference1.js +++ b/tests/baselines/reference/genericTypeArgumentInference1.js @@ -17,7 +17,16 @@ var r4 = _.all([true], _.identity); //// [genericTypeArgumentInference1.js] -var r = _.all([true, 1, null, 'yes'], _.identity); -var r2 = _.all([true], _.identity); +var r = _.all([ + true, + 1, + null, + 'yes' +], _.identity); +var r2 = _.all([ + true +], _.identity); var r3 = _.all([], _.identity); -var r4 = _.all([true], _.identity); +var r4 = _.all([ + true +], _.identity); diff --git a/tests/baselines/reference/genericTypeAssertions1.js b/tests/baselines/reference/genericTypeAssertions1.js index 54637007d99..02a22aa5c81 100644 --- a/tests/baselines/reference/genericTypeAssertions1.js +++ b/tests/baselines/reference/genericTypeAssertions1.js @@ -8,7 +8,8 @@ var r2: A = >>foo; // error var A = (function () { function A() { } - A.prototype.foo = function (x) { }; + A.prototype.foo = function (x) { + }; return A; })(); var foo = new A(); diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index 3c904c7a30e..c7acecb5e43 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function (x) { }; + A.prototype.foo = function (x) { + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/genericTypeAssertions3.js b/tests/baselines/reference/genericTypeAssertions3.js index b67a277654f..19a477c142c 100644 --- a/tests/baselines/reference/genericTypeAssertions3.js +++ b/tests/baselines/reference/genericTypeAssertions3.js @@ -4,5 +4,9 @@ var s = < (x: T) => T > ((x: any) => { return null; }); // no error //// [genericTypeAssertions3.js] -var r = (function (x) { return null; }); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error -var s = (function (x) { return null; }); // no error +var r = (function (x) { + return null; +}); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error +var s = (function (x) { + return null; +}); // no error diff --git a/tests/baselines/reference/genericTypeAssertions4.js b/tests/baselines/reference/genericTypeAssertions4.js index a607fb07428..d04b6cbe104 100644 --- a/tests/baselines/reference/genericTypeAssertions4.js +++ b/tests/baselines/reference/genericTypeAssertions4.js @@ -35,7 +35,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ""; }; + A.prototype.foo = function () { + return ""; + }; return A; })(); var B = (function (_super) { @@ -43,7 +45,9 @@ var B = (function (_super) { function B() { _super.apply(this, arguments); } - B.prototype.bar = function () { return 1; }; + B.prototype.bar = function () { + return 1; + }; return B; })(A); var C = (function (_super) { @@ -51,7 +55,9 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.baz = function () { return 1; }; + C.prototype.baz = function () { + return 1; + }; return C; })(A); var a; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index 4be1cce27a9..dbda6074830 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -55,9 +55,18 @@ var c; var a; var b; var d; -var e = function (x) { var y; return y; }; -function f(x) { var y; return y; } -var g = function f(x) { var y; return y; }; +var e = function (x) { + var y; + return y; +}; +function f(x) { + var y; + return y; +} +var g = function f(x) { + var y; + return y; +}; var D = (function (_super) { __extends(D, _super); function D() { @@ -86,7 +95,9 @@ var D3 = (function () { } return D3; })(); -function h(x) { } -function i(x) { } +function h(x) { +} +function i(x) { +} var j = null; var k = null; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index 803d499705a..f6a22073702 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -50,9 +50,18 @@ var c; var a; var b; var d; -var e = function (x) { var y; return y; }; -function f(x) { var y; return y; } -var g = function f(x) { var y; return y; }; +var e = function (x) { + var y; + return y; +}; +function f(x) { + var y; + return y; +} +var g = function f(x) { + var y; + return y; +}; var D = (function (_super) { __extends(D, _super); function D() { @@ -67,7 +76,9 @@ var D2 = (function (_super) { } return D2; })(M.C); -function h(x) { } -function i(x) { } +function h(x) { +} +function i(x) { +} var j = null; var k = null; diff --git a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js index 90ad9e1ff93..69bc1c372b3 100644 --- a/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js +++ b/tests/baselines/reference/genericTypeReferencesRequireTypeArgs.js @@ -15,7 +15,9 @@ var i2: I; // should be an error var C = (function () { function C() { } - C.prototype.foo = function () { return null; }; + C.prototype.foo = function () { + return null; + }; return C; })(); var c1; // error diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js index 1a57b866d99..4cd7eb4165b 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js @@ -13,7 +13,8 @@ var i: I = x; // Should not be allowed -- type of 'f' is incompatible with 'I' var X = (function () { function X() { } - X.prototype.f = function (a) { }; + X.prototype.f = function (a) { + }; return X; })(); var x = new X(); diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index fdd2e470a55..f0a57430546 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -33,7 +33,8 @@ define(["require", "exports"], function (require, exports) { function List() { _super.apply(this, arguments); } - List.prototype.Bar = function () { }; + List.prototype.Bar = function () { + }; return List; })(Collection); exports.List = List; diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.js b/tests/baselines/reference/genericWithOpenTypeParameters1.js index 90202767012..afdce73cb11 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.js +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.js @@ -15,12 +15,22 @@ var f4 = (x: B) => { return x.foo(1); } // no error var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var x; x.foo(1); // no error -var f = function (x) { return x.foo(1); }; // error -var f2 = function (x) { return x.foo(1); }; // error -var f3 = function (x) { return x.foo(1); }; // error -var f4 = function (x) { return x.foo(1); }; // no error +var f = function (x) { + return x.foo(1); +}; // error +var f2 = function (x) { + return x.foo(1); +}; // error +var f3 = function (x) { + return x.foo(1); +}; // error +var f4 = function (x) { + return x.foo(1); +}; // no error diff --git a/tests/baselines/reference/genericsAndHigherOrderFunctions.js b/tests/baselines/reference/genericsAndHigherOrderFunctions.js index f2e6ef58f22..ad03dccbca2 100644 --- a/tests/baselines/reference/genericsAndHigherOrderFunctions.js +++ b/tests/baselines/reference/genericsAndHigherOrderFunctions.js @@ -21,11 +21,15 @@ var foo: (g: (x: K) => N) => // no errors expected var combine = function (f) { return function (g) { - return function (x) { return f(g(x)); }; + return function (x) { + return f(g(x)); + }; }; }; var foo = function (g) { return function (h) { - return function (f) { return h(combine(f)(g)); }; + return function (f) { + return h(combine(f)(g)); + }; }; }; diff --git a/tests/baselines/reference/genericsManyTypeParameters.js b/tests/baselines/reference/genericsManyTypeParameters.js index 491f0c41168..09cb7658c17 100644 --- a/tests/baselines/reference/genericsManyTypeParameters.js +++ b/tests/baselines/reference/genericsManyTypeParameters.js @@ -61,22 +61,114 @@ function Foo< //// [genericsManyTypeParameters.js] function Foo(x1, y1, z1, a1, b1, c1, x2, y2, z2, a2, b2, c2, x3, y3, z3, a3, b3, c3, x4, y4, z4, a4, b4, c4, x5, y5, z5, a5, b5, c5, x6, y6, z6, a6, b6, c6, x7, y7, z7, a7, b7, c7, x8, y8, z8, a8, b8, c8, x9, y9, z9, a9, b9, c9, x10, y12, z10, a10, b10, c10, x11, y13, z11, a11, b11, c11, x12, y14, z12, a12, b12, c12, x13, y15, z13, a13, b13, c13, x14, y16, z14, a14, b14, c14, x15, y17, z15, a15, b15, c15, x16, y18, z16, a16, b16, c16, x17, y19, z17, a17, b17, c17, x18, y10, z18, a18, b18, c18) { - return [x1, y1, z1, a1, b1, c1, - x2, y2, z2, a2, b2, c2, - x3, y3, z3, a3, b3, c3, - x4, y4, z4, a4, b4, c4, - x5, y5, z5, a5, b5, c5, - x6, y6, z6, a6, b6, c6, - x7, y7, z7, a7, b7, c7, - x8, y8, z8, a8, b8, c8, - x9, y9, z9, a9, b9, c9, - x10, y12, z10, a10, b10, c10, - x11, y13, z11, a11, b11, c11, - x12, y14, z12, a12, b12, c12, - x13, y15, z13, a13, b13, c13, - x14, y16, z14, a14, b14, c14, - x15, y17, z15, a15, b15, c15, - x16, y18, z16, a16, b16, c16, - x17, y19, z17, a17, b17, c17, - x18, y10, z18, a18, b18, c18]; + return [ + x1, + y1, + z1, + a1, + b1, + c1, + x2, + y2, + z2, + a2, + b2, + c2, + x3, + y3, + z3, + a3, + b3, + c3, + x4, + y4, + z4, + a4, + b4, + c4, + x5, + y5, + z5, + a5, + b5, + c5, + x6, + y6, + z6, + a6, + b6, + c6, + x7, + y7, + z7, + a7, + b7, + c7, + x8, + y8, + z8, + a8, + b8, + c8, + x9, + y9, + z9, + a9, + b9, + c9, + x10, + y12, + z10, + a10, + b10, + c10, + x11, + y13, + z11, + a11, + b11, + c11, + x12, + y14, + z12, + a12, + b12, + c12, + x13, + y15, + z13, + a13, + b13, + c13, + x14, + y16, + z14, + a14, + b14, + c14, + x15, + y17, + z15, + a15, + b15, + c15, + x16, + y18, + z16, + a16, + b16, + c16, + x17, + y19, + z17, + a17, + b17, + c17, + x18, + y10, + z18, + a18, + b18, + c18 + ]; } diff --git a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js index 72eeb1ab683..f7f638f10e0 100644 --- a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js +++ b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js @@ -17,16 +17,25 @@ var m = { } //// [genericsWithDuplicateTypeParameters1.js] -function f() { } -function f2(a, b) { return null; } +function f() { +} +function f2(a, b) { + return null; +} var C = (function () { function C() { } - C.prototype.f = function () { }; - C.prototype.f2 = function (a, b) { return null; }; + C.prototype.f = function () { + }; + C.prototype.f2 = function (a, b) { + return null; + }; return C; })(); var m = { - a: function f() { }, - b: function f2(a, b) { return null; } + a: function f() { + }, + b: function f2(a, b) { + return null; + } }; diff --git a/tests/baselines/reference/genericsWithoutTypeParameters1.js b/tests/baselines/reference/genericsWithoutTypeParameters1.js index 41abffcb854..b4bc079cf80 100644 --- a/tests/baselines/reference/genericsWithoutTypeParameters1.js +++ b/tests/baselines/reference/genericsWithoutTypeParameters1.js @@ -37,17 +37,29 @@ function f(x: T): A { var C = (function () { function C() { } - C.prototype.foo = function () { return null; }; + C.prototype.foo = function () { + return null; + }; return C; })(); var c1; var i1; var c2; var i2; -function foo(x, y) { } -function foo2(x, y) { } -var x = { a: new C() }; -var x2 = { a: { bar: function () { return 1; } } }; +function foo(x, y) { +} +function foo2(x, y) { +} +var x = { + a: new C() +}; +var x2 = { + a: { + bar: function () { + return 1; + } + } +}; var D = (function () { function D() { } diff --git a/tests/baselines/reference/getAndSetAsMemberNames.js b/tests/baselines/reference/getAndSetAsMemberNames.js index 8b036cd0f73..22f99920fb1 100644 --- a/tests/baselines/reference/getAndSetAsMemberNames.js +++ b/tests/baselines/reference/getAndSetAsMemberNames.js @@ -49,11 +49,16 @@ var C4 = (function () { })(); var C5 = (function () { function C5() { - this.set = function () { return true; }; + this.set = function () { + return true; + }; } - C5.prototype.get = function () { return true; }; + C5.prototype.get = function () { + return true; + }; Object.defineProperty(C5.prototype, "t", { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/getAndSetNotIdenticalType.js b/tests/baselines/reference/getAndSetNotIdenticalType.js index e6eb7fecc86..7e77fc25d0b 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType.js +++ b/tests/baselines/reference/getAndSetNotIdenticalType.js @@ -14,7 +14,8 @@ var C = (function () { get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/getsetReturnTypes.js b/tests/baselines/reference/getsetReturnTypes.js index 27b6fc52fe5..55d7e9285b0 100644 --- a/tests/baselines/reference/getsetReturnTypes.js +++ b/tests/baselines/reference/getsetReturnTypes.js @@ -10,7 +10,9 @@ var y: number = makePoint(2).x; //// [getsetReturnTypes.js] function makePoint(x) { return { - get x() { return x; } + get x() { + return x; + } }; } ; diff --git a/tests/baselines/reference/getterSetterNonAccessor.js b/tests/baselines/reference/getterSetterNonAccessor.js index c28337ff7b4..e234574d734 100644 --- a/tests/baselines/reference/getterSetterNonAccessor.js +++ b/tests/baselines/reference/getterSetterNonAccessor.js @@ -10,8 +10,11 @@ Object.defineProperty({}, "0", ({ //// [getterSetterNonAccessor.js] -function getFunc() { return 0; } -function setFunc(v) { } +function getFunc() { + return 0; +} +function setFunc(v) { +} Object.defineProperty({}, "0", ({ get: getFunc, set: setFunc, diff --git a/tests/baselines/reference/gettersAndSetters.js b/tests/baselines/reference/gettersAndSetters.js index 92f959e5988..ded54213401 100644 --- a/tests/baselines/reference/gettersAndSetters.js +++ b/tests/baselines/reference/gettersAndSetters.js @@ -46,21 +46,31 @@ var C = (function () { function C() { this.fooBack = ""; this.bazBack = ""; - this.get = function () { }; // ok - this.set = function () { }; // ok + this.get = function () { + }; // ok + this.set = function () { + }; // ok } Object.defineProperty(C.prototype, "Foo", { - get: function () { return this.fooBack; } // ok + get: function () { + return this.fooBack; + } // ok , - set: function (foo) { this.fooBack = foo; } // ok + set: function (foo) { + this.fooBack = foo; + } // ok , enumerable: true, configurable: true }); Object.defineProperty(C, "Bar", { - get: function () { return C.barBack; } // ok + get: function () { + return C.barBack; + } // ok , - set: function (bar) { C.barBack = bar; } // ok + set: function (bar) { + C.barBack = bar; + } // ok , enumerable: true, configurable: true @@ -76,7 +86,16 @@ C.Bar = "barv"; var baz = c.Baz; c.Baz = "bazv"; // The Foo accessors' return and param types should be contextually typed to the Foo field -var o = { get Foo() { return 0; }, set Foo(val) { val; } }; // o +var o = { + get Foo() { + return 0; + }, + set Foo(val) { + val; + } +}; // o var ofg = o.Foo; o.Foo = 0; -var i = function (n) { return n; }; +var i = function (n) { + return n; +}; diff --git a/tests/baselines/reference/gettersAndSettersAccessibility.js b/tests/baselines/reference/gettersAndSettersAccessibility.js index e0cfa3d17c5..9a7564ec96d 100644 --- a/tests/baselines/reference/gettersAndSettersAccessibility.js +++ b/tests/baselines/reference/gettersAndSettersAccessibility.js @@ -10,8 +10,11 @@ var C99 = (function () { function C99() { } Object.defineProperty(C99.prototype, "Baz", { - get: function () { return 0; }, - set: function (n) { } // error - accessors do not agree in visibility + get: function () { + return 0; + }, + set: function (n) { + } // error - accessors do not agree in visibility , enumerable: true, configurable: true diff --git a/tests/baselines/reference/gettersAndSettersErrors.js b/tests/baselines/reference/gettersAndSettersErrors.js index d92f0d833f5..514a69b2513 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.js +++ b/tests/baselines/reference/gettersAndSettersErrors.js @@ -22,17 +22,23 @@ var C = (function () { this.Foo = 0; // error - duplicate identifier Foo - confirmed } Object.defineProperty(C.prototype, "Foo", { - get: function () { return "foo"; } // ok + get: function () { + return "foo"; + } // ok , - set: function (foo) { } // ok + set: function (foo) { + } // ok , enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "Goo", { - get: function (v) { return null; } // error - getters must not have a parameter + get: function (v) { + return null; + } // error - getters must not have a parameter , - set: function (v) { } // error - setters must not specify a return type + set: function (v) { + } // error - setters must not specify a return type , enumerable: true, configurable: true @@ -43,8 +49,11 @@ var E = (function () { function E() { } Object.defineProperty(E.prototype, "Baz", { - get: function () { return 0; }, - set: function (n) { } // error - accessors do not agree in visibility + get: function () { + return 0; + }, + set: function (n) { + } // error - accessors do not agree in visibility , enumerable: true, configurable: true diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.js b/tests/baselines/reference/gettersAndSettersTypesAgree.js index 91d3d844981..695a77a001a 100644 --- a/tests/baselines/reference/gettersAndSettersTypesAgree.js +++ b/tests/baselines/reference/gettersAndSettersTypesAgree.js @@ -15,22 +15,40 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { return "foo"; } // ok + get: function () { + return "foo"; + } // ok , - set: function (foo) { } // ok - type inferred from getter return statement + set: function (foo) { + } // ok - type inferred from getter return statement , enumerable: true, configurable: true }); Object.defineProperty(C.prototype, "Bar", { - get: function () { return "foo"; } // ok + get: function () { + return "foo"; + } // ok , - set: function (bar) { } // ok - type must be declared + set: function (bar) { + } // ok - type must be declared , enumerable: true, configurable: true }); return C; })(); -var o1 = { get Foo() { return 0; }, set Foo(val) { } }; // ok - types agree (inference) -var o2 = { get Foo() { return 0; }, set Foo(val) { } }; // ok - types agree +var o1 = { + get Foo() { + return 0; + }, + set Foo(val) { + } +}; // ok - types agree (inference) +var o2 = { + get Foo() { + return 0; + }, + set Foo(val) { + } +}; // ok - types agree diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index a5109b6e113..9de46f76b1b 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -697,45 +697,55 @@ define(["require", "exports"], function (require, exports) { MAX DEPTH 3 LEVELS */ var V; - function F() { } + function F() { + } ; var C = (function () { function C() { } - C.prototype.pF = function () { }; - C.prototype.rF = function () { }; - C.prototype.pgF = function () { }; + C.prototype.pF = function () { + }; + C.prototype.rF = function () { + }; + C.prototype.pgF = function () { + }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { }; + C.prototype.psF = function (param) { + }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { }; + C.prototype.rgF = function () { + }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { }; + C.prototype.rsF = function (param) { + }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { }; - C.tsF = function (param) { }; + C.tF = function () { + }; + C.tsF = function (param) { + }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { }; + C.tgF = function () { + }; Object.defineProperty(C, "tgF", { get: function () { }, enumerable: true, @@ -746,45 +756,55 @@ define(["require", "exports"], function (require, exports) { var M; (function (_M) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { } - C.prototype.pF = function () { }; - C.prototype.rF = function () { }; - C.prototype.pgF = function () { }; + C.prototype.pF = function () { + }; + C.prototype.rF = function () { + }; + C.prototype.pgF = function () { + }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { }; + C.prototype.psF = function (param) { + }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { }; + C.prototype.rgF = function () { + }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { }; + C.prototype.rsF = function (param) { + }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { }; - C.tsF = function (param) { }; + C.tF = function () { + }; + C.tsF = function (param) { + }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { }; + C.tgF = function () { + }; Object.defineProperty(C, "tgF", { get: function () { }, enumerable: true, @@ -795,7 +815,8 @@ define(["require", "exports"], function (require, exports) { var M; (function (M) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { @@ -806,7 +827,8 @@ define(["require", "exports"], function (require, exports) { ; ; M.eV; - function eF() { } + function eF() { + } M.eF = eF; ; var eC = (function () { @@ -823,46 +845,56 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); _M.eV; - function eF() { } + function eF() { + } _M.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { }; - eC.prototype.rF = function () { }; - eC.prototype.pgF = function () { }; + eC.prototype.pF = function () { + }; + eC.prototype.rF = function () { + }; + eC.prototype.pgF = function () { + }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { }; + eC.prototype.psF = function (param) { + }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { }; + eC.prototype.rgF = function () { + }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { }; + eC.prototype.rsF = function (param) { + }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { }; - eC.tsF = function (param) { }; + eC.tF = function () { + }; + eC.tsF = function (param) { + }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { }; + eC.tgF = function () { + }; Object.defineProperty(eC, "tgF", { get: function () { }, enumerable: true, @@ -874,7 +906,8 @@ define(["require", "exports"], function (require, exports) { var eM; (function (eM) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { @@ -885,7 +918,8 @@ define(["require", "exports"], function (require, exports) { ; ; eM.eV; - function eF() { } + function eF() { + } eM.eF = eF; ; var eC = (function () { @@ -904,46 +938,56 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); exports.eV; - function eF() { } + function eF() { + } exports.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { }; - eC.prototype.rF = function () { }; - eC.prototype.pgF = function () { }; + eC.prototype.pF = function () { + }; + eC.prototype.rF = function () { + }; + eC.prototype.pgF = function () { + }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { }; + eC.prototype.psF = function (param) { + }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { }; + eC.prototype.rgF = function () { + }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { }; + eC.prototype.rsF = function (param) { + }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { }; - eC.tsF = function (param) { }; + eC.tF = function () { + }; + eC.tsF = function (param) { + }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { }; + eC.tgF = function () { + }; Object.defineProperty(eC, "tgF", { get: function () { }, enumerable: true, @@ -955,45 +999,55 @@ define(["require", "exports"], function (require, exports) { var eM; (function (_eM) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { } - C.prototype.pF = function () { }; - C.prototype.rF = function () { }; - C.prototype.pgF = function () { }; + C.prototype.pF = function () { + }; + C.prototype.rF = function () { + }; + C.prototype.pgF = function () { + }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { }; + C.prototype.psF = function (param) { + }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { }; + C.prototype.rgF = function () { + }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { }; + C.prototype.rsF = function (param) { + }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { }; - C.tsF = function (param) { }; + C.tF = function () { + }; + C.tsF = function (param) { + }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { }; + C.tgF = function () { + }; Object.defineProperty(C, "tgF", { get: function () { }, enumerable: true, @@ -1004,7 +1058,8 @@ define(["require", "exports"], function (require, exports) { var M; (function (M) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { @@ -1015,7 +1070,8 @@ define(["require", "exports"], function (require, exports) { ; ; M.eV; - function eF() { } + function eF() { + } M.eF = eF; ; var eC = (function () { @@ -1032,46 +1088,56 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); _eM.eV; - function eF() { } + function eF() { + } _eM.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { }; - eC.prototype.rF = function () { }; - eC.prototype.pgF = function () { }; + eC.prototype.pF = function () { + }; + eC.prototype.rF = function () { + }; + eC.prototype.pgF = function () { + }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { }; + eC.prototype.psF = function (param) { + }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { }; + eC.prototype.rgF = function () { + }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { }; + eC.prototype.rsF = function (param) { + }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { }; - eC.tsF = function (param) { }; + eC.tF = function () { + }; + eC.tsF = function (param) { + }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { }; + eC.tgF = function () { + }; Object.defineProperty(eC, "tgF", { get: function () { }, enumerable: true, @@ -1083,7 +1149,8 @@ define(["require", "exports"], function (require, exports) { var eM; (function (eM) { var V; - function F() { } + function F() { + } ; var C = (function () { function C() { @@ -1094,7 +1161,8 @@ define(["require", "exports"], function (require, exports) { ; ; eM.eV; - function eF() { } + function eF() { + } eM.eF = eF; ; var eC = (function () { diff --git a/tests/baselines/reference/globalThisCapture.js b/tests/baselines/reference/globalThisCapture.js index b854e754a34..5e724d77e0f 100644 --- a/tests/baselines/reference/globalThisCapture.js +++ b/tests/baselines/reference/globalThisCapture.js @@ -11,7 +11,9 @@ parts[0]; //// [globalThisCapture.js] var _this = this; // Add a lambda to ensure global 'this' capture is triggered -(function () { return _this.window; }); +(function () { + return _this.window; +}); var parts = []; // Ensure that the generated code is correct parts[0]; diff --git a/tests/baselines/reference/grammarAmbiguities.js b/tests/baselines/reference/grammarAmbiguities.js index f603bd1023f..ee81d947ff6 100644 --- a/tests/baselines/reference/grammarAmbiguities.js +++ b/tests/baselines/reference/grammarAmbiguities.js @@ -12,8 +12,12 @@ f(g < A, B > +(7)); // Should error //// [grammarAmbiguities.js] -function f(n) { return null; } -function g(x) { return null; } +function f(n) { + return null; +} +function g(x) { + return null; +} var A, B; f(g(7)); f(g < A, B > 7); // Should error diff --git a/tests/baselines/reference/grammarAmbiguities1.js b/tests/baselines/reference/grammarAmbiguities1.js index 1917acb7128..cb6e4b75473 100644 --- a/tests/baselines/reference/grammarAmbiguities1.js +++ b/tests/baselines/reference/grammarAmbiguities1.js @@ -14,17 +14,23 @@ f(g < A, B > +(7)); var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { }; + B.prototype.bar = function () { + }; return B; })(); -function f(x) { return x; } -function g(x) { return f(x); } +function f(x) { + return x; +} +function g(x) { + return f(x); +} g(7); f(g(7)); f(g < A, B > 7); diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.js b/tests/baselines/reference/heterogeneousArrayAndOverloads.js index b816b87e3d1..f18cef71307 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.js +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.js @@ -15,12 +15,25 @@ class arrTest { var arrTest = (function () { function arrTest() { } - arrTest.prototype.test = function (arg1) { }; + arrTest.prototype.test = function (arg1) { + }; arrTest.prototype.callTest = function () { - this.test([1, 2, 3, 5]); - this.test(["hi"]); + this.test([ + 1, + 2, + 3, + 5 + ]); + this.test([ + "hi" + ]); this.test([]); - this.test([1, 2, "hi", 5]); // Error + this.test([ + 1, + 2, + "hi", + 5 + ]); // Error }; return arrTest; })(); diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.js b/tests/baselines/reference/heterogeneousArrayLiterals.js index 4ac929305c0..51d316a4f43 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.js +++ b/tests/baselines/reference/heterogeneousArrayLiterals.js @@ -139,20 +139,106 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -var a = [1, '']; // {}[] -var b = [1, null]; // number[] -var c = [1, '', null]; // {}[] -var d = [{}, 1]; // {}[] -var e = [{}, Object]; // {}[] -var f = [[], [1]]; // number[][] -var g = [[1], ['']]; // {}[] -var h = [{ foo: 1, bar: '' }, { foo: 2 }]; // {foo: number}[] -var i = [{ foo: 1, bar: '' }, { foo: '' }]; // {}[] -var j = [function () { return 1; }, function () { return ''; }]; // {}[] -var k = [function () { return 1; }, function () { return 1; }]; // { (): number }[] -var l = [function () { return 1; }, function () { return null; }]; // { (): any }[] -var m = [function () { return 1; }, function () { return ''; }, function () { return null; }]; // { (): any }[] -var n = [[function () { return 1; }], [function () { return ''; }]]; // {}[] +var a = [ + 1, + '' +]; // {}[] +var b = [ + 1, + null +]; // number[] +var c = [ + 1, + '', + null +]; // {}[] +var d = [ + {}, + 1 +]; // {}[] +var e = [ + {}, + Object +]; // {}[] +var f = [ + [], + [ + 1 + ] +]; // number[][] +var g = [ + [ + 1 + ], + [ + '' + ] +]; // {}[] +var h = [ + { + foo: 1, + bar: '' + }, + { + foo: 2 + } +]; // {foo: number}[] +var i = [ + { + foo: 1, + bar: '' + }, + { + foo: '' + } +]; // {}[] +var j = [ + function () { + return 1; + }, + function () { + return ''; + } +]; // {}[] +var k = [ + function () { + return 1; + }, + function () { + return 1; + } +]; // { (): number }[] +var l = [ + function () { + return 1; + }, + function () { + return null; + } +]; // { (): any }[] +var m = [ + function () { + return 1; + }, + function () { + return ''; + }, + function () { + return null; + } +]; // { (): any }[] +var n = [ + [ + function () { + return 1; + } + ], + [ + function () { + return ''; + } + ] +]; // {}[] var Base = (function () { function Base() { } @@ -177,69 +263,312 @@ var derived; var derived2; var Derived; (function (Derived) { - var h = [{ foo: base, basear: derived }, { foo: base }]; // {foo: Base}[] - var i = [{ foo: base, basear: derived }, { foo: derived }]; // {foo: Derived}[] - var j = [function () { return base; }, function () { return derived; }]; // { {}: Base } - var k = [function () { return base; }, function () { return 1; }]; // {}[]~ - var l = [function () { return base; }, function () { return null; }]; // { (): any }[] - var m = [function () { return base; }, function () { return derived; }, function () { return null; }]; // { (): any }[] - var n = [[function () { return base; }], [function () { return derived; }]]; // { (): Base }[] - var o = [derived, derived2]; // {}[] - var p = [derived, derived2, base]; // Base[] - var q = [[function () { return derived2; }], [function () { return derived; }]]; // {}[] + var h = [ + { + foo: base, + basear: derived + }, + { + foo: base + } + ]; // {foo: Base}[] + var i = [ + { + foo: base, + basear: derived + }, + { + foo: derived + } + ]; // {foo: Derived}[] + var j = [ + function () { + return base; + }, + function () { + return derived; + } + ]; // { {}: Base } + var k = [ + function () { + return base; + }, + function () { + return 1; + } + ]; // {}[]~ + var l = [ + function () { + return base; + }, + function () { + return null; + } + ]; // { (): any }[] + var m = [ + function () { + return base; + }, + function () { + return derived; + }, + function () { + return null; + } + ]; // { (): any }[] + var n = [ + [ + function () { + return base; + } + ], + [ + function () { + return derived; + } + ] + ]; // { (): Base }[] + var o = [ + derived, + derived2 + ]; // {}[] + var p = [ + derived, + derived2, + base + ]; // Base[] + var q = [ + [ + function () { + return derived2; + } + ], + [ + function () { + return derived; + } + ] + ]; // {}[] })(Derived || (Derived = {})); var WithContextualType; (function (WithContextualType) { // no errors - var a = [derived, derived2]; - var b = [null]; + var a = [ + derived, + derived2 + ]; + var b = [ + null + ]; var c = []; - var d = [function () { return derived; }, function () { return derived2; }]; + var d = [ + function () { + return derived; + }, + function () { + return derived2; + } + ]; })(WithContextualType || (WithContextualType = {})); function foo(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] + var a = [ + t, + t + ]; // T[] + var b = [ + t, + null + ]; // T[] + var c = [ + t, + u + ]; // {}[] + var d = [ + t, + 1 + ]; // {}[] + var e = [ + function () { + return t; + }, + function () { + return u; + } + ]; // {}[] + var f = [ + function () { + return t; + }, + function () { + return u; + }, + function () { + return null; + } + ]; // { (): any }[] } function foo2(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] + var a = [ + t, + t + ]; // T[] + var b = [ + t, + null + ]; // T[] + var c = [ + t, + u + ]; // {}[] + var d = [ + t, + 1 + ]; // {}[] + var e = [ + function () { + return t; + }, + function () { + return u; + } + ]; // {}[] + var f = [ + function () { + return t; + }, + function () { + return u; + }, + function () { + return null; + } + ]; // { (): any }[] + var g = [ + t, + base + ]; // Base[] + var h = [ + t, + derived + ]; // Derived[] + var i = [ + u, + base + ]; // Base[] + var j = [ + u, + derived + ]; // Derived[] } function foo3(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // {}[] - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] + var a = [ + t, + t + ]; // T[] + var b = [ + t, + null + ]; // T[] + var c = [ + t, + u + ]; // {}[] + var d = [ + t, + 1 + ]; // {}[] + var e = [ + function () { + return t; + }, + function () { + return u; + } + ]; // {}[] + var f = [ + function () { + return t; + }, + function () { + return u; + }, + function () { + return null; + } + ]; // { (): any }[] + var g = [ + t, + base + ]; // Base[] + var h = [ + t, + derived + ]; // Derived[] + var i = [ + u, + base + ]; // Base[] + var j = [ + u, + derived + ]; // Derived[] } function foo4(t, u) { - var a = [t, t]; // T[] - var b = [t, null]; // T[] - var c = [t, u]; // BUG 821629 - var d = [t, 1]; // {}[] - var e = [function () { return t; }, function () { return u; }]; // {}[] - var f = [function () { return t; }, function () { return u; }, function () { return null; }]; // { (): any }[] - var g = [t, base]; // Base[] - var h = [t, derived]; // Derived[] - var i = [u, base]; // Base[] - var j = [u, derived]; // Derived[] - var k = [t, u]; + var a = [ + t, + t + ]; // T[] + var b = [ + t, + null + ]; // T[] + var c = [ + t, + u + ]; // BUG 821629 + var d = [ + t, + 1 + ]; // {}[] + var e = [ + function () { + return t; + }, + function () { + return u; + } + ]; // {}[] + var f = [ + function () { + return t; + }, + function () { + return u; + }, + function () { + return null; + } + ]; // { (): any }[] + var g = [ + t, + base + ]; // Base[] + var h = [ + t, + derived + ]; // Derived[] + var i = [ + u, + base + ]; // Base[] + var j = [ + u, + derived + ]; // Derived[] + var k = [ + t, + u + ]; } //function foo3(t: T, u: U) { // var a = [t, t]; // T[] diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 793094584bf..db23ea4681c 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -186,8 +186,12 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } -function F2(x) { return x < 42; } +function F(x) { + return 42; +} +function F2(x) { + return x < 42; +} var M; (function (M) { var A = (function () { @@ -196,7 +200,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var N; @@ -207,101 +213,216 @@ var N; return A; })(); N.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } N.F2 = F2; })(N || (N = {})); // literals -if (true) { } -while (true) { } -do { } while (true); -if (null) { } -while (null) { } -do { } while (null); -if (undefined) { } -while (undefined) { } -do { } while (undefined); -if (0.0) { } -while (0.0) { } -do { } while (0.0); -if ('a string') { } -while ('a string') { } -do { } while ('a string'); -if ('') { } -while ('') { } -do { } while (''); -if (/[a-z]/) { } -while (/[a-z]/) { } -do { } while (/[a-z]/); -if ([]) { } -while ([]) { } -do { } while ([]); -if ([1, 2]) { } -while ([1, 2]) { } -do { } while ([1, 2]); -if ({}) { } -while ({}) { } -do { } while ({}); -if ({ x: 1, y: 'a' }) { } -while ({ x: 1, y: 'a' }) { } -do { } while ({ x: 1, y: 'a' }); -if (function () { return 43; }) { } -while (function () { return 43; }) { } -do { } while (function () { return 43; }); -if (new C()) { } -while (new C()) { } -do { } while (new C()); -if (new D()) { } -while (new D()) { } -do { } while (new D()); +if (true) { +} +while (true) { +} +do { +} while (true); +if (null) { +} +while (null) { +} +do { +} while (null); +if (undefined) { +} +while (undefined) { +} +do { +} while (undefined); +if (0.0) { +} +while (0.0) { +} +do { +} while (0.0); +if ('a string') { +} +while ('a string') { +} +do { +} while ('a string'); +if ('') { +} +while ('') { +} +do { +} while (''); +if (/[a-z]/) { +} +while (/[a-z]/) { +} +do { +} while (/[a-z]/); +if ([]) { +} +while ([]) { +} +do { +} while ([]); +if ([ + 1, + 2 +]) { +} +while ([ + 1, + 2 +]) { +} +do { +} while ([ + 1, + 2 +]); +if ({}) { +} +while ({}) { +} +do { +} while ({}); +if ({ + x: 1, + y: 'a' +}) { +} +while ({ + x: 1, + y: 'a' +}) { +} +do { +} while ({ + x: 1, + y: 'a' +}); +if (function () { + return 43; +}) { +} +while (function () { + return 43; +}) { +} +do { +} while (function () { + return 43; +}); +if (new C()) { +} +while (new C()) { +} +do { +} while (new C()); +if (new D()) { +} +while (new D()) { +} +do { +} while (new D()); // references var a = true; -if (a) { } -while (a) { } -do { } while (a); +if (a) { +} +while (a) { +} +do { +} while (a); var b = null; -if (b) { } -while (b) { } -do { } while (b); +if (b) { +} +while (b) { +} +do { +} while (b); var c = undefined; -if (c) { } -while (c) { } -do { } while (c); +if (c) { +} +while (c) { +} +do { +} while (c); var d = 0.0; -if (d) { } -while (d) { } -do { } while (d); +if (d) { +} +while (d) { +} +do { +} while (d); var e = 'a string'; -if (e) { } -while (e) { } -do { } while (e); +if (e) { +} +while (e) { +} +do { +} while (e); var f = ''; -if (f) { } -while (f) { } -do { } while (f); +if (f) { +} +while (f) { +} +do { +} while (f); var g = /[a-z]/; -if (g) { } -while (g) { } -do { } while (g); +if (g) { +} +while (g) { +} +do { +} while (g); var h = []; -if (h) { } -while (h) { } -do { } while (h); -var i = [1, 2]; -if (i) { } -while (i) { } -do { } while (i); +if (h) { +} +while (h) { +} +do { +} while (h); +var i = [ + 1, + 2 +]; +if (i) { +} +while (i) { +} +do { +} while (i); var j = {}; -if (j) { } -while (j) { } -do { } while (j); -var k = { x: 1, y: 'a' }; -if (k) { } -while (k) { } -do { } while (k); -function fn(x) { return null; } -if (fn()) { } -while (fn()) { } -do { } while (fn()); -if (fn) { } -while (fn) { } -do { } while (fn); +if (j) { +} +while (j) { +} +do { +} while (j); +var k = { + x: 1, + y: 'a' +}; +if (k) { +} +while (k) { +} +do { +} while (k); +function fn(x) { + return null; +} +if (fn()) { +} +while (fn()) { +} +do { +} while (fn()); +if (fn) { +} +while (fn) { +} +do { +} while (fn); diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.js b/tests/baselines/reference/illegalSuperCallsInConstructor.js index 0bdcebed9c5..5fbad149b91 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.js +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.js @@ -35,9 +35,15 @@ var Base = (function () { var Derived = (function (_super) { __extends(Derived, _super); function Derived() { - var r2 = function () { return _super.call(this); }; - var r3 = function () { _super.call(this); }; - var r4 = function () { _super.call(this); }; + var r2 = function () { + return _super.call(this); + }; + var r3 = function () { + _super.call(this); + }; + var r4 = function () { + _super.call(this); + }; var r5 = { get foo() { _super.call(this); diff --git a/tests/baselines/reference/implementsClauseAlreadySeen.js b/tests/baselines/reference/implementsClauseAlreadySeen.js index abb28886615..84823c13fa8 100644 --- a/tests/baselines/reference/implementsClauseAlreadySeen.js +++ b/tests/baselines/reference/implementsClauseAlreadySeen.js @@ -15,6 +15,7 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.baz = function () { }; + D.prototype.baz = function () { + }; return D; })(); diff --git a/tests/baselines/reference/implicitAnyCastedValue.js b/tests/baselines/reference/implicitAnyCastedValue.js index be6bd1bfef3..bc0855c838b 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.js +++ b/tests/baselines/reference/implicitAnyCastedValue.js @@ -160,4 +160,7 @@ function multipleRets2(x) { var bar1 = null; var bar2 = undefined; var bar3 = 0; -var array = [null, undefined]; +var array = [ + null, + undefined +]; diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js index 9bfad713d82..cba7602d049 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js +++ b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js @@ -19,15 +19,32 @@ var lambda10 = function temp1() { return 5; } //// [implicitAnyDeclareFunctionExprWithoutFormalType.js] // these should be errors for implicit any parameter -var lambda = function (l1) { }; // Error at "l1" -var lambd2 = function (ll1, ll2) { }; // Error at "ll1" -var lamda3 = function myLambda3(myParam) { }; -var lamda4 = function () { return null; }; +var lambda = function (l1) { +}; // Error at "l1" +var lambd2 = function (ll1, ll2) { +}; // Error at "ll1" +var lamda3 = function myLambda3(myParam) { +}; +var lamda4 = function () { + return null; +}; // these should be error for implicit any return type -var lambda5 = function temp() { return null; }; -var lambda6 = function () { return null; }; -var lambda7 = function temp() { return undefined; }; -var lambda8 = function () { return undefined; }; +var lambda5 = function temp() { + return null; +}; +var lambda6 = function () { + return null; +}; +var lambda7 = function temp() { + return undefined; +}; +var lambda8 = function () { + return undefined; +}; // this shouldn't be an error -var lambda9 = function () { return 5; }; -var lambda10 = function temp1() { return 5; }; +var lambda9 = function () { + return 5; +}; +var lambda10 = function temp1() { + return 5; +}; diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js index c13479daff3..6332f444487 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js +++ b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js @@ -13,11 +13,14 @@ function noError2(x: number, y: string) { }; //// [implicitAnyDeclareFunctionWithoutFormalType.js] // these should be errors -function foo(x) { } +function foo(x) { +} ; -function bar(x, y) { } +function bar(x, y) { +} ; // error at "y"; no error at "x" -function func2(a, b, c) { } +function func2(a, b, c) { +} ; // error at "a,b,c" function func3() { var args = []; @@ -37,5 +40,6 @@ function noError1(x, y) { if (y === void 0) { y = 2; } } ; -function noError2(x, y) { } +function noError2(x, y) { +} ; diff --git a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js index 59d625fff4a..1a49449529e 100644 --- a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js +++ b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js @@ -15,6 +15,7 @@ var C = (function () { function C(c1, c2, c3) { this.x = null; // error at "x" } // error at "c1, c2" - C.prototype.funcOfC = function (f1, f2, f3) { }; // error at "f1,f2" + C.prototype.funcOfC = function (f1, f2, f3) { + }; // error at "f1,f2" return C; })(); diff --git a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js index e3c44e9b783..ae09bf2e40e 100644 --- a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js +++ b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js @@ -14,7 +14,8 @@ var x1: any; var y1 = new x1; //// [implicitAnyDeclareVariablesWithoutTypeAndInit.js] // this should be an error var x; // error at "x" -function func(k) { } +function func(k) { +} ; //error at "k" func(x); // this shouldn't be an error diff --git a/tests/baselines/reference/implicitAnyFromCircularInference.js b/tests/baselines/reference/implicitAnyFromCircularInference.js index d818ea17105..b2ea707d176 100644 --- a/tests/baselines/reference/implicitAnyFromCircularInference.js +++ b/tests/baselines/reference/implicitAnyFromCircularInference.js @@ -58,15 +58,21 @@ var b; var c; // Error expected var d; -function f() { return f; } +function f() { + return f; +} // Error expected -function g() { return g(); } +function g() { + return g(); +} // Error expected var f1 = function () { return f1(); }; // Error expected -var f2 = function () { return f2(); }; +var f2 = function () { + return f2(); +}; // Error expected function h() { return foo(); @@ -74,7 +80,9 @@ function h() { return h() || "hello"; } } -function foo(x) { return "abc"; } +function foo(x) { + return "abc"; +} var C = (function () { function C() { // Error expected diff --git a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js index bc5b9453665..21a3171b439 100644 --- a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js +++ b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js @@ -38,28 +38,42 @@ var newC2 = new C([], null) //// [implicitAnyFunctionInvocationWithAnyArguements.js] // this should be errors var arg0 = null; // error at "arg0" -var anyArray = [null, undefined]; // error at array literal +var anyArray = [ + null, + undefined +]; // error at array literal var objL; // error at "y,z" var funcL; -function temp1(arg1) { } // error at "temp1" -function testFunctionExprC(subReplace) { } -function testFunctionExprC2(eq) { } +function temp1(arg1) { +} // error at "temp1" +function testFunctionExprC(subReplace) { +} +function testFunctionExprC2(eq) { +} ; -function testObjLiteral(objLit) { } +function testObjLiteral(objLit) { +} ; -function testFuncLiteral(funcLit) { } +function testFuncLiteral(funcLit) { +} ; // this should not be an error -testFunctionExprC2(function (v1, v2) { return 1; }); +testFunctionExprC2(function (v1, v2) { + return 1; +}); testObjLiteral(objL); testFuncLiteral(funcL); var k = temp1(null); var result = temp1(arg0); var result1 = temp1(anyArray); -function noError(variable, array) { } +function noError(variable, array) { +} noError(null, []); noError(undefined, []); -noError(null, [null, undefined]); +noError(null, [ + null, + undefined +]); noError(undefined, anyArray); var C = (function () { function C(emtpyArray, variable) { diff --git a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js index 82eb56fbde6..699b57603eb 100644 --- a/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js +++ b/tests/baselines/reference/implicitAnyFunctionReturnNullOrUndefined.js @@ -26,8 +26,12 @@ undefinedWidenFunction(); //// [implicitAnyFunctionReturnNullOrUndefined.js] // this should be an error -function nullWidenFunction() { return null; } // error at "nullWidenFunction" -function undefinedWidenFunction() { return undefined; } // error at "undefinedWidenFunction" +function nullWidenFunction() { + return null; +} // error at "nullWidenFunction" +function undefinedWidenFunction() { + return undefined; +} // error at "undefinedWidenFunction" var C = (function () { function C() { } @@ -40,10 +44,18 @@ var C = (function () { return C; })(); // this should not be an error -function foo1() { return null; } -function bar1() { return undefined; } -function fooBar() { return 1; } -function fooFoo() { return 5; } +function foo1() { + return null; +} +function bar1() { + return undefined; +} +function fooBar() { + return 1; +} +function fooFoo() { + return 5; +} // this should not be an error as the error is raised by expr above nullWidenFunction(); undefinedWidenFunction(); diff --git a/tests/baselines/reference/implicitAnyGenericTypeInference.js b/tests/baselines/reference/implicitAnyGenericTypeInference.js index 583ab7f0b01..37ef042f262 100644 --- a/tests/baselines/reference/implicitAnyGenericTypeInference.js +++ b/tests/baselines/reference/implicitAnyGenericTypeInference.js @@ -10,5 +10,9 @@ var r = c.compareTo(1, ''); //// [implicitAnyGenericTypeInference.js] var c; -c = { compareTo: function (x, y) { return y; } }; +c = { + compareTo: function (x, y) { + return y; + } +}; var r = c.compareTo(1, ''); diff --git a/tests/baselines/reference/implicitAnyGenerics.js b/tests/baselines/reference/implicitAnyGenerics.js index daea0dfe54c..a5c98590a8f 100644 --- a/tests/baselines/reference/implicitAnyGenerics.js +++ b/tests/baselines/reference/implicitAnyGenerics.js @@ -46,7 +46,9 @@ var d2 = new D(1); var d3 = new D(1); var d4 = new D(1); var d5 = new D(null); -function foo() { return null; } +function foo() { + return null; +} ; foo(); foo(); diff --git a/tests/baselines/reference/implicitAnyInCatch.js b/tests/baselines/reference/implicitAnyInCatch.js index c35e92372e3..29a2e03a130 100644 --- a/tests/baselines/reference/implicitAnyInCatch.js +++ b/tests/baselines/reference/implicitAnyInCatch.js @@ -16,11 +16,14 @@ class C { //// [implicitAnyInCatch.js] // this should not be an error -try { } -catch (error) { - if (error.number === -2147024809) { } +try { +} +catch (error) { + if (error.number === -2147024809) { + } +} +for (var key in this) { } -for (var key in this) { } var C = (function () { function C() { } diff --git a/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.js b/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.js index 9e558122b15..4218d9a9a21 100644 --- a/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.js +++ b/tests/baselines/reference/implicitAnyNewExprLackConstructorSignature.js @@ -3,5 +3,7 @@ function Point() { this.x = 3; } var x: any = new Point(); // error at "new" //// [implicitAnyNewExprLackConstructorSignature.js] -function Point() { this.x = 3; } +function Point() { + this.x = 3; +} var x = new Point(); // error at "new" diff --git a/tests/baselines/reference/implicitAnyWidenToAny.js b/tests/baselines/reference/implicitAnyWidenToAny.js index 838593a88ef..01ad0dcb9b2 100644 --- a/tests/baselines/reference/implicitAnyWidenToAny.js +++ b/tests/baselines/reference/implicitAnyWidenToAny.js @@ -31,7 +31,10 @@ var obj1 = anyReturnFunc(); // these should be errors var x = null; // error at "x" var x1 = undefined; // error at "x1" -var widenArray = [null, undefined]; // error at "widenArray" +var widenArray = [ + null, + undefined +]; // error at "widenArray" var emptyArray = []; // error at "emptyArray" // these should not be error var AnimalObj = (function () { @@ -44,13 +47,28 @@ var bar = "Hello World"; var foo1 = null; var foo2 = undefined; var temp = 5; -var c = { x: null }; -var array1 = ["Bob", 2]; +var c = { + x: null +}; +var array1 = [ + "Bob", + 2 +]; var array2 = []; -var array3 = [null, undefined]; -var array4 = [null, undefined]; -var array5 = [null, undefined]; +var array3 = [ + null, + undefined +]; +var array4 = [ + null, + undefined +]; +var array5 = [ + null, + undefined +]; var objLit; -function anyReturnFunc() { } +function anyReturnFunc() { +} var obj0 = new objLit(1); var obj1 = anyReturnFunc(); diff --git a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js index 3329fb810a7..35992b86fec 100644 --- a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js +++ b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js @@ -17,7 +17,8 @@ module m_private { //// [importAliasAnExternalModuleInsideAnInternalModule_file0.js] var m; (function (m) { - function foo() { } + function foo() { + } m.foo = foo; })(m = exports.m || (exports.m = {})); //// [importAliasAnExternalModuleInsideAnInternalModule_file1.js] diff --git a/tests/baselines/reference/importAliasIdentifiers.js b/tests/baselines/reference/importAliasIdentifiers.js index 7bd15b28c66..620fdf13866 100644 --- a/tests/baselines/reference/importAliasIdentifiers.js +++ b/tests/baselines/reference/importAliasIdentifiers.js @@ -69,18 +69,27 @@ var clodule = (function () { })(); var clodule; (function (clodule) { - var Point = { x: 0, y: 0 }; + var Point = { + x: 0, + y: 0 + }; })(clodule || (clodule = {})); var clolias = clodule; var p; var p; var p; function fundule() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } var fundule; (function (fundule) { - var Point = { x: 0, y: 0 }; + var Point = { + x: 0, + y: 0 + }; })(fundule || (fundule = {})); var funlias = fundule; var p; diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 8114e88ca4b..9e52c4dd067 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -14,7 +14,9 @@ class Hello extends Greeter { } var Greeter = (function () { function Greeter() { } - Greeter.prototype.greet = function () { return 'greet'; }; + Greeter.prototype.greet = function () { + return 'greet'; + }; return Greeter; })(); exports.Greeter = Greeter; diff --git a/tests/baselines/reference/importDecl.js b/tests/baselines/reference/importDecl.js index 9d4839e5e7c..d6f2855908e 100644 --- a/tests/baselines/reference/importDecl.js +++ b/tests/baselines/reference/importDecl.js @@ -89,7 +89,9 @@ var d = (function () { })(); exports.d = d; exports.x; -function foo() { return null; } +function foo() { + return null; +} exports.foo = foo; //// [importDecl_require1.js] var d = (function () { @@ -99,7 +101,9 @@ var d = (function () { })(); exports.d = d; var x; -function foo() { return null; } +function foo() { + return null; +} exports.foo = foo; //// [importDecl_require2.js] var d = (function () { @@ -109,7 +113,9 @@ var d = (function () { })(); exports.d = d; exports.x; -function foo() { return null; } +function foo() { + return null; +} exports.foo = foo; //// [importDecl_require3.js] var d = (function () { @@ -119,10 +125,14 @@ var d = (function () { })(); exports.d = d; exports.x; -function foo() { return null; } +function foo() { + return null; +} exports.foo = foo; //// [importDecl_require4.js] -function foo2() { return null; } +function foo2() { + return null; +} exports.foo2 = foo2; //// [importDecl_1.js] /// diff --git a/tests/baselines/reference/importInTypePosition.js b/tests/baselines/reference/importInTypePosition.js index c0d64a4ef7b..08f7078cca3 100644 --- a/tests/baselines/reference/importInTypePosition.js +++ b/tests/baselines/reference/importInTypePosition.js @@ -39,5 +39,8 @@ var C; (function (C) { var m; var p; - var p = { x: 0, y: 0 }; + var p = { + x: 0, + y: 0 + }; })(C || (C = {})); diff --git a/tests/baselines/reference/importStatements.js b/tests/baselines/reference/importStatements.js index b8d06a3546e..dddbadbcc7a 100644 --- a/tests/baselines/reference/importStatements.js +++ b/tests/baselines/reference/importStatements.js @@ -52,7 +52,10 @@ var C; (function (C) { var m; var p; - var p = { x: 0, y: 0 }; + var p = { + x: 0, + y: 0 + }; })(C || (C = {})); // code gen expected var D; diff --git a/tests/baselines/reference/importStatementsInterfaces.js b/tests/baselines/reference/importStatementsInterfaces.js index 4f7bb447565..bb24aeb0f6b 100644 --- a/tests/baselines/reference/importStatementsInterfaces.js +++ b/tests/baselines/reference/importStatementsInterfaces.js @@ -47,7 +47,11 @@ var C; (function (C) { var m; var p; - var p = { x: 0, y: 0, z: 0 }; + var p = { + x: 0, + y: 0, + z: 0 + }; })(C || (C = {})); // no code gen expected var D; diff --git a/tests/baselines/reference/importedModuleAddToGlobal.js b/tests/baselines/reference/importedModuleAddToGlobal.js index dd7dfcd5fc9..6685bec69e3 100644 --- a/tests/baselines/reference/importedModuleAddToGlobal.js +++ b/tests/baselines/reference/importedModuleAddToGlobal.js @@ -28,5 +28,7 @@ var B; })(B || (B = {})); var C; (function (C) { - function hello() { return null; } + function hello() { + return null; + } })(C || (C = {})); diff --git a/tests/baselines/reference/inOperator.js b/tests/baselines/reference/inOperator.js index 10059bcf2b7..1407ef9d59c 100644 --- a/tests/baselines/reference/inOperator.js +++ b/tests/baselines/reference/inOperator.js @@ -14,9 +14,12 @@ if (y in c) { } //// [inOperator.js] var a = []; -for (var x in a) { } -if (3 in a) { } +for (var x in a) { +} +if (3 in a) { +} var b = '' in 0; var c; var y; -if (y in c) { } +if (y in c) { +} diff --git a/tests/baselines/reference/inOperatorWithFunction.js b/tests/baselines/reference/inOperatorWithFunction.js index bc293ca2c43..f06e95ff6b7 100644 --- a/tests/baselines/reference/inOperatorWithFunction.js +++ b/tests/baselines/reference/inOperatorWithFunction.js @@ -4,5 +4,9 @@ fn("a" in { "a": true }); //// [inOperatorWithFunction.js] -var fn = function (val) { return val; }; -fn("a" in { "a": true }); +var fn = function (val) { + return val; +}; +fn("a" in { + "a": true +}); diff --git a/tests/baselines/reference/incompatibleTypes.js b/tests/baselines/reference/incompatibleTypes.js index 7e24afecf5f..a0b4d0f9ca2 100644 --- a/tests/baselines/reference/incompatibleTypes.js +++ b/tests/baselines/reference/incompatibleTypes.js @@ -102,12 +102,18 @@ var C4 = (function () { } return C4; })(); -function if1(a) { } +function if1(a) { +} var c1; var c2; if1(c1); -function of1(a) { return null; } -of1({ e: 0, f: 0 }); +function of1(a) { + return null; +} +of1({ + e: 0, + f: 0 +}); function foo(fn) { } function bar() { @@ -116,7 +122,25 @@ function bar() { map = {}; }); } -var o1 = { e: 0, f: 0 }; -var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; +var o1 = { + e: 0, + f: 0 +}; +var a1 = [ + { + e: 0, + f: 0 + }, + { + e: 0, + f: 0 + }, + { + e: 0, + g: 0 + } +]; var i1c1 = 5; -var fp1 = function (a) { return 0; }; +var fp1 = function (a) { + return 0; +}; diff --git a/tests/baselines/reference/incompleteObjectLiteral1.js b/tests/baselines/reference/incompleteObjectLiteral1.js index ecdbe86604a..6859267fee1 100644 --- a/tests/baselines/reference/incompleteObjectLiteral1.js +++ b/tests/baselines/reference/incompleteObjectLiteral1.js @@ -3,5 +3,7 @@ var tt = { aa; } var x = tt; //// [incompleteObjectLiteral1.js] -var tt = { aa: }; +var tt = { + aa: +}; var x = tt; diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherType.js b/tests/baselines/reference/incrementOperatorWithAnyOtherType.js index 4c9d570d07f..7fd47a937a8 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherType.js @@ -52,8 +52,14 @@ M.n++; // ++ operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; -var obj = { x: 1, y: null }; +var ANY2 = [ + "", + "" +]; +var obj = { + x: 1, + y: null +}; var A = (function () { function A() { } diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js index 6f76fba6d8c..3e1c47faedc 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -72,9 +72,16 @@ ANY2++; //// [incrementOperatorWithAnyOtherTypeInvalidOperations.js] // ++ operator on any type var ANY1; -var ANY2 = [1, 2]; +var ANY2 = [ + 1, + 2 +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/incrementOperatorWithNumberType.js b/tests/baselines/reference/incrementOperatorWithNumberType.js index 09365833e3b..e8312c5e5f2 100644 --- a/tests/baselines/reference/incrementOperatorWithNumberType.js +++ b/tests/baselines/reference/incrementOperatorWithNumberType.js @@ -42,7 +42,10 @@ objA.a++, M.n++; //// [incrementOperatorWithNumberType.js] // ++ operator on number type var NUMBER; -var NUMBER1 = [1, 2]; +var NUMBER1 = [ + 1, + 2 +]; var A = (function () { function A() { } diff --git a/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.js b/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.js index eb9cd949280..4629f10a964 100644 --- a/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.js +++ b/tests/baselines/reference/incrementOperatorWithNumberTypeInvalidOperations.js @@ -49,12 +49,19 @@ foo()++; //// [incrementOperatorWithNumberTypeInvalidOperations.js] // ++ operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -67,11 +74,27 @@ var ResultIsNumber1 = ++NUMBER1; var ResultIsNumber2 = NUMBER1++; // number type literal var ResultIsNumber3 = ++1; -var ResultIsNumber4 = ++{ x: 1, y: 2 }; -var ResultIsNumber5 = ++{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = ++{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = ++{ + x: 1, + y: function (n) { + return n; + } +}; var ResultIsNumber6 = 1++; -var ResultIsNumber7 = { x: 1, y: 2 }++; -var ResultIsNumber8 = { x: 1, y: function (n) { return n; } }++; +var ResultIsNumber7 = { + x: 1, + y: 2 +}++; +var ResultIsNumber8 = { + x: 1, + y: function (n) { + return n; + } +}++; // number type expressions var ResultIsNumber9 = ++foo(); var ResultIsNumber10 = ++A.foo(); diff --git a/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.js b/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.js index 6a974443f7b..09549a71a0c 100644 --- a/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.js +++ b/tests/baselines/reference/incrementOperatorWithUnsupportedBooleanType.js @@ -57,11 +57,15 @@ objA.a++, M.n++; //// [incrementOperatorWithUnsupportedBooleanType.js] // ++ operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return true; }; + A.foo = function () { + return true; + }; return A; })(); var M; @@ -74,11 +78,27 @@ var ResultIsNumber1 = ++BOOLEAN; var ResultIsNumber2 = BOOLEAN++; // boolean type literal var ResultIsNumber3 = ++true; -var ResultIsNumber4 = ++{ x: true, y: false }; -var ResultIsNumber5 = ++{ x: true, y: function (n) { return n; } }; +var ResultIsNumber4 = ++{ + x: true, + y: false +}; +var ResultIsNumber5 = ++{ + x: true, + y: function (n) { + return n; + } +}; var ResultIsNumber6 = true++; -var ResultIsNumber7 = { x: true, y: false }++; -var ResultIsNumber8 = { x: true, y: function (n) { return n; } }++; +var ResultIsNumber7 = { + x: true, + y: false +}++; +var ResultIsNumber8 = { + x: true, + y: function (n) { + return n; + } +}++; // boolean type expressions var ResultIsNumber9 = ++objA.a; var ResultIsNumber10 = ++M.n; diff --git a/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.js b/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.js index 82bf03cd83a..5abb2cd8b79 100644 --- a/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.js +++ b/tests/baselines/reference/incrementOperatorWithUnsupportedStringType.js @@ -68,12 +68,19 @@ objA.a++, M.n++; //// [incrementOperatorWithUnsupportedStringType.js] // ++ operator on string type var STRING; -var STRING1 = ["", ""]; -function foo() { return ""; } +var STRING1 = [ + "", + "" +]; +function foo() { + return ""; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -88,11 +95,27 @@ var ResultIsNumber3 = STRING++; var ResultIsNumber4 = STRING1++; // string type literal var ResultIsNumber5 = ++""; -var ResultIsNumber6 = ++{ x: "", y: "" }; -var ResultIsNumber7 = ++{ x: "", y: function (s) { return s; } }; +var ResultIsNumber6 = ++{ + x: "", + y: "" +}; +var ResultIsNumber7 = ++{ + x: "", + y: function (s) { + return s; + } +}; var ResultIsNumber8 = ""++; -var ResultIsNumber9 = { x: "", y: "" }++; -var ResultIsNumber10 = { x: "", y: function (s) { return s; } }++; +var ResultIsNumber9 = { + x: "", + y: "" +}++; +var ResultIsNumber10 = { + x: "", + y: function (s) { + return s; + } +}++; // string type expressions var ResultIsNumber11 = ++objA.a; var ResultIsNumber12 = ++M.n; diff --git a/tests/baselines/reference/indexSignaturesInferentialTyping.js b/tests/baselines/reference/indexSignaturesInferentialTyping.js index 53636be716c..fc1525eda0f 100644 --- a/tests/baselines/reference/indexSignaturesInferentialTyping.js +++ b/tests/baselines/reference/indexSignaturesInferentialTyping.js @@ -9,9 +9,25 @@ var x4 = bar({ zero: 0, one: 1 }); // type should be number //// [indexSignaturesInferentialTyping.js] -function foo(items) { return undefined; } -function bar(items) { return undefined; } -var x1 = foo({ 0: 0, 1: 1 }); // type should be number -var x2 = foo({ zero: 0, one: 1 }); -var x3 = bar({ 0: 0, 1: 1 }); -var x4 = bar({ zero: 0, one: 1 }); // type should be number +function foo(items) { + return undefined; +} +function bar(items) { + return undefined; +} +var x1 = foo({ + 0: 0, + 1: 1 +}); // type should be number +var x2 = foo({ + zero: 0, + one: 1 +}); +var x3 = bar({ + 0: 0, + 1: 1 +}); +var x4 = bar({ + zero: 0, + one: 1 +}); // type should be number diff --git a/tests/baselines/reference/indexer.js b/tests/baselines/reference/indexer.js index 97e734a029f..12c28236d8d 100644 --- a/tests/baselines/reference/indexer.js +++ b/tests/baselines/reference/indexer.js @@ -11,5 +11,12 @@ var jq:JQuery={ 0: { id : "a" }, 1: { id : "b" } }; jq[0].id; //// [indexer.js] -var jq = { 0: { id: "a" }, 1: { id: "b" } }; +var jq = { + 0: { + id: "a" + }, + 1: { + id: "b" + } +}; jq[0].id; diff --git a/tests/baselines/reference/indexerA.js b/tests/baselines/reference/indexerA.js index 5216026f714..2a377c3436d 100644 --- a/tests/baselines/reference/indexerA.js +++ b/tests/baselines/reference/indexerA.js @@ -21,5 +21,12 @@ var JQuery = (function () { } return JQuery; })(); -var jq = { 0: { id: "a" }, 1: { id: "b" } }; +var jq = { + 0: { + id: "a" + }, + 1: { + id: "b" + } +}; jq[0].id; diff --git a/tests/baselines/reference/indexerWithTuple.js b/tests/baselines/reference/indexerWithTuple.js index 91d90792e6d..b73b5e80a87 100644 --- a/tests/baselines/reference/indexerWithTuple.js +++ b/tests/baselines/reference/indexerWithTuple.js @@ -33,10 +33,25 @@ var eleUnion25 = unionTuple2["0"]; // boolean var eleUnion26 = unionTuple2["1"]; // string | number //// [indexerWithTuple.js] -var strNumTuple = ["foo", 10]; -var numTupleTuple = [10, ["bar", 20]]; -var unionTuple1 = [10, "foo"]; -var unionTuple2 = [true, "foo"]; +var strNumTuple = [ + "foo", + 10 +]; +var numTupleTuple = [ + 10, + [ + "bar", + 20 + ] +]; +var unionTuple1 = [ + 10, + "foo" +]; +var unionTuple2 = [ + true, + "foo" +]; // no error var idx0 = 0; var idx1 = 1; diff --git a/tests/baselines/reference/inferSecondaryParameter.js b/tests/baselines/reference/inferSecondaryParameter.js index 24689aa9495..a02e10b5570 100644 --- a/tests/baselines/reference/inferSecondaryParameter.js +++ b/tests/baselines/reference/inferSecondaryParameter.js @@ -11,7 +11,10 @@ b.m("test", function (bug) { //// [inferSecondaryParameter.js] // type inference on 'bug' should give 'any' -var b = { m: function (test, fn) { } }; +var b = { + m: function (test, fn) { + } +}; b.m("test", function (bug) { var a = bug; }); diff --git a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js index 97fefc0571c..194d9198d23 100644 --- a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js +++ b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js @@ -30,8 +30,15 @@ function h(nonarray) { args[_i - 1] = arguments[_i]; } } -function i(array, opt) { } -var a = [1, 2, 3, 4, 5]; +function i(array, opt) { +} +var a = [ + 1, + 2, + 3, + 4, + 5 +]; f(a); // OK g(a); // OK h(a); // OK diff --git a/tests/baselines/reference/inferenceFromParameterlessLambda.js b/tests/baselines/reference/inferenceFromParameterlessLambda.js index 40c18c9afe8..c1b970dee60 100644 --- a/tests/baselines/reference/inferenceFromParameterlessLambda.js +++ b/tests/baselines/reference/inferenceFromParameterlessLambda.js @@ -11,6 +11,11 @@ foo(n => n.length, () => 'hi'); //// [inferenceFromParameterlessLambda.js] -function foo(o, i) { } +function foo(o, i) { +} // Infer string from second argument because it isn't context sensitive -foo(function (n) { return n.length; }, function () { return 'hi'; }); +foo(function (n) { + return n.length; +}, function () { + return 'hi'; +}); diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.js b/tests/baselines/reference/inferentialTypingWithFunctionType2.js index a3215a19e25..758f0e27465 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.js +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.js @@ -8,4 +8,8 @@ var x = [1, 2, 3].map(identity)[0]; function identity(a) { return a; } -var x = [1, 2, 3].map(identity)[0]; +var x = [ + 1, + 2, + 3 +].map(identity)[0]; diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.js b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.js index aeb9a840773..b9b6f9e4bde 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.js +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeNested.js @@ -5,4 +5,8 @@ declare function identity(y: V): V; var s = map("", () => { return { x: identity }; }); //// [inferentialTypingWithFunctionTypeNested.js] -var s = map("", function () { return { x: identity }; }); +var s = map("", function () { + return { + x: identity + }; +}); diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.js b/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.js index 2f5eea63a8a..b41a9f6240e 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.js +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeSyntacticScenarios.js @@ -36,12 +36,16 @@ s = map("", ("", identity)); //// [inferentialTypingWithFunctionTypeSyntacticScenarios.js] var s; // dotted name -var dottedIdentity = { x: identity }; +var dottedIdentity = { + x: identity +}; s = map("", dottedIdentity.x); // index expression s = map("", dottedIdentity['x']); // function call -s = map("", (function () { return identity; })()); +s = map("", (function () { + return identity; +})()); var ic; s = map("", new ic()); // assignment diff --git a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.js b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.js index 35f0928378c..0e413f9b171 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.js +++ b/tests/baselines/reference/inferentialTypingWithFunctionTypeZip.js @@ -7,5 +7,11 @@ var i = result[0].x; // number //// [inferentialTypingWithFunctionTypeZip.js] var pair; var zipWith; -var result = zipWith([1, 2], ['a', 'b'], pair); +var result = zipWith([ + 1, + 2 +], [ + 'a', + 'b' +], pair); var i = result[0].x; // number diff --git a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.js b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.js index 216604dd4d5..af2b936b2a8 100644 --- a/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.js +++ b/tests/baselines/reference/inferentialTypingWithObjectLiteralProperties.js @@ -10,5 +10,21 @@ f({ x: [1] }, { x: [null] }).x[0] = "" // was error TS2011: Cannot convert 'stri function f(x, y) { return x; } -f({ x: [null] }, { x: [1] }).x[0] = ""; // ok -f({ x: [1] }, { x: [null] }).x[0] = ""; // was error TS2011: Cannot convert 'string' to 'number'. +f({ + x: [ + null + ] +}, { + x: [ + 1 + ] +}).x[0] = ""; // ok +f({ + x: [ + 1 + ] +}, { + x: [ + null + ] +}).x[0] = ""; // was error TS2011: Cannot convert 'string' to 'number'. diff --git a/tests/baselines/reference/inheritance.js b/tests/baselines/reference/inheritance.js index f7a274b1990..1fca887a9b1 100644 --- a/tests/baselines/reference/inheritance.js +++ b/tests/baselines/reference/inheritance.js @@ -79,9 +79,13 @@ var ND = (function (_super) { })(N); var Good = (function () { function Good() { - this.f = function () { return 0; }; + this.f = function () { + return 0; + }; } - Good.prototype.g = function () { return 0; }; + Good.prototype.g = function () { + return 0; + }; return Good; })(); var Baad = (function (_super) { @@ -89,7 +93,11 @@ var Baad = (function (_super) { function Baad() { _super.apply(this, arguments); } - Baad.prototype.f = function () { return 0; }; - Baad.prototype.g = function (n) { return 0; }; + Baad.prototype.f = function () { + return 0; + }; + Baad.prototype.g = function (n) { + return 0; + }; return Baad; })(Good); diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index f00a46922bf..e6dbd35e0df 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -78,7 +78,8 @@ var Button = (function (_super) { function Button() { _super.apply(this, arguments); } - Button.prototype.select = function () { }; + Button.prototype.select = function () { + }; return Button; })(Control); var TextBox = (function (_super) { @@ -86,7 +87,8 @@ var TextBox = (function (_super) { function TextBox() { _super.apply(this, arguments); } - TextBox.prototype.select = function () { }; + TextBox.prototype.select = function () { + }; return TextBox; })(Control); var ImageBase = (function (_super) { @@ -106,13 +108,15 @@ var Image1 = (function (_super) { var Locations = (function () { function Locations() { } - Locations.prototype.select = function () { }; + Locations.prototype.select = function () { + }; return Locations; })(); var Locations1 = (function () { function Locations1() { } - Locations1.prototype.select = function () { }; + Locations1.prototype.select = function () { + }; return Locations1; })(); var sc; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 4544df2dcf2..45293ec3021 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -20,7 +20,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { }; + A.prototype.myMethod = function () { + }; return A; })(); var B = (function (_super) { @@ -35,6 +36,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { }; + C.prototype.myMethod = function () { + }; return C; })(B); diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index df6e5943173..339511df6ba 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -20,7 +20,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { }; + A.prototype.myMethod = function () { + }; return A; })(); var B = (function (_super) { @@ -35,6 +36,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { }; + C.prototype.myMethod = function () { + }; return C; })(B); diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index 682a8ab4402..f69a4962db6 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -20,7 +20,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { }; + A.prototype.myMethod = function () { + }; return A; })(); var B = (function (_super) { @@ -35,6 +36,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { }; + C.prototype.myMethod = function () { + }; return C; })(B); diff --git a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js index 85801ca704f..49fd1e40582 100644 --- a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js +++ b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js @@ -9,6 +9,11 @@ fn(function (a, b) { return true; }) //// [inheritedFunctionAssignmentCompatibility.js] -function fn(cb) { } -fn(function (a, b) { return true; }); -fn(function (a, b) { return true; }); +function fn(cb) { +} +fn(function (a, b) { + return true; +}); +fn(function (a, b) { + return true; +}); diff --git a/tests/baselines/reference/innerBoundLambdaEmit.js b/tests/baselines/reference/innerBoundLambdaEmit.js index c09cc8e5a66..2921cad55d0 100644 --- a/tests/baselines/reference/innerBoundLambdaEmit.js +++ b/tests/baselines/reference/innerBoundLambdaEmit.js @@ -18,5 +18,6 @@ var M; return Foo; })(); M.Foo = Foo; - var bar = function () { }; + var bar = function () { + }; })(M || (M = {})); diff --git a/tests/baselines/reference/innerFunc.js b/tests/baselines/reference/innerFunc.js index c790c09e271..1676d0789d1 100644 --- a/tests/baselines/reference/innerFunc.js +++ b/tests/baselines/reference/innerFunc.js @@ -14,13 +14,17 @@ module M { //// [innerFunc.js] function salt() { - function pepper() { return 5; } + function pepper() { + return 5; + } return pepper(); } var M; (function (M) { function tungsten() { - function oxygen() { return 6; } + function oxygen() { + return 6; + } ; return oxygen(); } diff --git a/tests/baselines/reference/innerModExport1.js b/tests/baselines/reference/innerModExport1.js index cbeced37046..d61e79f2396 100644 --- a/tests/baselines/reference/innerModExport1.js +++ b/tests/baselines/reference/innerModExport1.js @@ -28,12 +28,18 @@ var Outer; { var non_export_var = 0; Outer.export_var = 1; - function NonExportFunc() { return 0; } - function ExportFunc() { return 0; } + function NonExportFunc() { + return 0; + } + function ExportFunc() { + return 0; + } Outer.ExportFunc = ExportFunc; } Outer.outer_var_export = 0; - function outerFuncExport() { return 0; } + function outerFuncExport() { + return 0; + } Outer.outerFuncExport = outerFuncExport; })(Outer || (Outer = {})); Outer.ExportFunc(); diff --git a/tests/baselines/reference/innerModExport2.js b/tests/baselines/reference/innerModExport2.js index a1526daf6f3..26399879e6d 100644 --- a/tests/baselines/reference/innerModExport2.js +++ b/tests/baselines/reference/innerModExport2.js @@ -29,13 +29,19 @@ var Outer; { var non_export_var = 0; Outer.export_var = 1; - function NonExportFunc() { return 0; } - function ExportFunc() { return 0; } + function NonExportFunc() { + return 0; + } + function ExportFunc() { + return 0; + } Outer.ExportFunc = ExportFunc; } var export_var; Outer.outer_var_export = 0; - function outerFuncExport() { return 0; } + function outerFuncExport() { + return 0; + } Outer.outerFuncExport = outerFuncExport; })(Outer || (Outer = {})); Outer.NonExportFunc(); diff --git a/tests/baselines/reference/innerOverloads.js b/tests/baselines/reference/innerOverloads.js index 19e3fa78909..184b644406e 100644 --- a/tests/baselines/reference/innerOverloads.js +++ b/tests/baselines/reference/innerOverloads.js @@ -14,7 +14,9 @@ var x = outer(); // should work //// [innerOverloads.js] function outer() { - function inner(a) { return a; } + function inner(a) { + return a; + } return inner(0); } var x = outer(); // should work diff --git a/tests/baselines/reference/instanceAndStaticDeclarations1.js b/tests/baselines/reference/instanceAndStaticDeclarations1.js index 7dbd6dcbe7d..1396e2bcfa8 100644 --- a/tests/baselines/reference/instanceAndStaticDeclarations1.js +++ b/tests/baselines/reference/instanceAndStaticDeclarations1.js @@ -24,7 +24,9 @@ var Point = (function () { var dy = this.y - p.y; return Math.sqrt(dx * dx + dy * dy); }; - Point.distance = function (p1, p2) { return p1.distance(p2); }; + Point.distance = function (p1, p2) { + return p1.distance(p2); + }; Point.origin = new Point(0, 0); return Point; })(); diff --git a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js index 51c38282a72..28f7296f0ea 100644 --- a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js +++ b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js @@ -17,12 +17,18 @@ var C = (function () { function C() { } C.prototype.foo = function () { - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; }; C.prototype.bar = function (x) { - C.prototype.bar = function () { }; // error - C.prototype.bar = function (x) { return x; }; // ok - C.prototype.bar = function (x) { return 1; }; // ok + C.prototype.bar = function () { + }; // error + C.prototype.bar = function (x) { + return x; + }; // ok + C.prototype.bar = function (x) { + return 1; + }; // ok return 1; }; return C; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index 7ab3b4a0aa3..eca12f7b1ae 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -60,11 +60,14 @@ var NonGeneric; get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; return C; })(); var D = (function (_super) { @@ -92,11 +95,14 @@ var Generic; get: function () { return null; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/instancePropertyInClassType.js b/tests/baselines/reference/instancePropertyInClassType.js index 863f18de323..b2df44db6f0 100644 --- a/tests/baselines/reference/instancePropertyInClassType.js +++ b/tests/baselines/reference/instancePropertyInClassType.js @@ -50,11 +50,14 @@ var NonGeneric; get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; return C; })(); var c = new C(1, 2); @@ -75,11 +78,14 @@ var Generic; get: function () { return null; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; return C; })(); var c = new C(1, ''); diff --git a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js index 9f83181a146..8309b7e7c01 100644 --- a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js @@ -50,7 +50,8 @@ var rc1 = '' instanceof {}; var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); var x; diff --git a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js index 3d7d2a7d017..15e4239eb0a 100644 --- a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js +++ b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js @@ -27,7 +27,8 @@ var C = (function () { return C; })(); var c = new C(); -function Foo() { } +function Foo() { +} var r = new Foo(); var f; var r2 = new f(); diff --git a/tests/baselines/reference/instantiatedModule.js b/tests/baselines/reference/instantiatedModule.js index 21411e09ff1..7993628f898 100644 --- a/tests/baselines/reference/instantiatedModule.js +++ b/tests/baselines/reference/instantiatedModule.js @@ -82,7 +82,10 @@ var M2; function Point() { } Point.Origin = function () { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; }; return Point; })(); diff --git a/tests/baselines/reference/intTypeCheck.js b/tests/baselines/reference/intTypeCheck.js index fbbe1bb5d03..41f648610b5 100644 --- a/tests/baselines/reference/intTypeCheck.js +++ b/tests/baselines/reference/intTypeCheck.js @@ -209,7 +209,8 @@ var obj87: i8 = new {}; var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var anyVar; @@ -219,15 +220,22 @@ var anyVar; var obj0; var obj1 = { p: null, - p3: function () { return 0; }, - p6: function (pa1) { return 0; }, - p7: function (pa1, pa2) { return 0; } + p3: function () { + return 0; + }, + p6: function (pa1) { + return 0; + }, + p7: function (pa1, pa2) { + return 0; + } }; var obj2 = new Object(); var obj3 = new obj0; var obj4 = new Base; var obj5 = null; -var obj6 = function () { }; +var obj6 = function () { +}; //var obj7: i1 = function foo() { }; var obj8 = anyVar; var obj9 = new < i1 > anyVar; @@ -241,7 +249,9 @@ var obj13 = new Object(); var obj14 = new obj11; var obj15 = new Base; var obj16 = null; -var obj17 = function () { return 0; }; +var obj17 = function () { + return 0; +}; //var obj18: i2 = function foo() { }; var obj19 = anyVar; var obj20 = new < i2 > anyVar; @@ -255,7 +265,8 @@ var obj24 = new Object(); var obj25 = new obj22; var obj26 = new Base; var obj27 = null; -var obj28 = function () { }; +var obj28 = function () { +}; //var obj29: i3 = function foo() { }; var obj30 = anyVar; var obj31 = new < i3 > anyVar; @@ -269,7 +280,8 @@ var obj35 = new Object(); var obj36 = new obj33; var obj37 = new Base; var obj38 = null; -var obj39 = function () { }; +var obj39 = function () { +}; //var obj40: i4 = function foo() { }; var obj41 = anyVar; var obj42 = new < i4 > anyVar; @@ -283,7 +295,8 @@ var obj46 = new Object(); var obj47 = new obj44; var obj48 = new Base; var obj49 = null; -var obj50 = function () { }; +var obj50 = function () { +}; //var obj51: i5 = function foo() { }; var obj52 = anyVar; var obj53 = new < i5 > anyVar; @@ -297,7 +310,8 @@ var obj57 = new Object(); var obj58 = new obj55; var obj59 = new Base; var obj60 = null; -var obj61 = function () { }; +var obj61 = function () { +}; //var obj62: i6 = function foo() { }; var obj63 = anyVar; var obj64 = new < i6 > anyVar; @@ -311,7 +325,8 @@ var obj68 = new Object(); var obj69 = new obj66; var obj70 = new Base; var obj71 = null; -var obj72 = function () { }; +var obj72 = function () { +}; //var obj73: i7 = function foo() { }; var obj74 = anyVar; var obj75 = new < i7 > anyVar; @@ -325,7 +340,8 @@ var obj79 = new Object(); var obj80 = new obj77; var obj81 = new Base; var obj82 = null; -var obj83 = function () { }; +var obj83 = function () { +}; //var obj84: i8 = function foo() { }; var obj85 = anyVar; var obj86 = new < i8 > anyVar; diff --git a/tests/baselines/reference/interface0.js b/tests/baselines/reference/interface0.js index aecdb91e8a3..63feadfc4c7 100644 --- a/tests/baselines/reference/interface0.js +++ b/tests/baselines/reference/interface0.js @@ -7,4 +7,6 @@ var y: Generic = { x: 3 }; //// [interface0.js] -var y = { x: 3 }; +var y = { + x: 3 +}; diff --git a/tests/baselines/reference/interfaceAssignmentCompat.js b/tests/baselines/reference/interfaceAssignmentCompat.js index 1037df1769e..dbad8eabd78 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.js +++ b/tests/baselines/reference/interfaceAssignmentCompat.js @@ -72,9 +72,15 @@ var M; function test() { var x = []; var result = ""; - x[0] = { color: 2 /* Brown */ }; - x[1] = { color: 1 /* Blue */ }; - x[2] = { color: 0 /* Green */ }; + x[0] = { + color: 2 /* Brown */ + }; + x[1] = { + color: 1 /* Blue */ + }; + x[2] = { + color: 0 /* Green */ + }; x = x.sort(CompareYeux); // parameter mismatch // type of z inferred from specialized array type var z = x.sort(CompareEyes); // ok diff --git a/tests/baselines/reference/interfaceContextualType.js b/tests/baselines/reference/interfaceContextualType.js index 2dbdb958d6b..996b8fc98d3 100644 --- a/tests/baselines/reference/interfaceContextualType.js +++ b/tests/baselines/reference/interfaceContextualType.js @@ -27,11 +27,15 @@ var Bug = (function () { } Bug.prototype.ok = function () { this.values = {}; - this.values['comments'] = { italic: true }; + this.values['comments'] = { + italic: true + }; }; Bug.prototype.shouldBeOK = function () { this.values = { - comments: { italic: true } + comments: { + italic: true + } }; }; return Bug; diff --git a/tests/baselines/reference/interfaceDeclaration2.js b/tests/baselines/reference/interfaceDeclaration2.js index 30f9df0fac7..0bd59c065e0 100644 --- a/tests/baselines/reference/interfaceDeclaration2.js +++ b/tests/baselines/reference/interfaceDeclaration2.js @@ -19,5 +19,6 @@ var I2 = (function () { } return I2; })(); -function I3() { } +function I3() { +} var I4; diff --git a/tests/baselines/reference/interfaceDeclaration4.js b/tests/baselines/reference/interfaceDeclaration4.js index 728ef7156e9..576479c2beb 100644 --- a/tests/baselines/reference/interfaceDeclaration4.js +++ b/tests/baselines/reference/interfaceDeclaration4.js @@ -69,4 +69,5 @@ var C3 = (function () { return C3; })(); I1; -{ } +{ +} diff --git a/tests/baselines/reference/interfaceExtendingClass.js b/tests/baselines/reference/interfaceExtendingClass.js index f1232d78245..39db7460915 100644 --- a/tests/baselines/reference/interfaceExtendingClass.js +++ b/tests/baselines/reference/interfaceExtendingClass.js @@ -23,7 +23,8 @@ i = f; var Foo = (function () { function Foo() { } - Foo.prototype.y = function () { }; + Foo.prototype.y = function () { + }; Object.defineProperty(Foo.prototype, "Z", { get: function () { return 1; diff --git a/tests/baselines/reference/interfaceExtendingClass2.js b/tests/baselines/reference/interfaceExtendingClass2.js index 6e6605e2459..b0958717aa8 100644 --- a/tests/baselines/reference/interfaceExtendingClass2.js +++ b/tests/baselines/reference/interfaceExtendingClass2.js @@ -19,7 +19,8 @@ interface I2 extends Foo { // error var Foo = (function () { function Foo() { } - Foo.prototype.y = function () { }; + Foo.prototype.y = function () { + }; Object.defineProperty(Foo.prototype, "Z", { get: function () { return 1; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index d376f2dca98..5903726c05d 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -35,7 +35,8 @@ var Button = (function (_super) { function Button() { _super.apply(this, arguments); } - Button.prototype.select = function () { }; + Button.prototype.select = function () { + }; return Button; })(Control); var TextBox = (function (_super) { @@ -43,7 +44,8 @@ var TextBox = (function (_super) { function TextBox() { _super.apply(this, arguments); } - TextBox.prototype.select = function () { }; + TextBox.prototype.select = function () { + }; return TextBox; })(Control); var Image = (function (_super) { @@ -56,6 +58,7 @@ var Image = (function (_super) { var Location = (function () { function Location() { } - Location.prototype.select = function () { }; + Location.prototype.select = function () { + }; return Location; })(); diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 521a71199ad..4cf0281ac7a 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -38,7 +38,9 @@ var C = (function () { function C() { this.x = 1; } - C.prototype.foo = function (x) { return x; }; + C.prototype.foo = function (x) { + return x; + }; return C; })(); var D = (function (_super) { @@ -46,9 +48,14 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function (x) { return x; }; - D.prototype.other = function (x) { return x; }; - D.prototype.bar = function () { }; + D.prototype.foo = function (x) { + return x; + }; + D.prototype.other = function (x) { + return x; + }; + D.prototype.bar = function () { + }; return D; })(C); var c; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index c177f2e7a90..5805302d7d7 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -34,7 +34,9 @@ var C = (function () { function C() { this.x = 1; } - C.prototype.foo = function (x) { return x; }; + C.prototype.foo = function (x) { + return x; + }; return C; })(); var D = (function (_super) { @@ -44,9 +46,14 @@ var D = (function (_super) { this.x = 2; this.y = 3; } - D.prototype.foo = function (x) { return x; }; - D.prototype.other = function (x) { return x; }; - D.prototype.bar = function () { }; + D.prototype.foo = function (x) { + return x; + }; + D.prototype.other = function (x) { + return x; + }; + D.prototype.bar = function () { + }; return D; })(C); var D2 = (function (_super) { @@ -55,8 +62,13 @@ var D2 = (function (_super) { _super.apply(this, arguments); this.x = ""; } - D2.prototype.foo = function (x) { return x; }; - D2.prototype.other = function (x) { return x; }; - D2.prototype.bar = function () { }; + D2.prototype.foo = function (x) { + return x; + }; + D2.prototype.other = function (x) { + return x; + }; + D2.prototype.bar = function () { + }; return D2; })(C); diff --git a/tests/baselines/reference/interfaceImplementation1.js b/tests/baselines/reference/interfaceImplementation1.js index 8f02596682d..ce82a24f63d 100644 --- a/tests/baselines/reference/interfaceImplementation1.js +++ b/tests/baselines/reference/interfaceImplementation1.js @@ -50,7 +50,8 @@ c["foo"]; var C1 = (function () { function C1() { } - C1.prototype.iFn = function (n, s) { }; + C1.prototype.iFn = function (n, s) { + }; return C1; })(); var C2 = (function () { diff --git a/tests/baselines/reference/interfaceImplementation3.js b/tests/baselines/reference/interfaceImplementation3.js index da85de545cd..626c92e83d1 100644 --- a/tests/baselines/reference/interfaceImplementation3.js +++ b/tests/baselines/reference/interfaceImplementation3.js @@ -19,6 +19,7 @@ class C4 implements I1 { var C4 = (function () { function C4() { } - C4.prototype.iFn = function () { }; + C4.prototype.iFn = function () { + }; return C4; })(); diff --git a/tests/baselines/reference/interfaceImplementation4.js b/tests/baselines/reference/interfaceImplementation4.js index 4a093381b5d..94565d1b22f 100644 --- a/tests/baselines/reference/interfaceImplementation4.js +++ b/tests/baselines/reference/interfaceImplementation4.js @@ -17,6 +17,7 @@ class C5 implements I1 { var C5 = (function () { function C5() { } - C5.prototype.iFn = function () { }; + C5.prototype.iFn = function () { + }; return C5; })(); diff --git a/tests/baselines/reference/interfaceImplementation5.js b/tests/baselines/reference/interfaceImplementation5.js index c710eda84f5..667c5f045ec 100644 --- a/tests/baselines/reference/interfaceImplementation5.js +++ b/tests/baselines/reference/interfaceImplementation5.js @@ -36,7 +36,9 @@ var C1 = (function () { function C1() { } Object.defineProperty(C1.prototype, "getset1", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -46,7 +48,8 @@ var C2 = (function () { function C2() { } Object.defineProperty(C2.prototype, "getset1", { - set: function (baz) { }, + set: function (baz) { + }, enumerable: true, configurable: true }); @@ -56,8 +59,11 @@ var C3 = (function () { function C3() { } Object.defineProperty(C3.prototype, "getset1", { - get: function () { return 1; }, - set: function (baz) { }, + get: function () { + return 1; + }, + set: function (baz) { + }, enumerable: true, configurable: true }); @@ -67,7 +73,10 @@ var C4 = (function () { function C4() { } Object.defineProperty(C4.prototype, "getset1", { - get: function () { var x; return x; }, + get: function () { + var x; + return x; + }, enumerable: true, configurable: true }); @@ -77,7 +86,8 @@ var C5 = (function () { function C5() { } Object.defineProperty(C5.prototype, "getset1", { - set: function (baz) { }, + set: function (baz) { + }, enumerable: true, configurable: true }); @@ -87,8 +97,12 @@ var C6 = (function () { function C6() { } Object.defineProperty(C6.prototype, "getset1", { - get: function () { var x; return x; }, - set: function (baz) { }, + get: function () { + var x; + return x; + }, + set: function (baz) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/interfaceImplementation6.js b/tests/baselines/reference/interfaceImplementation6.js index 4feb6804db3..c9bd9113e7e 100644 --- a/tests/baselines/reference/interfaceImplementation6.js +++ b/tests/baselines/reference/interfaceImplementation6.js @@ -44,7 +44,9 @@ define(["require", "exports"], function (require, exports) { })(); var Test = (function () { function Test() { - this.pt = { item: 1 }; + this.pt = { + item: 1 + }; } return Test; })(); diff --git a/tests/baselines/reference/interfaceImplementation7.js b/tests/baselines/reference/interfaceImplementation7.js index 2813d7ee0fe..6345fe93a33 100644 --- a/tests/baselines/reference/interfaceImplementation7.js +++ b/tests/baselines/reference/interfaceImplementation7.js @@ -14,6 +14,8 @@ class C1 implements i4 { var C1 = (function () { function C1() { } - C1.prototype.name = function () { return ""; }; + C1.prototype.name = function () { + return ""; + }; return C1; })(); diff --git a/tests/baselines/reference/interfaceNaming1.js b/tests/baselines/reference/interfaceNaming1.js index 2abd2106b2f..e16f186379b 100644 --- a/tests/baselines/reference/interfaceNaming1.js +++ b/tests/baselines/reference/interfaceNaming1.js @@ -6,5 +6,6 @@ interface & { } //// [interfaceNaming1.js] interface; -{ } +{ +} interface & {}; diff --git a/tests/baselines/reference/interfaceSubtyping.js b/tests/baselines/reference/interfaceSubtyping.js index 43004985782..840ce79d869 100644 --- a/tests/baselines/reference/interfaceSubtyping.js +++ b/tests/baselines/reference/interfaceSubtyping.js @@ -14,6 +14,8 @@ var Camera = (function () { function Camera(str) { this.str = str; } - Camera.prototype.foo = function () { return "s"; }; + Camera.prototype.foo = function () { + return "s"; + }; return Camera; })(); diff --git a/tests/baselines/reference/interfaceWithPropertyOfEveryType.js b/tests/baselines/reference/interfaceWithPropertyOfEveryType.js index a7605dd52bc..4f8d8919563 100644 --- a/tests/baselines/reference/interfaceWithPropertyOfEveryType.js +++ b/tests/baselines/reference/interfaceWithPropertyOfEveryType.js @@ -48,7 +48,8 @@ var C = (function () { } return C; })(); -function f1() { } +function f1() { +} var M; (function (M) { M.y = 1; @@ -63,10 +64,16 @@ var a = { c: true, d: {}, e: null, - f: [1], + f: [ + 1 + ], g: {}, - h: function (x) { return 1; }, - i: function (x) { return x; }, + h: function (x) { + return 1; + }, + i: function (x) { + return x; + }, j: null, k: new C(), l: f1, diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js index d53ec04c183..01907f410e3 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js @@ -19,12 +19,14 @@ interface Foo2 extends Base2 { // error var Base = (function () { function Base() { } - Base.prototype.x = function () { }; + Base.prototype.x = function () { + }; return Base; })(); var Base2 = (function () { function Base2() { } - Base2.prototype.x = function () { }; + Base2.prototype.x = function () { + }; return Base2; })(); diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.js b/tests/baselines/reference/invalidDoWhileBreakStatements.js index 807d58a8fea..e6617ef98cd 100644 --- a/tests/baselines/reference/invalidDoWhileBreakStatements.js +++ b/tests/baselines/reference/invalidDoWhileBreakStatements.js @@ -60,7 +60,8 @@ THREE: do { // break forward do { break FIVE; - FIVE: do { } while (true); + FIVE: do { + } while (true); } while (true); // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.js b/tests/baselines/reference/invalidDoWhileContinueStatements.js index 21a10a3451b..d32ccfe0074 100644 --- a/tests/baselines/reference/invalidDoWhileContinueStatements.js +++ b/tests/baselines/reference/invalidDoWhileContinueStatements.js @@ -60,7 +60,8 @@ THREE: do { // continue forward do { continue FIVE; - FIVE: do { } while (true); + FIVE: do { + } while (true); } while (true); // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForBreakStatements.js b/tests/baselines/reference/invalidForBreakStatements.js index 5e3430ecb41..abcd078ff2d 100644 --- a/tests/baselines/reference/invalidForBreakStatements.js +++ b/tests/baselines/reference/invalidForBreakStatements.js @@ -58,7 +58,8 @@ THREE: for (;;) { // break forward for (;;) { break FIVE; - FIVE: for (;;) { } + FIVE: for (;;) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForContinueStatements.js b/tests/baselines/reference/invalidForContinueStatements.js index 2db1ce69ede..af0eba2a59a 100644 --- a/tests/baselines/reference/invalidForContinueStatements.js +++ b/tests/baselines/reference/invalidForContinueStatements.js @@ -58,7 +58,8 @@ THREE: for (;;) { // continue forward for (;;) { continue FIVE; - FIVE: for (;;) { } + FIVE: for (;;) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForInBreakStatements.js b/tests/baselines/reference/invalidForInBreakStatements.js index 1784b9a57a6..bf383613c3b 100644 --- a/tests/baselines/reference/invalidForInBreakStatements.js +++ b/tests/baselines/reference/invalidForInBreakStatements.js @@ -59,7 +59,8 @@ THREE: for (var x in {}) { // break forward for (var x in {}) { break FIVE; - FIVE: for (var x in {}) { } + FIVE: for (var x in {}) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForInContinueStatements.js b/tests/baselines/reference/invalidForInContinueStatements.js index 94020d00f2b..d40dbd80ca0 100644 --- a/tests/baselines/reference/invalidForInContinueStatements.js +++ b/tests/baselines/reference/invalidForInContinueStatements.js @@ -59,7 +59,8 @@ THREE: for (var x in {}) { // continue forward for (var x in {}) { continue FIVE; - FIVE: for (var x in {}) { } + FIVE: for (var x in {}) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidModuleWithVarStatements.js b/tests/baselines/reference/invalidModuleWithVarStatements.js index caa6b24f00f..4014709d361 100644 --- a/tests/baselines/reference/invalidModuleWithVarStatements.js +++ b/tests/baselines/reference/invalidModuleWithVarStatements.js @@ -35,7 +35,8 @@ var Y; })(Y || (Y = {})); var Y2; (function (Y2) { - function fn(x) { } + function fn(x) { + } })(Y2 || (Y2 = {})); var Y4; (function (Y4) { @@ -43,7 +44,8 @@ var Y4; })(Y4 || (Y4 = {})); var YY; (function (YY) { - function fn(x) { } + function fn(x) { + } })(YY || (YY = {})); var YY2; (function (YY2) { @@ -51,5 +53,6 @@ var YY2; })(YY2 || (YY2 = {})); var YY3; (function (YY3) { - function fn(x) { } + function fn(x) { + } })(YY3 || (YY3 = {})); diff --git a/tests/baselines/reference/invalidMultipleVariableDeclarations.js b/tests/baselines/reference/invalidMultipleVariableDeclarations.js index 824bee92227..62ea392be28 100644 --- a/tests/baselines/reference/invalidMultipleVariableDeclarations.js +++ b/tests/baselines/reference/invalidMultipleVariableDeclarations.js @@ -77,7 +77,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -86,7 +88,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); // all of these are errors @@ -100,11 +104,24 @@ var b; var b = new C(); var b = new C2(); var f = F; -var f = function (x) { return ''; }; +var f = function (x) { + return ''; +}; var arr; -var arr = [1, 2, 3, 4]; -var arr = [new C(), new C2(), new D()]; -var arr2 = [new D()]; +var arr = [ + 1, + 2, + 3, + 4 +]; +var arr = [ + new C(), + new C2(), + new D() +]; +var arr2 = [ + new D() +]; var arr2 = new Array(); var m; var m = M.A; diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index d637158780a..df6f6da6753 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -28,15 +28,21 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // all the following should be error -function fn1() { } -function fn2() { } -function fn3() { } -function fn4() { } -function fn7() { } // should be valid: any includes void +function fn1() { +} +function fn2() { +} +function fn3() { +} +function fn4() { +} +function fn7() { +} // should be valid: any includes void var C = (function () { function C() { } - C.prototype.dispose = function () { }; + C.prototype.dispose = function () { + }; return C; })(); var D = (function (_super) { @@ -46,5 +52,11 @@ var D = (function (_super) { } return D; })(C); -function fn10() { return { id: 12 }; } -function fn11() { return new C(); } +function fn10() { + return { + id: 12 + }; +} +function fn11() { + return new C(); +} diff --git a/tests/baselines/reference/invalidStaticField.js b/tests/baselines/reference/invalidStaticField.js index 620c019fc18..5521af05c83 100644 --- a/tests/baselines/reference/invalidStaticField.js +++ b/tests/baselines/reference/invalidStaticField.js @@ -6,7 +6,9 @@ class B { static NOT_NULL = new B(); } var A = (function () { function A() { } - A.prototype.foo = function () { return B.NULL; }; + A.prototype.foo = function () { + return B.NULL; + }; return A; })(); var B = (function () { diff --git a/tests/baselines/reference/invalidTryStatements.js b/tests/baselines/reference/invalidTryStatements.js index 343ad6e0584..8afadf41b4d 100644 --- a/tests/baselines/reference/invalidTryStatements.js +++ b/tests/baselines/reference/invalidTryStatements.js @@ -21,10 +21,16 @@ function fn() { var x; // ensure x is 'Any' } // no type annotation allowed - try { } - catch (z) { } - try { } - catch (a) { } - try { } - catch (y) { } + try { + } + catch (z) { + } + try { + } + catch (a) { + } + try { + } + catch (y) { + } } diff --git a/tests/baselines/reference/invalidTryStatements2.js b/tests/baselines/reference/invalidTryStatements2.js index 1b2976dc4e7..d2ef92ac831 100644 --- a/tests/baselines/reference/invalidTryStatements2.js +++ b/tests/baselines/reference/invalidTryStatements2.js @@ -36,16 +36,20 @@ function fn() { } try { } - catch (x) { } // error missing try - finally { } // potential error; can be absorbed by the 'catch' + catch (x) { + } // error missing try + finally { + } // potential error; can be absorbed by the 'catch' } function fn2() { try { } - finally { } // error missing try + finally { + } // error missing try try { } // error missing try - catch (x) { } // error missing try + catch (x) { + } // error missing try // no error try { } diff --git a/tests/baselines/reference/invalidTypeOfTarget.js b/tests/baselines/reference/invalidTypeOfTarget.js index 52b39f3c76a..88128d15e85 100644 --- a/tests/baselines/reference/invalidTypeOfTarget.js +++ b/tests/baselines/reference/invalidTypeOfTarget.js @@ -15,5 +15,6 @@ var x3 = 1; var x4 = ''; var x5; var x6 = null; -var x7 = function f() { }; +var x7 = function f() { +}; var x8 = /123/; diff --git a/tests/baselines/reference/invalidUndefinedAssignments.js b/tests/baselines/reference/invalidUndefinedAssignments.js index 1feba71212d..0b37316e085 100644 --- a/tests/baselines/reference/invalidUndefinedAssignments.js +++ b/tests/baselines/reference/invalidUndefinedAssignments.js @@ -44,6 +44,7 @@ var M; M.x = 1; })(M || (M = {})); M = x; -function i(a) { } +function i(a) { +} // BUG 767030 i = x; diff --git a/tests/baselines/reference/invalidUndefinedValues.js b/tests/baselines/reference/invalidUndefinedValues.js index 819bf114cec..b4751cf25d8 100644 --- a/tests/baselines/reference/invalidUndefinedValues.js +++ b/tests/baselines/reference/invalidUndefinedValues.js @@ -54,7 +54,10 @@ var M; M.x = 1; })(M || (M = {})); x = M; -x = { f: function () { } }; +x = { + f: function () { + } +}; function f(a) { x = a; } diff --git a/tests/baselines/reference/invalidVoidAssignments.js b/tests/baselines/reference/invalidVoidAssignments.js index 40b83d329c1..c8c395b0e4f 100644 --- a/tests/baselines/reference/invalidVoidAssignments.js +++ b/tests/baselines/reference/invalidVoidAssignments.js @@ -59,4 +59,7 @@ var E; })(E || (E = {})); x = E; x = 0 /* A */; -x = { f: function () { } }; +x = { + f: function () { + } +}; diff --git a/tests/baselines/reference/invalidVoidValues.js b/tests/baselines/reference/invalidVoidValues.js index 658ebc7e1ca..6740eb3fc1b 100644 --- a/tests/baselines/reference/invalidVoidValues.js +++ b/tests/baselines/reference/invalidVoidValues.js @@ -46,7 +46,10 @@ var a; x = a; var b; x = b; -x = { f: function () { } }; +x = { + f: function () { + } +}; var M; (function (M) { M.x = 1; diff --git a/tests/baselines/reference/invalidWhileBreakStatements.js b/tests/baselines/reference/invalidWhileBreakStatements.js index 7f10a08d65c..a8e261f036c 100644 --- a/tests/baselines/reference/invalidWhileBreakStatements.js +++ b/tests/baselines/reference/invalidWhileBreakStatements.js @@ -59,7 +59,8 @@ THREE: while (true) { // break forward while (true) { break FIVE; - FIVE: while (true) { } + FIVE: while (true) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidWhileContinueStatements.js b/tests/baselines/reference/invalidWhileContinueStatements.js index b8234bf9604..544314bf68d 100644 --- a/tests/baselines/reference/invalidWhileContinueStatements.js +++ b/tests/baselines/reference/invalidWhileContinueStatements.js @@ -59,7 +59,8 @@ THREE: while (true) { // continue forward while (true) { continue FIVE; - FIVE: while (true) { } + FIVE: while (true) { + } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/ipromise4.js b/tests/baselines/reference/ipromise4.js index 98660aa5824..5b65e0818c2 100644 --- a/tests/baselines/reference/ipromise4.js +++ b/tests/baselines/reference/ipromise4.js @@ -18,5 +18,10 @@ p.then(function (x) { return "hello"; } ).then(function (x) { return x } ); // s //// [ipromise4.js] var p = null; -p.then(function (x) { }); // should not error -p.then(function (x) { return "hello"; }).then(function (x) { return x; }); // should not error +p.then(function (x) { +}); // should not error +p.then(function (x) { + return "hello"; +}).then(function (x) { + return x; +}); // should not error diff --git a/tests/baselines/reference/iterableContextualTyping1.js b/tests/baselines/reference/iterableContextualTyping1.js index 8621bbd8417..12943b46894 100644 --- a/tests/baselines/reference/iterableContextualTyping1.js +++ b/tests/baselines/reference/iterableContextualTyping1.js @@ -2,4 +2,6 @@ var iter: Iterable<(x: string) => number> = [s => s.length]; //// [iterableContextualTyping1.js] -var iter = [s => s.length]; +var iter = [ + s => s.length +]; diff --git a/tests/baselines/reference/keywordField.js b/tests/baselines/reference/keywordField.js index 581d5afa14a..b6b54de2067 100644 --- a/tests/baselines/reference/keywordField.js +++ b/tests/baselines/reference/keywordField.js @@ -13,6 +13,8 @@ var q = a["if"]; //// [keywordField.js] var obj = {}; obj.if = 1; -var a = { if: "test" }; +var a = { + if: "test" +}; var n = a.if; var q = a["if"]; diff --git a/tests/baselines/reference/lambdaExpression.js b/tests/baselines/reference/lambdaExpression.js index dc5c94c8b33..ece70d217f1 100644 --- a/tests/baselines/reference/lambdaExpression.js +++ b/tests/baselines/reference/lambdaExpression.js @@ -6,7 +6,11 @@ var x = 0; //// [lambdaExpression.js] -(function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration) +(function () { + return 0; +}); // Needs to be wrapped in parens to be a valid expression (not declaration) var y = 0; -(function () { return 0; }); +(function () { + return 0; +}); var x = 0; diff --git a/tests/baselines/reference/lambdaParamTypes.js b/tests/baselines/reference/lambdaParamTypes.js index 3bd212512e4..bc2858e9b49 100644 --- a/tests/baselines/reference/lambdaParamTypes.js +++ b/tests/baselines/reference/lambdaParamTypes.js @@ -24,16 +24,45 @@ thing.doSomething((x, y) => y.name.toExponential(0)); //// [lambdaParamTypes.js] -var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); +var thing = create([ + { + name: "bob", + id: 24 + }, + { + name: "doug", + id: 32 + } +]); // Below should all be OK -thing.doSomething(function (x, y) { return x.name.charAt(0); }); // x.name should be string, so should be OK -thing.doSomething(function (x, y) { return x.id.toExponential(0); }); // x.id should be string, so should be OK -thing.doSomething(function (x, y) { return y.name.charAt(0); }); // x.name should be string, so should be OK -thing.doSomething(function (x, y) { return y.id.toExponential(0); }); // x.id should be string, so should be OK +thing.doSomething(function (x, y) { + return x.name.charAt(0); +}); // x.name should be string, so should be OK +thing.doSomething(function (x, y) { + return x.id.toExponential(0); +}); // x.id should be string, so should be OK +thing.doSomething(function (x, y) { + return y.name.charAt(0); +}); // x.name should be string, so should be OK +thing.doSomething(function (x, y) { + return y.id.toExponential(0); +}); // x.id should be string, so should be OK // Below should all be in error -thing.doSomething(function (x, y) { return x.foo; }); // no such property on x -thing.doSomething(function (x, y) { return y.foo; }); // no such property on y -thing.doSomething(function (x, y) { return x.id.charAt(0); }); // x.id should be number, no charAt member -thing.doSomething(function (x, y) { return x.name.toExponential(0); }); // x.name should be string, no toExponential member -thing.doSomething(function (x, y) { return y.id.charAt(0); }); -thing.doSomething(function (x, y) { return y.name.toExponential(0); }); +thing.doSomething(function (x, y) { + return x.foo; +}); // no such property on x +thing.doSomething(function (x, y) { + return y.foo; +}); // no such property on y +thing.doSomething(function (x, y) { + return x.id.charAt(0); +}); // x.id should be number, no charAt member +thing.doSomething(function (x, y) { + return x.name.toExponential(0); +}); // x.name should be string, no toExponential member +thing.doSomething(function (x, y) { + return y.id.charAt(0); +}); +thing.doSomething(function (x, y) { + return y.name.toExponential(0); +}); diff --git a/tests/baselines/reference/lambdaPropSelf.js b/tests/baselines/reference/lambdaPropSelf.js index 8d1b16e1431..5211dcc47ca 100644 --- a/tests/baselines/reference/lambdaPropSelf.js +++ b/tests/baselines/reference/lambdaPropSelf.js @@ -28,7 +28,9 @@ var Person = (function () { function Person(name, children) { var _this = this; this.name = name; - this.addChild = function () { return _this.children.push("New child"); }; + this.addChild = function () { + return _this.children.push("New child"); + }; this.children = ko.observableArray(children); } return Person; diff --git a/tests/baselines/reference/lastPropertyInLiteralWins.js b/tests/baselines/reference/lastPropertyInLiteralWins.js index 999fe45841b..19ec4e21000 100644 --- a/tests/baselines/reference/lastPropertyInLiteralWins.js +++ b/tests/baselines/reference/lastPropertyInLiteralWins.js @@ -21,10 +21,14 @@ function test(thing) { thing.thunk("str"); } test({ - thunk: function (str) { }, - thunk: function (num) { } + thunk: function (str) { + }, + thunk: function (num) { + } }); test({ - thunk: function (num) { }, - thunk: function (str) { } + thunk: function (num) { + }, + thunk: function (str) { + } }); diff --git a/tests/baselines/reference/letAndVarRedeclaration.js b/tests/baselines/reference/letAndVarRedeclaration.js index fd4bfe67cac..35222660b64 100644 --- a/tests/baselines/reference/letAndVarRedeclaration.js +++ b/tests/baselines/reference/letAndVarRedeclaration.js @@ -55,11 +55,13 @@ module M2 { //// [letAndVarRedeclaration.js] let e0; var e0; -function e0() { } +function e0() { +} function f0() { let x1; var x1; - function x1() { } + function x1() { + } } function f1() { let x; @@ -67,14 +69,16 @@ function f1() { var x; } { - function x() { } + function x() { + } } } var M0; (function (M0) { let x2; var x2; - function x2() { } + function x2() { + } })(M0 || (M0 = {})); var M1; (function (M1) { @@ -83,7 +87,8 @@ var M1; var x2; } { - function x2() { } + function x2() { + } } })(M1 || (M1 = {})); let x11; diff --git a/tests/baselines/reference/letDeclarations-access.js b/tests/baselines/reference/letDeclarations-access.js index 6ae289d220f..404c2876310 100644 --- a/tests/baselines/reference/letDeclarations-access.js +++ b/tests/baselines/reference/letDeclarations-access.js @@ -58,9 +58,11 @@ x--; ++x; --x; var a = x + 1; -function f(v) { } +function f(v) { +} f(x); -if (x) { } +if (x) { +} x; (x); -x; diff --git a/tests/baselines/reference/letDeclarations-es5.js b/tests/baselines/reference/letDeclarations-es5.js index 4ad43d52f76..5246e91edfb 100644 --- a/tests/baselines/reference/letDeclarations-es5.js +++ b/tests/baselines/reference/letDeclarations-es5.js @@ -20,5 +20,7 @@ var l3, l4, l5, l6; var l7 = false; var l8 = 23; var l9 = 0, l10 = "", l11 = null; -for (var _l11 in {}) { } -for (var l12 = 0; l12 < 9; l12++) { } +for (var _l11 in {}) { +} +for (var l12 = 0; l12 < 9; l12++) { +} diff --git a/tests/baselines/reference/letDeclarations.js b/tests/baselines/reference/letDeclarations.js index 8acb82204e3..bc186b732f5 100644 --- a/tests/baselines/reference/letDeclarations.js +++ b/tests/baselines/reference/letDeclarations.js @@ -20,8 +20,10 @@ let l3, l4, l5, l6; let l7 = false; let l8 = 23; let l9 = 0, l10 = "", l11 = null; -for (let l11 in {}) { } -for (let l12 = 0; l12 < 9; l12++) { } +for (let l11 in {}) { +} +for (let l12 = 0; l12 < 9; l12++) { +} //// [letDeclarations.d.ts] diff --git a/tests/baselines/reference/letInLetOrConstDeclarations.js b/tests/baselines/reference/letInLetOrConstDeclarations.js index ee23abc4e4f..6560ea84911 100644 --- a/tests/baselines/reference/letInLetOrConstDeclarations.js +++ b/tests/baselines/reference/letInLetOrConstDeclarations.js @@ -14,7 +14,8 @@ //// [letInLetOrConstDeclarations.js] { let let = 1; // should error - for (let let in []) { } // should error + for (let let in []) { + } // should error } { const let = 1; // should error diff --git a/tests/baselines/reference/lift.js b/tests/baselines/reference/lift.js index 33f8200530b..21c09aaeb53 100644 --- a/tests/baselines/reference/lift.js +++ b/tests/baselines/reference/lift.js @@ -37,7 +37,11 @@ var C = (function (_super) { var x = 10 + w; var ll = x * w; } - C.prototype.liftxyz = function () { return x + z + this.y; }; - C.prototype.liftxylocllz = function () { return x + z + this.y + this.ll; }; + C.prototype.liftxyz = function () { + return x + z + this.y; + }; + C.prototype.liftxylocllz = function () { + return x + z + this.y + this.ll; + }; return C; })(B); diff --git a/tests/baselines/reference/literals-negative.js b/tests/baselines/reference/literals-negative.js index 39fd4ea38a5..c0c9624e6f2 100644 --- a/tests/baselines/reference/literals-negative.js +++ b/tests/baselines/reference/literals-negative.js @@ -17,6 +17,8 @@ if(null === isVoid()) { } var n = (null); var s = (null); var b = (n); -function isVoid() { } +function isVoid() { +} // Expected error: Values of type null and void cannot be compared -if (null === isVoid()) { } +if (null === isVoid()) { +} diff --git a/tests/baselines/reference/localImportNameVsGlobalName.js b/tests/baselines/reference/localImportNameVsGlobalName.js index 6a4f1ceabc1..f27e7d648d1 100644 --- a/tests/baselines/reference/localImportNameVsGlobalName.js +++ b/tests/baselines/reference/localImportNameVsGlobalName.js @@ -27,7 +27,8 @@ var Keyboard; var App; (function (App) { var Key = Keyboard.Key; - function foo(key) { } + function foo(key) { + } App.foo = foo; foo(0 /* UP */); foo(1 /* DOWN */); diff --git a/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js b/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js index 28366739233..891faacd4a4 100644 --- a/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js @@ -63,9 +63,16 @@ var ResultIsBoolean21 = !!!(ANY + ANY1); // ! operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/logicalNotOperatorWithBooleanType.js b/tests/baselines/reference/logicalNotOperatorWithBooleanType.js index 107bd9a88ec..6f16fbfa2e4 100644 --- a/tests/baselines/reference/logicalNotOperatorWithBooleanType.js +++ b/tests/baselines/reference/logicalNotOperatorWithBooleanType.js @@ -41,11 +41,15 @@ var ResultIsBoolean = !!BOOLEAN; //// [logicalNotOperatorWithBooleanType.js] // ! operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -57,7 +61,10 @@ var objA = new A(); var ResultIsBoolean1 = !BOOLEAN; // boolean type literal var ResultIsBoolean2 = !true; -var ResultIsBoolean3 = !{ x: true, y: false }; +var ResultIsBoolean3 = !{ + x: true, + y: false +}; // boolean type expressions var ResultIsBoolean4 = !objA.a; var ResultIsBoolean5 = !M.n; diff --git a/tests/baselines/reference/logicalNotOperatorWithNumberType.js b/tests/baselines/reference/logicalNotOperatorWithNumberType.js index 0d0601cad23..7beba45ba0b 100644 --- a/tests/baselines/reference/logicalNotOperatorWithNumberType.js +++ b/tests/baselines/reference/logicalNotOperatorWithNumberType.js @@ -48,12 +48,19 @@ var ResultIsBoolean13 = !!!(NUMBER + NUMBER); //// [logicalNotOperatorWithNumberType.js] // ! operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -66,8 +73,16 @@ var ResultIsBoolean1 = !NUMBER; var ResultIsBoolean2 = !NUMBER1; // number type literal var ResultIsBoolean3 = !1; -var ResultIsBoolean4 = !{ x: 1, y: 2 }; -var ResultIsBoolean5 = !{ x: 1, y: function (n) { return n; } }; +var ResultIsBoolean4 = !{ + x: 1, + y: 2 +}; +var ResultIsBoolean5 = !{ + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsBoolean6 = !objA.a; var ResultIsBoolean7 = !M.n; diff --git a/tests/baselines/reference/logicalNotOperatorWithStringType.js b/tests/baselines/reference/logicalNotOperatorWithStringType.js index 7f75814d601..571857cb6b3 100644 --- a/tests/baselines/reference/logicalNotOperatorWithStringType.js +++ b/tests/baselines/reference/logicalNotOperatorWithStringType.js @@ -47,12 +47,19 @@ var ResultIsBoolean14 = !!!(STRING + STRING); //// [logicalNotOperatorWithStringType.js] // ! operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -65,8 +72,16 @@ var ResultIsBoolean1 = !STRING; var ResultIsBoolean2 = !STRING1; // string type literal var ResultIsBoolean3 = !""; -var ResultIsBoolean4 = !{ x: "", y: "" }; -var ResultIsBoolean5 = !{ x: "", y: function (s) { return s; } }; +var ResultIsBoolean4 = !{ + x: "", + y: "" +}; +var ResultIsBoolean5 = !{ + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsBoolean6 = !objA.a; var ResultIsBoolean7 = !M.n; diff --git a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.js b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.js index 64bdc871571..12e55119c35 100644 --- a/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.js +++ b/tests/baselines/reference/logicalOrExpressionIsContextuallyTyped.js @@ -11,4 +11,10 @@ var r: { a: string } = { a: '', b: 123 } || { a: '', b: true }; // 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: '', b: 123 } || { a: '', b: true }; +var r = { + a: '', + b: 123 +} || { + a: '', + b: true +}; diff --git a/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.js b/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.js index 73e1c33a4e0..0731cb620a5 100644 --- a/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.js +++ b/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.js @@ -17,4 +17,6 @@ var r = a || ((a) => a.toLowerCase()); // operand types. var a; // bug 786110 -var r = a || (function (a) { return a.toLowerCase(); }); +var r = a || (function (a) { + return a.toLowerCase(); +}); diff --git a/tests/baselines/reference/logicalOrOperatorWithTypeParameters.js b/tests/baselines/reference/logicalOrOperatorWithTypeParameters.js index e0fca87efa8..b73a3144064 100644 --- a/tests/baselines/reference/logicalOrOperatorWithTypeParameters.js +++ b/tests/baselines/reference/logicalOrOperatorWithTypeParameters.js @@ -42,6 +42,8 @@ function fn2(t, u, v) { function fn3(t, u) { var r1 = t || u; var r2 = t || u; - var r3 = t || { a: '' }; + var r3 = t || { + a: '' + }; var r4 = t || u; } diff --git a/tests/baselines/reference/matchingOfObjectLiteralConstraints.js b/tests/baselines/reference/matchingOfObjectLiteralConstraints.js index 1d19359894d..13d9e0e05e8 100644 --- a/tests/baselines/reference/matchingOfObjectLiteralConstraints.js +++ b/tests/baselines/reference/matchingOfObjectLiteralConstraints.js @@ -5,5 +5,8 @@ foo2({ y: "foo" }, "foo"); //// [matchingOfObjectLiteralConstraints.js] -function foo2(x, z) { } -foo2({ y: "foo" }, "foo"); +function foo2(x, z) { +} +foo2({ + y: "foo" +}, "foo"); diff --git a/tests/baselines/reference/maxConstraints.js b/tests/baselines/reference/maxConstraints.js index b2098ccaf2b..4ea37d30501 100644 --- a/tests/baselines/reference/maxConstraints.js +++ b/tests/baselines/reference/maxConstraints.js @@ -9,5 +9,7 @@ var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y }; var maxResult = max2(1, 2); //// [maxConstraints.js] -var max2 = function (x, y) { return (x.compareTo(y) > 0) ? x : y; }; +var max2 = function (x, y) { + return (x.compareTo(y) > 0) ? x : y; +}; var maxResult = max2(1, 2); diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js index 584bafad6f6..dc347e95580 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js @@ -53,19 +53,27 @@ var r4 = D.bar(''); // error var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; - C.prototype.bar = function (x, y) { }; - C.foo = function (x, y) { }; - C.bar = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; + C.prototype.bar = function (x, y) { + }; + C.foo = function (x, y) { + }; + C.bar = function (x, y) { + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { }; - D.prototype.bar = function (x, y) { }; - D.foo = function (x, y) { }; - D.bar = function (x, y) { }; + D.prototype.foo = function (x, y) { + }; + D.prototype.bar = function (x, y) { + }; + D.foo = function (x, y) { + }; + D.bar = function (x, y) { + }; return D; })(); var c; diff --git a/tests/baselines/reference/memberFunctionsWithPublicOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicOverloads.js index efdd6efaffa..5eaf894f549 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicOverloads.js @@ -44,18 +44,26 @@ class D { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; - C.prototype.bar = function (x, y) { }; - C.foo = function (x, y) { }; - C.bar = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; + C.prototype.bar = function (x, y) { + }; + C.foo = function (x, y) { + }; + C.bar = function (x, y) { + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { }; - D.prototype.bar = function (x, y) { }; - D.foo = function (x, y) { }; - D.bar = function (x, y) { }; + D.prototype.foo = function (x, y) { + }; + D.prototype.bar = function (x, y) { + }; + D.foo = function (x, y) { + }; + D.bar = function (x, y) { + }; return D; })(); diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js index 7738bf4fe4e..2726756c803 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js @@ -66,23 +66,35 @@ var r2 = d.foo(2); // error var C = (function () { function C() { } - C.prototype.foo = function (x, y) { }; - C.prototype.bar = function (x, y) { }; - C.foo = function (x, y) { }; - C.prototype.baz = function (x, y) { }; - C.bar = function (x, y) { }; - C.baz = function (x, y) { }; + C.prototype.foo = function (x, y) { + }; + C.prototype.bar = function (x, y) { + }; + C.foo = function (x, y) { + }; + C.prototype.baz = function (x, y) { + }; + C.bar = function (x, y) { + }; + C.baz = function (x, y) { + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { }; - D.prototype.bar = function (x, y) { }; - D.prototype.baz = function (x, y) { }; - D.foo = function (x, y) { }; - D.bar = function (x, y) { }; - D.baz = function (x, y) { }; + D.prototype.foo = function (x, y) { + }; + D.prototype.bar = function (x, y) { + }; + D.prototype.baz = function (x, y) { + }; + D.foo = function (x, y) { + }; + D.bar = function (x, y) { + }; + D.baz = function (x, y) { + }; return D; })(); var c; diff --git a/tests/baselines/reference/mergedDeclarations1.js b/tests/baselines/reference/mergedDeclarations1.js index 641ff031ded..9dc432f94a6 100644 --- a/tests/baselines/reference/mergedDeclarations1.js +++ b/tests/baselines/reference/mergedDeclarations1.js @@ -18,7 +18,10 @@ var b = point.equals(p1, p2); //// [mergedDeclarations1.js] function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } var point; (function (point) { diff --git a/tests/baselines/reference/mergedDeclarations4.js b/tests/baselines/reference/mergedDeclarations4.js index 64fad6bd598..a3dab29ff75 100644 --- a/tests/baselines/reference/mergedDeclarations4.js +++ b/tests/baselines/reference/mergedDeclarations4.js @@ -21,7 +21,8 @@ M.f.hello; //// [mergedDeclarations4.js] var M; (function (M) { - function f() { } + function f() { + } M.f = f; f(); M.f(); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js index bb0e846d063..457bd12b8f0 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js @@ -15,7 +15,8 @@ var my; (function (data) { var foo; (function (foo) { - function buz() { } + function buz() { + } foo.buz = buz; })(foo = data.foo || (data.foo = {})); })(data = my.data || (my.data = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js index a03b418fcc9..0618346dd75 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js @@ -13,7 +13,8 @@ var my; (function (my) { var data; (function (data) { - function buz() { } + function buz() { + } data.buz = buz; })(data = my.data || (my.data = {})); })(my || (my = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js index 9efba74a27b..2463c9cae90 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js @@ -27,7 +27,8 @@ var superContain; (function (buz) { var data; (function (data) { - function foo() { } + function foo() { + } data.foo = foo; })(data = buz.data || (buz.data = {})); })(buz = my.buz || (my.buz = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js index ce453264f78..2c8e0bb79e4 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js @@ -25,9 +25,11 @@ var M; (function (buz) { var plop; (function (plop) { - function doom() { } + function doom() { + } plop.doom = doom; - function M() { } + function M() { + } plop.M = M; })(plop = buz.plop || (buz.plop = {})); })(buz = _M.buz || (_M.buz = {})); @@ -38,8 +40,10 @@ var M; (function (_buz) { var plop; (function (_plop) { - function gunk() { } - function buz() { } + function gunk() { + } + function buz() { + } var fudge = (function () { function fudge() { } diff --git a/tests/baselines/reference/methodContainingLocalFunction.js b/tests/baselines/reference/methodContainingLocalFunction.js index f2f336d38b7..36487e3ad7c 100644 --- a/tests/baselines/reference/methodContainingLocalFunction.js +++ b/tests/baselines/reference/methodContainingLocalFunction.js @@ -56,7 +56,8 @@ var BugExhibition = (function () { function BugExhibition() { } BugExhibition.prototype.exhibitBug = function () { - function localFunction() { } + function localFunction() { + } var x; x = localFunction; }; @@ -67,7 +68,8 @@ var BugExhibition2 = (function () { } Object.defineProperty(BugExhibition2, "exhibitBug", { get: function () { - function localFunction() { } + function localFunction() { + } var x; x = localFunction; return null; @@ -81,7 +83,8 @@ var BugExhibition3 = (function () { function BugExhibition3() { } BugExhibition3.prototype.exhibitBug = function () { - function localGenericFunction(u) { } + function localGenericFunction(u) { + } var x; x = localGenericFunction; }; @@ -91,7 +94,8 @@ var C = (function () { function C() { } C.prototype.exhibit = function () { - var funcExpr = function (u) { }; + var funcExpr = function (u) { + }; var x; x = funcExpr; }; @@ -100,7 +104,8 @@ var C = (function () { var M; (function (M) { function exhibitBug() { - function localFunction() { } + function localFunction() { + } var x; x = localFunction; } @@ -109,7 +114,8 @@ var M; var E; (function (E) { E[E["A"] = (function () { - function localFunction() { } + function localFunction() { + } var x; x = localFunction; return 0; diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js index 0465ea46f55..0315f0c7a63 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.js @@ -15,12 +15,44 @@ var r8 = map([1, ""], (x) => x.toString()); //// [mismatchedExplicitTypeParameterAndArgumentType.js] function map(xs, f) { var ys = []; - xs.forEach(function (x) { return ys.push(f(x)); }); + xs.forEach(function (x) { + return ys.push(f(x)); + }); return ys; } -var r0 = map([1, ""], function (x) { return x.toString(); }); -var r5 = map([1, ""], function (x) { return x.toString(); }); -var r6 = map([1, ""], function (x) { return x.toString(); }); -var r7 = map([1, ""], function (x) { return x.toString(); }); // error -var r7b = map([1, ""], function (x) { return x.toString(); }); // error -var r8 = map([1, ""], function (x) { return x.toString(); }); +var r0 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); +var r5 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); +var r6 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); +var r7 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); // error +var r7b = map([ + 1, + "" +], function (x) { + return x.toString(); +}); // error +var r8 = map([ + 1, + "" +], function (x) { + return x.toString(); +}); diff --git a/tests/baselines/reference/missingSelf.js b/tests/baselines/reference/missingSelf.js index 56dcc4f9fa0..a0400aa4b2e 100644 --- a/tests/baselines/reference/missingSelf.js +++ b/tests/baselines/reference/missingSelf.js @@ -22,8 +22,11 @@ c2.b(); var CalcButton = (function () { function CalcButton() { } - CalcButton.prototype.a = function () { this.onClick(); }; - CalcButton.prototype.onClick = function () { }; + CalcButton.prototype.a = function () { + this.onClick(); + }; + CalcButton.prototype.onClick = function () { + }; return CalcButton; })(); var CalcButton2 = (function () { @@ -31,9 +34,12 @@ var CalcButton2 = (function () { } CalcButton2.prototype.b = function () { var _this = this; - (function () { return _this.onClick(); }); + (function () { + return _this.onClick(); + }); + }; + CalcButton2.prototype.onClick = function () { }; - CalcButton2.prototype.onClick = function () { }; return CalcButton2; })(); var c = new CalcButton(); diff --git a/tests/baselines/reference/missingTypeArguments2.js b/tests/baselines/reference/missingTypeArguments2.js index bc5c1d88f46..fe4b7c7dd79 100644 --- a/tests/baselines/reference/missingTypeArguments2.js +++ b/tests/baselines/reference/missingTypeArguments2.js @@ -13,6 +13,9 @@ var A = (function () { return A; })(); var x; -(function (a) { }); +(function (a) { +}); var y; -(function () { return null; }); +(function () { + return null; +}); diff --git a/tests/baselines/reference/mixingFunctionAndAmbientModule1.js b/tests/baselines/reference/mixingFunctionAndAmbientModule1.js index db1bc28a144..3105c923304 100644 --- a/tests/baselines/reference/mixingFunctionAndAmbientModule1.js +++ b/tests/baselines/reference/mixingFunctionAndAmbientModule1.js @@ -45,11 +45,13 @@ module E { //// [mixingFunctionAndAmbientModule1.js] var A; (function (A) { - function My(s) { } + function My(s) { + } })(A || (A = {})); var B; (function (B) { - function My(s) { } + function My(s) { + } })(B || (B = {})); var C; (function (C) { diff --git a/tests/baselines/reference/mixingStaticAndInstanceOverloads.js b/tests/baselines/reference/mixingStaticAndInstanceOverloads.js index 22367461c2c..59495280771 100644 --- a/tests/baselines/reference/mixingStaticAndInstanceOverloads.js +++ b/tests/baselines/reference/mixingStaticAndInstanceOverloads.js @@ -39,31 +39,37 @@ class C5 { var C1 = (function () { function C1() { } - C1.foo1 = function (a) { }; + C1.foo1 = function (a) { + }; return C1; })(); var C2 = (function () { function C2() { } - C2.prototype.foo2 = function (a) { }; + C2.prototype.foo2 = function (a) { + }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo3 = function (a) { }; + C3.prototype.foo3 = function (a) { + }; return C3; })(); var C4 = (function () { function C4() { } - C4.foo4 = function (a) { }; + C4.foo4 = function (a) { + }; return C4; })(); var C5 = (function () { function C5() { } - C5.prototype.foo5 = function (a) { }; - C5.foo5 = function (a) { }; + C5.prototype.foo5 = function (a) { + }; + C5.foo5 = function (a) { + }; return C5; })(); diff --git a/tests/baselines/reference/modFunctionCrash.js b/tests/baselines/reference/modFunctionCrash.js index 0d4f62eae63..f216788c0eb 100644 --- a/tests/baselines/reference/modFunctionCrash.js +++ b/tests/baselines/reference/modFunctionCrash.js @@ -7,4 +7,6 @@ declare module Q { Q.f(function() {this;}); //// [modFunctionCrash.js] -Q.f(function () { this; }); +Q.f(function () { + this; +}); diff --git a/tests/baselines/reference/moduleCodeGenTest5.js b/tests/baselines/reference/moduleCodeGenTest5.js index a7580e97ef7..6f5f0a4e912 100644 --- a/tests/baselines/reference/moduleCodeGenTest5.js +++ b/tests/baselines/reference/moduleCodeGenTest5.js @@ -24,14 +24,17 @@ var v = E2.B; //// [moduleCodeGenTest5.js] exports.x = 0; var y = 0; -function f1() { } +function f1() { +} exports.f1 = f1; -function f2() { } +function f2() { +} var C1 = (function () { function C1() { this.p1 = 0; } - C1.prototype.p2 = function () { }; + C1.prototype.p2 = function () { + }; return C1; })(); exports.C1 = C1; @@ -39,7 +42,8 @@ var C2 = (function () { function C2() { this.p1 = 0; } - C2.prototype.p2 = function () { }; + C2.prototype.p2 = function () { + }; return C2; })(); (function (E1) { diff --git a/tests/baselines/reference/moduleInTypePosition1.js b/tests/baselines/reference/moduleInTypePosition1.js index 972bbae63d1..92fcd5b16e2 100644 --- a/tests/baselines/reference/moduleInTypePosition1.js +++ b/tests/baselines/reference/moduleInTypePosition1.js @@ -19,4 +19,5 @@ var Promise = (function () { })(); exports.Promise = Promise; //// [moduleInTypePosition1_1.js] -var x = function (w1) { }; +var x = function (w1) { +}; diff --git a/tests/baselines/reference/moduleKeywordRepeatError.js b/tests/baselines/reference/moduleKeywordRepeatError.js index 385bce001a2..8ec656f22ae 100644 --- a/tests/baselines/reference/moduleKeywordRepeatError.js +++ b/tests/baselines/reference/moduleKeywordRepeatError.js @@ -6,4 +6,5 @@ module.module { } //// [moduleKeywordRepeatError.js] // "module.module { }" should raise a syntax error module.module; -{ } +{ +} diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js index 1467ec18b91..63ccf613a77 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js @@ -102,7 +102,8 @@ var TypeScript; (function (TypeScript) { var Syntax; (function (Syntax) { - function childIndex() { } + function childIndex() { + } Syntax.childIndex = childIndex; var VariableWidthTokenWithTrailingTrivia = (function () { function VariableWidthTokenWithTrailingTrivia() { diff --git a/tests/baselines/reference/moduleNewExportBug.js b/tests/baselines/reference/moduleNewExportBug.js index ce40915b2f6..51e1bb24144 100644 --- a/tests/baselines/reference/moduleNewExportBug.js +++ b/tests/baselines/reference/moduleNewExportBug.js @@ -19,7 +19,8 @@ var mod1; var C = (function () { function C() { } - C.prototype.moo = function () { }; + C.prototype.moo = function () { + }; return C; })(); })(mod1 || (mod1 = {})); diff --git a/tests/baselines/reference/moduleReopenedTypeOtherBlock.js b/tests/baselines/reference/moduleReopenedTypeOtherBlock.js index 951c558ddfd..d2dc938872a 100644 --- a/tests/baselines/reference/moduleReopenedTypeOtherBlock.js +++ b/tests/baselines/reference/moduleReopenedTypeOtherBlock.js @@ -23,7 +23,9 @@ var M; var C2 = (function () { function C2() { } - C2.prototype.f = function () { return null; }; + C2.prototype.f = function () { + return null; + }; return C2; })(); M.C2 = C2; diff --git a/tests/baselines/reference/moduleReopenedTypeSameBlock.js b/tests/baselines/reference/moduleReopenedTypeSameBlock.js index 92e7e9e5228..c3546f20b2f 100644 --- a/tests/baselines/reference/moduleReopenedTypeSameBlock.js +++ b/tests/baselines/reference/moduleReopenedTypeSameBlock.js @@ -21,7 +21,9 @@ var M; var C2 = (function () { function C2() { } - C2.prototype.f = function () { return null; }; + C2.prototype.f = function () { + return null; + }; return C2; })(); M.C2 = C2; diff --git a/tests/baselines/reference/moduleScoping.js b/tests/baselines/reference/moduleScoping.js index cbe435e570c..1bcf1dbea0a 100644 --- a/tests/baselines/reference/moduleScoping.js +++ b/tests/baselines/reference/moduleScoping.js @@ -26,15 +26,24 @@ var x = v2; // Should be global v2 of type number again var v1 = "sausages"; // Global scope //// [file2.js] var v2 = 42; // Global scope -var v4 = function () { return 5; }; +var v4 = function () { + return 5; +}; //// [file3.js] exports.v3 = true; -var v2 = [1, 2, 3]; // Module scope. Should not appear in global scope +var v2 = [ + 1, + 2, + 3 +]; // Module scope. Should not appear in global scope //// [file4.js] var file3 = require('./file3'); var t1 = v1; var t2 = v2; var t3 = file3.v3; -var v4 = { a: true, b: NaN }; // Should shadow global v2 in this module +var v4 = { + a: true, + b: NaN +}; // Should shadow global v2 in this module //// [file5.js] var x = v2; // Should be global v2 of type number again diff --git a/tests/baselines/reference/moduleSymbolMerging.js b/tests/baselines/reference/moduleSymbolMerging.js index d43fff1378a..0a812a62e09 100644 --- a/tests/baselines/reference/moduleSymbolMerging.js +++ b/tests/baselines/reference/moduleSymbolMerging.js @@ -22,7 +22,9 @@ var A; })(A || (A = {})); var B; (function (B) { - function f() { return null; } + function f() { + return null; + } B.f = f; })(B || (B = {})); diff --git a/tests/baselines/reference/moduleUnassignedVariable.js b/tests/baselines/reference/moduleUnassignedVariable.js index 1765342efcd..179a2577adf 100644 --- a/tests/baselines/reference/moduleUnassignedVariable.js +++ b/tests/baselines/reference/moduleUnassignedVariable.js @@ -12,7 +12,11 @@ module Bar { var Bar; (function (Bar) { Bar.a = 1; - function fooA() { return Bar.a; } // Correct: return Bar.a + function fooA() { + return Bar.a; + } // Correct: return Bar.a Bar.b; - function fooB() { return Bar.b; } // Incorrect: return b + function fooB() { + return Bar.b; + } // Incorrect: return b })(Bar || (Bar = {})); diff --git a/tests/baselines/reference/moduleVisibilityTest1.js b/tests/baselines/reference/moduleVisibilityTest1.js index a2957cb9582..d8bdedfafe2 100644 --- a/tests/baselines/reference/moduleVisibilityTest1.js +++ b/tests/baselines/reference/moduleVisibilityTest1.js @@ -70,11 +70,15 @@ c.someMethodThatCallsAnOuterMethod(); //// [moduleVisibilityTest1.js] var OuterMod; (function (OuterMod) { - function someExportedOuterFunc() { return -1; } + function someExportedOuterFunc() { + return -1; + } OuterMod.someExportedOuterFunc = someExportedOuterFunc; var OuterInnerMod; (function (OuterInnerMod) { - function someExportedOuterInnerFunc() { return "foo"; } + function someExportedOuterInnerFunc() { + return "foo"; + } OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc; })(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {})); })(OuterMod || (OuterMod = {})); @@ -83,7 +87,9 @@ var M; (function (M) { var InnerMod; (function (InnerMod) { - function someExportedInnerFunc() { return -2; } + function someExportedInnerFunc() { + return -2; + } InnerMod.someExportedInnerFunc = someExportedInnerFunc; })(InnerMod = M.InnerMod || (M.InnerMod = {})); (function (E) { @@ -103,18 +109,30 @@ var M; var C = (function () { function C() { this.someProp = 1; - function someInnerFunc() { return 2; } + function someInnerFunc() { + return 2; + } var someInnerVar = 3; } - C.prototype.someMethodThatCallsAnOuterMethod = function () { return OuterInnerAlias.someExportedOuterInnerFunc(); }; - C.prototype.someMethodThatCallsAnInnerMethod = function () { return InnerMod.someExportedInnerFunc(); }; - C.prototype.someMethodThatCallsAnOuterInnerMethod = function () { return OuterMod.someExportedOuterFunc(); }; - C.prototype.someMethod = function () { return 0; }; + C.prototype.someMethodThatCallsAnOuterMethod = function () { + return OuterInnerAlias.someExportedOuterInnerFunc(); + }; + C.prototype.someMethodThatCallsAnInnerMethod = function () { + return InnerMod.someExportedInnerFunc(); + }; + C.prototype.someMethodThatCallsAnOuterInnerMethod = function () { + return OuterMod.someExportedOuterFunc(); + }; + C.prototype.someMethod = function () { + return 0; + }; return C; })(); M.C = C; var someModuleVar = 4; - function someModuleFunction() { return 5; } + function someModuleFunction() { + return 5; + } })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/moduleVisibilityTest2.js b/tests/baselines/reference/moduleVisibilityTest2.js index 9102bd17ae2..63ecaf0c135 100644 --- a/tests/baselines/reference/moduleVisibilityTest2.js +++ b/tests/baselines/reference/moduleVisibilityTest2.js @@ -71,11 +71,15 @@ c.someMethodThatCallsAnOuterMethod(); //// [moduleVisibilityTest2.js] var OuterMod; (function (OuterMod) { - function someExportedOuterFunc() { return -1; } + function someExportedOuterFunc() { + return -1; + } OuterMod.someExportedOuterFunc = someExportedOuterFunc; var OuterInnerMod; (function (OuterInnerMod) { - function someExportedOuterInnerFunc() { return "foo"; } + function someExportedOuterInnerFunc() { + return "foo"; + } OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc; })(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {})); })(OuterMod || (OuterMod = {})); @@ -84,7 +88,9 @@ var M; (function (M) { var InnerMod; (function (InnerMod) { - function someExportedInnerFunc() { return -2; } + function someExportedInnerFunc() { + return -2; + } InnerMod.someExportedInnerFunc = someExportedInnerFunc; })(InnerMod || (InnerMod = {})); var E; @@ -104,18 +110,30 @@ var M; var C = (function () { function C() { this.someProp = 1; - function someInnerFunc() { return 2; } + function someInnerFunc() { + return 2; + } var someInnerVar = 3; } - C.prototype.someMethodThatCallsAnOuterMethod = function () { return OuterInnerAlias.someExportedOuterInnerFunc(); }; - C.prototype.someMethodThatCallsAnInnerMethod = function () { return InnerMod.someExportedInnerFunc(); }; - C.prototype.someMethodThatCallsAnOuterInnerMethod = function () { return OuterMod.someExportedOuterFunc(); }; - C.prototype.someMethod = function () { return 0; }; + C.prototype.someMethodThatCallsAnOuterMethod = function () { + return OuterInnerAlias.someExportedOuterInnerFunc(); + }; + C.prototype.someMethodThatCallsAnInnerMethod = function () { + return InnerMod.someExportedInnerFunc(); + }; + C.prototype.someMethodThatCallsAnOuterInnerMethod = function () { + return OuterMod.someExportedOuterFunc(); + }; + C.prototype.someMethod = function () { + return 0; + }; return C; })(); M.C = C; var someModuleVar = 4; - function someModuleFunction() { return 5; } + function someModuleFunction() { + return 5; + } })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 8496588c5bb..5161f72d5f0 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -112,7 +112,11 @@ var A; var fn = function (s) { return 'hello ' + s; }; - var ol = { s: 'hello', id: 2, isvalid: true }; + var ol = { + s: 'hello', + id: 2, + isvalid: true + }; })(A || (A = {})); var Y; (function (Y) { @@ -166,5 +170,9 @@ var Y; Y.fn = function (s) { return 'hello ' + s; }; - Y.ol = { s: 'hello', id: 2, isvalid: true }; + Y.ol = { + s: 'hello', + id: 2, + isvalid: true + }; })(Y || (Y = {})); diff --git a/tests/baselines/reference/multiCallOverloads.js b/tests/baselines/reference/multiCallOverloads.js index d4e765c5514..85b008d52b7 100644 --- a/tests/baselines/reference/multiCallOverloads.js +++ b/tests/baselines/reference/multiCallOverloads.js @@ -14,10 +14,15 @@ load(function(z?) {}) // this shouldn't be an error //// [multiCallOverloads.js] -function load(f) { } -var f1 = function (z) { }; -var f2 = function (z) { }; +function load(f) { +} +var f1 = function (z) { +}; +var f2 = function (z) { +}; load(f1); // ok load(f2); // ok -load(function () { }); // this shouldn’t be an error -load(function (z) { }); // this shouldn't be an error +load(function () { +}); // this shouldn’t be an error +load(function (z) { +}); // this shouldn't be an error diff --git a/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.errors.txt b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.errors.txt new file mode 100644 index 00000000000..c85e7584139 --- /dev/null +++ b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts(1,1): error TS1108: A 'return' statement can only be used within a function body. +tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts(2,18): error TS2304: Cannot find name 'Role'. +tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts(4,26): error TS2304: Cannot find name 'ng'. + + +==== tests/cases/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.ts (3 errors) ==== + return this.edit(role) + ~~~~~~ +!!! error TS1108: A 'return' statement can only be used within a function body. + .then((role: Role) => + ~~~~ +!!! error TS2304: Cannot find name 'Role'. + this.roleService.add(role) + .then((data: ng.IHttpPromiseCallbackArg) => data.data)); + ~~ +!!! error TS2304: Cannot find name 'ng'. + \ No newline at end of file diff --git a/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js new file mode 100644 index 00000000000..4d0317a50a5 --- /dev/null +++ b/tests/baselines/reference/multiLinePropertyAccessAndArrowFunctionIndent1.js @@ -0,0 +1,14 @@ +//// [multiLinePropertyAccessAndArrowFunctionIndent1.ts] +return this.edit(role) + .then((role: Role) => + this.roleService.add(role) + .then((data: ng.IHttpPromiseCallbackArg) => data.data)); + + +//// [multiLinePropertyAccessAndArrowFunctionIndent1.js] +var _this = this; +return this.edit(role).then(function (role) { + return _this.roleService.add(role).then(function (data) { + return data.data; + }); +}); diff --git a/tests/baselines/reference/multiModuleClodule1.js b/tests/baselines/reference/multiModuleClodule1.js index 9f6d7b5014c..a64abd81680 100644 --- a/tests/baselines/reference/multiModuleClodule1.js +++ b/tests/baselines/reference/multiModuleClodule1.js @@ -22,9 +22,12 @@ c.foo = C.foo; var C = (function () { function C(x) { } - C.prototype.foo = function () { }; - C.prototype.bar = function () { }; - C.boo = function () { }; + C.prototype.foo = function () { + }; + C.prototype.bar = function () { + }; + C.boo = function () { + }; return C; })(); var C; @@ -34,9 +37,12 @@ var C; })(C || (C = {})); var C; (function (C) { - function foo() { } + function foo() { + } C.foo = foo; - function baz() { return ''; } + function baz() { + return ''; + } })(C || (C = {})); var c = new C(C.x); c.foo = C.foo; diff --git a/tests/baselines/reference/multiModuleFundule1.js b/tests/baselines/reference/multiModuleFundule1.js index 6aa9cb959ba..f643ed5ee4d 100644 --- a/tests/baselines/reference/multiModuleFundule1.js +++ b/tests/baselines/reference/multiModuleFundule1.js @@ -13,14 +13,16 @@ var r2 = new C(2); // using void returning function as constructor var r3 = C.foo(); //// [multiModuleFundule1.js] -function C(x) { } +function C(x) { +} var C; (function (C) { C.x = 1; })(C || (C = {})); var C; (function (C) { - function foo() { } + function foo() { + } C.foo = foo; })(C || (C = {})); var r = C(2); diff --git a/tests/baselines/reference/multipleInheritance.js b/tests/baselines/reference/multipleInheritance.js index 269d5c2ea19..9cab77f3dba 100644 --- a/tests/baselines/reference/multipleInheritance.js +++ b/tests/baselines/reference/multipleInheritance.js @@ -97,9 +97,13 @@ var ND = (function (_super) { })(N); var Good = (function () { function Good() { - this.f = function () { return 0; }; + this.f = function () { + return 0; + }; } - Good.prototype.g = function () { return 0; }; + Good.prototype.g = function () { + return 0; + }; return Good; })(); var Baad = (function (_super) { @@ -107,7 +111,11 @@ var Baad = (function (_super) { function Baad() { _super.apply(this, arguments); } - Baad.prototype.f = function () { return 0; }; - Baad.prototype.g = function (n) { return 0; }; + Baad.prototype.f = function () { + return 0; + }; + Baad.prototype.g = function (n) { + return 0; + }; return Baad; })(Good); diff --git a/tests/baselines/reference/multipleNumericIndexers.js b/tests/baselines/reference/multipleNumericIndexers.js index 638cf01569a..31bd84e5356 100644 --- a/tests/baselines/reference/multipleNumericIndexers.js +++ b/tests/baselines/reference/multipleNumericIndexers.js @@ -40,7 +40,10 @@ var C = (function () { return C; })(); var a; -var b = { 1: '', "2": '' }; +var b = { + 1: '', + "2": '' +}; var C2 = (function () { function C2() { } diff --git a/tests/baselines/reference/multipleStringIndexers.js b/tests/baselines/reference/multipleStringIndexers.js index 55dd816e42b..b914b205654 100644 --- a/tests/baselines/reference/multipleStringIndexers.js +++ b/tests/baselines/reference/multipleStringIndexers.js @@ -39,7 +39,9 @@ var C = (function () { return C; })(); var a; -var b = { y: '' }; +var b = { + y: '' +}; var C2 = (function () { function C2() { } diff --git a/tests/baselines/reference/mutrec.js b/tests/baselines/reference/mutrec.js index 1d1ccb4e90b..ba6c8ade036 100644 --- a/tests/baselines/reference/mutrec.js +++ b/tests/baselines/reference/mutrec.js @@ -43,11 +43,15 @@ g(i4); //// [mutrec.js] -function f(p) { return p; } +function f(p) { + return p; +} ; var b; f(b); -function g(p) { return p; } +function g(p) { + return p; +} ; var i2; g(i2); diff --git a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js index 76fd13aa320..585a3d2178b 100644 --- a/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js +++ b/tests/baselines/reference/mutuallyRecursiveGenericBaseTypes2.js @@ -20,7 +20,9 @@ var __extends = this.__extends || function (d, b) { var foo = (function () { function foo() { } - foo.prototype.bar = function () { return null; }; + foo.prototype.bar = function () { + return null; + }; return foo; })(); var foo2 = (function (_super) { diff --git a/tests/baselines/reference/nameCollisions.js b/tests/baselines/reference/nameCollisions.js index 2cfaba94993..51b66adcefe 100644 --- a/tests/baselines/reference/nameCollisions.js +++ b/tests/baselines/reference/nameCollisions.js @@ -76,8 +76,10 @@ var T; })(); // error var w; var f; - function f() { } //error - function f2() { } + function f() { + } //error + function f2() { + } var f2; // error var i; var C = (function () { @@ -85,14 +87,17 @@ var T; } return C; })(); - function C() { } // error - function C2() { } + function C() { + } // error + function C2() { + } var C2 = (function () { function C2() { } return C2; })(); // error - function fi() { } + function fi() { + } var cli = (function () { function cli() { } diff --git a/tests/baselines/reference/nameCollisionsInPropertyAssignments.js b/tests/baselines/reference/nameCollisionsInPropertyAssignments.js index 1f3631e03ba..4c2634d881d 100644 --- a/tests/baselines/reference/nameCollisionsInPropertyAssignments.js +++ b/tests/baselines/reference/nameCollisionsInPropertyAssignments.js @@ -4,4 +4,8 @@ var y = { x() { x++; } }; //// [nameCollisionsInPropertyAssignments.js] var x = 1; -var y = { x: function () { x++; } }; +var y = { + x: function () { + x++; + } +}; diff --git a/tests/baselines/reference/negateOperatorWithAnyOtherType.js b/tests/baselines/reference/negateOperatorWithAnyOtherType.js index 8418bbbe467..453b032e004 100644 --- a/tests/baselines/reference/negateOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/negateOperatorWithAnyOtherType.js @@ -57,9 +57,16 @@ var ResultIsNumber15 = -(ANY - ANY1); // - operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "", y: function () { } }; +var obj1 = { + x: "", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/negateOperatorWithBooleanType.js b/tests/baselines/reference/negateOperatorWithBooleanType.js index 9442f54490f..f50382de652 100644 --- a/tests/baselines/reference/negateOperatorWithBooleanType.js +++ b/tests/baselines/reference/negateOperatorWithBooleanType.js @@ -38,11 +38,15 @@ var ResultIsNumber7 = -A.foo(); //// [negateOperatorWithBooleanType.js] // - operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -54,7 +58,10 @@ var objA = new A(); var ResultIsNumber1 = -BOOLEAN; // boolean type literal var ResultIsNumber2 = -true; -var ResultIsNumber3 = -{ x: true, y: false }; +var ResultIsNumber3 = -{ + x: true, + y: false +}; // boolean type expressions var ResultIsNumber4 = -objA.a; var ResultIsNumber5 = -M.n; diff --git a/tests/baselines/reference/negateOperatorWithNumberType.js b/tests/baselines/reference/negateOperatorWithNumberType.js index 5fa83e088c8..90cb9c073b3 100644 --- a/tests/baselines/reference/negateOperatorWithNumberType.js +++ b/tests/baselines/reference/negateOperatorWithNumberType.js @@ -44,12 +44,19 @@ var ResultIsNumber11 = -(NUMBER - NUMBER); //// [negateOperatorWithNumberType.js] // - operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -62,8 +69,16 @@ var ResultIsNumber1 = -NUMBER; var ResultIsNumber2 = -NUMBER1; // number type literal var ResultIsNumber3 = -1; -var ResultIsNumber4 = -{ x: 1, y: 2 }; -var ResultIsNumber5 = -{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = -{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = -{ + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsNumber6 = -objA.a; var ResultIsNumber7 = -M.n; diff --git a/tests/baselines/reference/negateOperatorWithStringType.js b/tests/baselines/reference/negateOperatorWithStringType.js index bdbc4a3d664..153a5921094 100644 --- a/tests/baselines/reference/negateOperatorWithStringType.js +++ b/tests/baselines/reference/negateOperatorWithStringType.js @@ -43,12 +43,19 @@ var ResultIsNumber12 = -STRING.charAt(0); //// [negateOperatorWithStringType.js] // - operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -61,8 +68,16 @@ var ResultIsNumber1 = -STRING; var ResultIsNumber2 = -STRING1; // string type literal var ResultIsNumber3 = -""; -var ResultIsNumber4 = -{ x: "", y: "" }; -var ResultIsNumber5 = -{ x: "", y: function (s) { return s; } }; +var ResultIsNumber4 = -{ + x: "", + y: "" +}; +var ResultIsNumber5 = -{ + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsNumber6 = -objA.a; var ResultIsNumber7 = -M.n; diff --git a/tests/baselines/reference/nestedClassDeclaration.js b/tests/baselines/reference/nestedClassDeclaration.js index 70445b3372f..c7f0ffe34fc 100644 --- a/tests/baselines/reference/nestedClassDeclaration.js +++ b/tests/baselines/reference/nestedClassDeclaration.js @@ -30,11 +30,13 @@ var C2 = (function () { } return C2; })(); -function foo() { } +function foo() { +} var C3 = (function () { function C3() { } return C3; })(); var x = { - class: C4 }, _a = void 0; + class: C4 +}, _a = void 0; diff --git a/tests/baselines/reference/nestedModules.js b/tests/baselines/reference/nestedModules.js index f146990ec82..fe3af5ae69c 100644 --- a/tests/baselines/reference/nestedModules.js +++ b/tests/baselines/reference/nestedModules.js @@ -37,7 +37,10 @@ var A; (function (A) { var B; (function (B) { - var Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' + var Point = { + x: 0, + y: 0 + }; // bug 832088: could not find module 'C' })(B = A.B || (A.B = {})); })(A || (A = {})); var M2; diff --git a/tests/baselines/reference/nestedRecursiveLambda.js b/tests/baselines/reference/nestedRecursiveLambda.js index 0273b5691e6..eff3da0e216 100644 --- a/tests/baselines/reference/nestedRecursiveLambda.js +++ b/tests/baselines/reference/nestedRecursiveLambda.js @@ -8,8 +8,26 @@ void(r =>(r => r)); //// [nestedRecursiveLambda.js] function f(a) { - void (function (r) { return (function (r) { return r; }); }); + void (function (r) { + return (function (r) { + return r; + }); + }); } -f((function (r) { return (function (r) { return r; }); })); -void (function (r) { return (function (r) { return r; }); }); -[(function (r) { return (function (r) { return r; }); })]; +f((function (r) { + return (function (r) { + return r; + }); +})); +void (function (r) { + return (function (r) { + return r; + }); +}); +[ + (function (r) { + return (function (r) { + return r; + }); + }) +]; diff --git a/tests/baselines/reference/nestedSelf.js b/tests/baselines/reference/nestedSelf.js index 9c0feaa887f..b61a0956676 100644 --- a/tests/baselines/reference/nestedSelf.js +++ b/tests/baselines/reference/nestedSelf.js @@ -17,7 +17,13 @@ var M; } C.prototype.foo = function () { var _this = this; - [1, 2, 3].map(function (x) { return _this.n * x; }); + [ + 1, + 2, + 3 + ].map(function (x) { + return _this.n * x; + }); }; return C; })(); diff --git a/tests/baselines/reference/newExpressionWithCast.js b/tests/baselines/reference/newExpressionWithCast.js index 8743d9b83bc..6ce025a4267 100644 --- a/tests/baselines/reference/newExpressionWithCast.js +++ b/tests/baselines/reference/newExpressionWithCast.js @@ -15,12 +15,15 @@ var test3 = new (Test3)(); //// [newExpressionWithCast.js] -function Test() { } +function Test() { +} // valid but error with noImplicitAny var test = new Test(); -function Test2() { } +function Test2() { +} // parse error var test2 = new < any > Test2(); -function Test3() { } +function Test3() { +} // valid with noImplicitAny var test3 = new Test3(); diff --git a/tests/baselines/reference/newFunctionImplicitAny.js b/tests/baselines/reference/newFunctionImplicitAny.js index 459c7d581d8..9f8d303680b 100644 --- a/tests/baselines/reference/newFunctionImplicitAny.js +++ b/tests/baselines/reference/newFunctionImplicitAny.js @@ -6,5 +6,6 @@ var test = new Test(); //// [newFunctionImplicitAny.js] // No implicit any error given when newing a function (up for debate) -function Test() { } +function Test() { +} var test = new Test(); diff --git a/tests/baselines/reference/newOperatorConformance.js b/tests/baselines/reference/newOperatorConformance.js index a04b10dc8fe..4e5c209bbff 100644 --- a/tests/baselines/reference/newOperatorConformance.js +++ b/tests/baselines/reference/newOperatorConformance.js @@ -104,7 +104,8 @@ function newFn2(s) { var p; } // Construct expression of void returning function -function fnVoid() { } +function fnVoid() { +} var t = new fnVoid(); var t; // Chained new expressions diff --git a/tests/baselines/reference/newOperatorErrorCases.js b/tests/baselines/reference/newOperatorErrorCases.js index b893beba02a..8a44d51fb5c 100644 --- a/tests/baselines/reference/newOperatorErrorCases.js +++ b/tests/baselines/reference/newOperatorErrorCases.js @@ -65,5 +65,7 @@ var c1 = new T; var c1; var c2 = new T(); // Parse error // Construct expression of non-void returning function -function fnNumber() { return 32; } +function fnNumber() { + return 32; +} var s = new fnNumber(); // Error diff --git a/tests/baselines/reference/noCollisionThisExpressionAndClassInGlobal.js b/tests/baselines/reference/noCollisionThisExpressionAndClassInGlobal.js index 8a485a2ebe2..4ddb34b094c 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndClassInGlobal.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndClassInGlobal.js @@ -9,4 +9,6 @@ var _this = (function () { } return _this; })(); -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js index 727b1b6087a..4e746582364 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.js @@ -50,19 +50,23 @@ var class1 = (function () { Object.defineProperty(class1.prototype, "a", { get: function () { var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; return 10; }, set: function (val) { var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; }, enumerable: true, @@ -77,18 +81,22 @@ var class2 = (function () { get: function () { var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; return 10; }, set: function (val) { var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; }, enumerable: true, diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js index a01996848b1..ce86ca47301 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInConstructor.js @@ -25,10 +25,12 @@ class class2 { var class1 = (function () { function class1() { var x2 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; } return class1; @@ -37,9 +39,11 @@ var class2 = (function () { function class2() { var _this = 2; var x2 = { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; } return class2; diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js index bdb55633682..d144a78fae3 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInFunction.js @@ -11,5 +11,7 @@ function x() { var console; function x() { var _this = 5; - (function (x) { console.log(_this); }); + (function (x) { + console.log(_this); + }); } diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js index 83f21d10425..487751bd493 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInLambda.js @@ -10,9 +10,13 @@ alert(x.doStuff(x => alert(x))); //// [noCollisionThisExpressionAndLocalVarInLambda.js] var x = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; -alert(x.doStuff(function (x) { return alert(x); })); +alert(x.doStuff(function (x) { + return alert(x); +})); diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js index b7e9cc7561f..f91039b6c61 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInMethod.js @@ -26,18 +26,22 @@ var a = (function () { } a.prototype.method1 = function () { return { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; }; a.prototype.method2 = function () { var _this = 2; return { - doStuff: function (callback) { return function () { - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + return callback(_this); + }; + } }; }; return a; diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js index da989bed263..374a812ba4b 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInProperty.js @@ -23,10 +23,12 @@ class class2 { var class1 = (function () { function class1() { this.prop1 = { - doStuff: function (callback) { return function () { - var _this = 2; - return callback(_this); - }; } + doStuff: function (callback) { + return function () { + var _this = 2; + return callback(_this); + }; + } }; } return class1; @@ -34,9 +36,11 @@ var class1 = (function () { var class2 = (function () { function class2() { this.prop1 = { - doStuff: function (callback) { return function () { - return callback(10); - }; } + doStuff: function (callback) { + return function () { + return callback(10); + }; + } }; var _this = 2; } diff --git a/tests/baselines/reference/noCollisionThisExpressionAndVarInGlobal.js b/tests/baselines/reference/noCollisionThisExpressionAndVarInGlobal.js index bea476ed09f..c0377976e9b 100644 --- a/tests/baselines/reference/noCollisionThisExpressionAndVarInGlobal.js +++ b/tests/baselines/reference/noCollisionThisExpressionAndVarInGlobal.js @@ -4,4 +4,6 @@ var f = () => _this; //// [noCollisionThisExpressionAndVarInGlobal.js] var _this = 1; -var f = function () { return _this; }; +var f = function () { + return _this; +}; diff --git a/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js b/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js index b3677681822..c34ad4c97bd 100644 --- a/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js +++ b/tests/baselines/reference/noCollisionThisExpressionInFunctionAndVarInGlobal.js @@ -12,5 +12,7 @@ var console; var _this = 5; function x() { var _this = this; - (function (x) { console.log(_this); }); + (function (x) { + console.log(_this); + }); } diff --git a/tests/baselines/reference/noConstraintInReturnType1.js b/tests/baselines/reference/noConstraintInReturnType1.js index 0402f9d83cb..747cbfdf758 100644 --- a/tests/baselines/reference/noConstraintInReturnType1.js +++ b/tests/baselines/reference/noConstraintInReturnType1.js @@ -8,7 +8,9 @@ class List { var List = (function () { function List() { } - List.empty = function () { return null; }; + List.empty = function () { + return null; + }; return List; })(); diff --git a/tests/baselines/reference/noImplicitAnyForIn.js b/tests/baselines/reference/noImplicitAnyForIn.js index c8743936a9a..067a553e2dd 100644 --- a/tests/baselines/reference/noImplicitAnyForIn.js +++ b/tests/baselines/reference/noImplicitAnyForIn.js @@ -32,7 +32,16 @@ var n = [[]] || []; for (n[idx++] in m); //// [noImplicitAnyForIn.js] -var x = [[1, 2, 3], ["hello"]]; +var x = [ + [ + 1, + 2, + 3 + ], + [ + "hello" + ] +]; for (var i in x) { for (var j in x[i]) { //Should yield an implicit 'any' error @@ -50,8 +59,16 @@ for (var a in x) { var c = a || b; } var idx = 0; -var m = [1, 2, 3, 4, 5]; +var m = [ + 1, + 2, + 3, + 4, + 5 +]; // Should yield an implicit 'any' error. -var n = [[]] || []; +var n = [ + [] +] || []; for (n[idx++] in m) ; diff --git a/tests/baselines/reference/noImplicitAnyForMethodParameters.js b/tests/baselines/reference/noImplicitAnyForMethodParameters.js index fc5b94d4768..379cf85b5e2 100644 --- a/tests/baselines/reference/noImplicitAnyForMethodParameters.js +++ b/tests/baselines/reference/noImplicitAnyForMethodParameters.js @@ -18,12 +18,14 @@ class D { var C = (function () { function C() { } - C.prototype.foo = function (a) { }; // OK - non-ambient class and private method - error + C.prototype.foo = function (a) { + }; // OK - non-ambient class and private method - error return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (a) { }; // OK - non-ambient class and public method - error + D.prototype.foo = function (a) { + }; // OK - non-ambient class and public method - error return D; })(); diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.js b/tests/baselines/reference/noImplicitAnyInCastExpression.js index 1b7cc59c7c0..4e23b91527b 100644 --- a/tests/baselines/reference/noImplicitAnyInCastExpression.js +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.js @@ -19,8 +19,15 @@ interface IFoo { //// [noImplicitAnyInCastExpression.js] // verify no noImplictAny errors reported with cast expression // Expr type not assignable to target type -{ a: null }; +{ + a: null +}; // Expr type assignable to target type -{ a: 2, b: undefined }; +{ + a: 2, + b: undefined +}; // Neither types is assignable to each other -{ c: null }; +{ + c: null +}; diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.js b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.js index 7722165fd23..f14810c8013 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.js +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.js @@ -5,5 +5,10 @@ regexMatchList.forEach(match => ''.replace(match, '')); //// [noImplicitAnyInContextuallyTypesFunctionParamter.js] -var regexMatchList = ['', '']; -regexMatchList.forEach(function (match) { return ''.replace(match, ''); }); +var regexMatchList = [ + '', + '' +]; +regexMatchList.forEach(function (match) { + return ''.replace(match, ''); +}); diff --git a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js index 8efe32d3140..6be61702143 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js +++ b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js @@ -46,15 +46,20 @@ var f14 = (x, ...r) => ""; //// [noImplicitAnyParametersInBareFunctions.js] // No implicit-'any' errors. -function f1() { } +function f1() { +} // Implicit-'any' error for x. -function f2(x) { } +function f2(x) { +} // No implicit-'any' errors. -function f3(x) { } +function f3(x) { +} // Implicit-'any' errors for x, y, and z. -function f4(x, y, z) { } +function f4(x, y, z) { +} // Implicit-'any' errors for x, and z. -function f5(x, y, z) { } +function f5(x, y, z) { +} // Implicit-'any[]' error for r. function f6() { var r = []; @@ -69,15 +74,24 @@ function f7(x) { r[_i - 1] = arguments[_i]; } } -function f8(x3, y3) { } +function f8(x3, y3) { +} // No implicit-'any' errors. -var f9 = function () { return ""; }; +var f9 = function () { + return ""; +}; // Implicit-'any' errors for x. -var f10 = function (x) { return ""; }; +var f10 = function (x) { + return ""; +}; // Implicit-'any' errors for x, y, and z. -var f11 = function (x, y, z) { return ""; }; +var f11 = function (x, y, z) { + return ""; +}; // Implicit-'any' errors for x and z. -var f12 = function (x, y, z) { return ""; }; +var f12 = function (x, y, z) { + return ""; +}; // Implicit-'any[]' error for r. var f13 = function () { var r = []; diff --git a/tests/baselines/reference/noImplicitAnyParametersInClass.js b/tests/baselines/reference/noImplicitAnyParametersInClass.js index 0873935b600..1460d07b729 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInClass.js +++ b/tests/baselines/reference/noImplicitAnyParametersInClass.js @@ -96,13 +96,21 @@ class C { var C = (function () { function C() { // No implicit-'any' errors. - this.pub_f9 = function () { return ""; }; + this.pub_f9 = function () { + return ""; + }; // Implicit-'any' errors for x. - this.pub_f10 = function (x) { return ""; }; + this.pub_f10 = function (x) { + return ""; + }; // Implicit-'any' errors for x, y, and z. - this.pub_f11 = function (x, y, z) { return ""; }; + this.pub_f11 = function (x, y, z) { + return ""; + }; // Implicit-'any' errors for x and z. - this.pub_f12 = function (x, y, z) { return ""; }; + this.pub_f12 = function (x, y, z) { + return ""; + }; // Implicit-'any[]' error for r. this.pub_f13 = function () { var r = []; @@ -120,13 +128,21 @@ var C = (function () { return ""; }; // No implicit-'any' errors. - this.priv_f9 = function () { return ""; }; + this.priv_f9 = function () { + return ""; + }; // Implicit-'any' errors for x. - this.priv_f10 = function (x) { return ""; }; + this.priv_f10 = function (x) { + return ""; + }; // Implicit-'any' errors for x, y, and z. - this.priv_f11 = function (x, y, z) { return ""; }; + this.priv_f11 = function (x, y, z) { + return ""; + }; // Implicit-'any' errors for x and z. - this.priv_f12 = function (x, y, z) { return ""; }; + this.priv_f12 = function (x, y, z) { + return ""; + }; // Implicit-'any[]' error for r. this.priv_f13 = function () { var r = []; @@ -145,15 +161,20 @@ var C = (function () { }; } // No implicit-'any' errors. - C.prototype.pub_f1 = function () { }; + C.prototype.pub_f1 = function () { + }; // Implicit-'any' errors for x. - C.prototype.pub_f2 = function (x) { }; + C.prototype.pub_f2 = function (x) { + }; // No implicit-'any' errors. - C.prototype.pub_f3 = function (x) { }; + C.prototype.pub_f3 = function (x) { + }; // Implicit-'any' errors for x, y, and z. - C.prototype.pub_f4 = function (x, y, z) { }; + C.prototype.pub_f4 = function (x, y, z) { + }; // Implicit-'any' errors for x, and z. - C.prototype.pub_f5 = function (x, y, z) { }; + C.prototype.pub_f5 = function (x, y, z) { + }; // Implicit-'any[]' errors for r. C.prototype.pub_f6 = function () { var r = []; @@ -168,18 +189,24 @@ var C = (function () { r[_i - 1] = arguments[_i]; } }; - C.prototype.pub_f8 = function (x3, y3) { }; + C.prototype.pub_f8 = function (x3, y3) { + }; /////////////////////////////////////////// // No implicit-'any' errors. - C.prototype.priv_f1 = function () { }; + C.prototype.priv_f1 = function () { + }; // Implicit-'any' errors for x. - C.prototype.priv_f2 = function (x) { }; + C.prototype.priv_f2 = function (x) { + }; // No implicit-'any' errors. - C.prototype.priv_f3 = function (x) { }; + C.prototype.priv_f3 = function (x) { + }; // Implicit-'any' errors for x, y, and z. - C.prototype.priv_f4 = function (x, y, z) { }; + C.prototype.priv_f4 = function (x, y, z) { + }; // Implicit-'any' errors for x, and z. - C.prototype.priv_f5 = function (x, y, z) { }; + C.prototype.priv_f5 = function (x, y, z) { + }; // Implicit-'any[]' errors for r. C.prototype.priv_f6 = function () { var r = []; @@ -194,6 +221,7 @@ var C = (function () { r[_i - 1] = arguments[_i]; } }; - C.prototype.priv_f8 = function (x3, y3) { }; + C.prototype.priv_f8 = function (x3, y3) { + }; return C; })(); diff --git a/tests/baselines/reference/noImplicitAnyParametersInModule.js b/tests/baselines/reference/noImplicitAnyParametersInModule.js index e7f30205559..d89c4229c7b 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInModule.js +++ b/tests/baselines/reference/noImplicitAnyParametersInModule.js @@ -50,15 +50,20 @@ module M { var M; (function (M) { // No implicit-'any' errors. - function m_f1() { } + function m_f1() { + } // Implicit-'any' error for x. - function m_f2(x) { } + function m_f2(x) { + } // No implicit-'any' errors. - function m_f3(x) { } + function m_f3(x) { + } // Implicit-'any' errors for x, y, and z. - function m_f4(x, y, z) { } + function m_f4(x, y, z) { + } // Implicit-'any' errors for x and z. - function m_f5(x, y, z) { } + function m_f5(x, y, z) { + } // Implicit-'any[]' error for r. function m_f6() { var r = []; @@ -73,15 +78,24 @@ var M; r[_i - 1] = arguments[_i]; } } - function m_f8(x3, y3) { } + function m_f8(x3, y3) { + } // No implicit-'any' errors. - var m_f9 = function () { return ""; }; + var m_f9 = function () { + return ""; + }; // Implicit-'any' error for x. - var m_f10 = function (x) { return ""; }; + var m_f10 = function (x) { + return ""; + }; // Implicit-'any' errors for x, y, and z. - var m_f11 = function (x, y, z) { return ""; }; + var m_f11 = function (x, y, z) { + return ""; + }; // Implicit-'any' errors for x and z. - var m_f12 = function (x, y, z) { return ""; }; + var m_f12 = function (x, y, z) { + return ""; + }; // Implicit-'any[]' errors for r. var m_f13 = function () { var r = []; diff --git a/tests/baselines/reference/noImplicitAnyWithOverloads.js b/tests/baselines/reference/noImplicitAnyWithOverloads.js index fd56b6e0d73..3bce6e18ba3 100644 --- a/tests/baselines/reference/noImplicitAnyWithOverloads.js +++ b/tests/baselines/reference/noImplicitAnyWithOverloads.js @@ -10,5 +10,8 @@ function callb(a) { } callb((a) => { a.foo; }); // error, chose first overload //// [noImplicitAnyWithOverloads.js] -function callb(a) { } -callb(function (a) { a.foo; }); // error, chose first overload +function callb(a) { +} +callb(function (a) { + a.foo; +}); // error, chose first overload diff --git a/tests/baselines/reference/noSelfOnVars.js b/tests/baselines/reference/noSelfOnVars.js index 913e3a23ba2..2e1f5080c26 100644 --- a/tests/baselines/reference/noSelfOnVars.js +++ b/tests/baselines/reference/noSelfOnVars.js @@ -9,6 +9,7 @@ function foo() { //// [noSelfOnVars.js] function foo() { - function bar() { } + function bar() { + } var x = bar; } diff --git a/tests/baselines/reference/nonInstantiatedModule.js b/tests/baselines/reference/nonInstantiatedModule.js index fc3ad19546f..ff7ea10358b 100644 --- a/tests/baselines/reference/nonInstantiatedModule.js +++ b/tests/baselines/reference/nonInstantiatedModule.js @@ -62,7 +62,10 @@ var M2; var Point; (function (Point) { function Origin() { - return { x: 0, y: 0 }; + return { + x: 0, + y: 0 + }; } Point.Origin = Origin; })(Point = M2.Point || (M2.Point = {})); diff --git a/tests/baselines/reference/null.js b/tests/baselines/reference/null.js index 499d6901847..c82cb3ab432 100644 --- a/tests/baselines/reference/null.js +++ b/tests/baselines/reference/null.js @@ -38,4 +38,7 @@ function g() { return null; return 3; } -var w = { x: null, y: 3 }; +var w = { + x: null, + y: 3 +}; diff --git a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js index c32cd84ce26..f69fe668f34 100644 --- a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js +++ b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js @@ -108,12 +108,22 @@ var r4 = true ? new Date() : null; var r4 = true ? null : new Date(); var r5 = true ? /1/ : null; var r5 = true ? null : /1/; -var r6 = true ? { foo: 1 } : null; -var r6 = true ? null : { foo: 1 }; -var r7 = true ? function () { } : null; -var r7 = true ? null : function () { }; -var r8 = true ? function (x) { return x; } : null; -var r8b = true ? null : function (x) { return x; }; // type parameters not identical across declarations +var r6 = true ? { + foo: 1 +} : null; +var r6 = true ? null : { + foo: 1 +}; +var r7 = true ? function () { +} : null; +var r7 = true ? null : function () { +}; +var r8 = true ? function (x) { + return x; +} : null; +var r8b = true ? null : function (x) { + return x; +}; // type parameters not identical across declarations var i1; var r9 = true ? i1 : null; var r9 = true ? null : i1; @@ -141,7 +151,8 @@ var r13 = true ? E : null; var r13 = true ? null : E; var r14 = true ? 0 /* A */ : null; var r14 = true ? null : 0 /* A */; -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/numberAsInLHS.js b/tests/baselines/reference/numberAsInLHS.js index d2fee353ab4..bcc1bcf7b84 100644 --- a/tests/baselines/reference/numberAsInLHS.js +++ b/tests/baselines/reference/numberAsInLHS.js @@ -2,4 +2,7 @@ 3 in [0, 1] //// [numberAsInLHS.js] -3 in [0, 1]; +3 in [ + 0, + 1 +]; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js index cf08bb98217..339f674b9da 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js @@ -106,7 +106,8 @@ var C = (function () { get: function () { return ''; }, - set: function (v) { } // ok + set: function (v) { + } // ok , enumerable: true, configurable: true @@ -114,7 +115,8 @@ var C = (function () { C.prototype.foo = function () { return ''; }; - C.foo = function () { }; // ok + C.foo = function () { + }; // ok Object.defineProperty(C, "X", { get: function () { return 1; @@ -129,7 +131,8 @@ var a; var b = { a: '', b: 1, - c: function () { }, + c: function () { + }, "d": '', "e": 1, 1.0: '', @@ -140,7 +143,8 @@ var b = { get X() { return ''; }, - set X(v) { }, + set X(v) { + }, foo: function () { return ''; } diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js index 0474abef393..1cfd94a0c97 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations2.js @@ -56,7 +56,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { @@ -64,7 +66,9 @@ var B = (function (_super) { function B() { _super.apply(this, arguments); } - B.prototype.bar = function () { return ''; }; + B.prototype.bar = function () { + return ''; + }; return B; })(A); var Foo = (function () { diff --git a/tests/baselines/reference/numericIndexerConstraint1.js b/tests/baselines/reference/numericIndexerConstraint1.js index ed51e3af066..9587863a035 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.js +++ b/tests/baselines/reference/numericIndexerConstraint1.js @@ -8,7 +8,8 @@ var result: Foo = x["one"]; // error var Foo = (function () { function Foo() { } - Foo.prototype.foo = function () { }; + Foo.prototype.foo = function () { + }; return Foo; })(); var x; diff --git a/tests/baselines/reference/numericIndexerConstraint2.js b/tests/baselines/reference/numericIndexerConstraint2.js index 4d8ce742e73..edc9df36a13 100644 --- a/tests/baselines/reference/numericIndexerConstraint2.js +++ b/tests/baselines/reference/numericIndexerConstraint2.js @@ -8,7 +8,8 @@ x = a; var Foo = (function () { function Foo() { } - Foo.prototype.foo = function () { }; + Foo.prototype.foo = function () { + }; return Foo; })(); var x; diff --git a/tests/baselines/reference/numericIndexerConstraint4.js b/tests/baselines/reference/numericIndexerConstraint4.js index 531c450e7e1..cbbf6b68c4e 100644 --- a/tests/baselines/reference/numericIndexerConstraint4.js +++ b/tests/baselines/reference/numericIndexerConstraint4.js @@ -30,4 +30,6 @@ var B = (function (_super) { } return B; })(A); -var x = { data: new B() }; +var x = { + data: new B() +}; diff --git a/tests/baselines/reference/numericIndexerConstraint5.js b/tests/baselines/reference/numericIndexerConstraint5.js index 3ad19f75d0b..b0684454394 100644 --- a/tests/baselines/reference/numericIndexerConstraint5.js +++ b/tests/baselines/reference/numericIndexerConstraint5.js @@ -3,5 +3,8 @@ var x = { name: "x", 0: new Date() }; var z: { [name: number]: string } = x; //// [numericIndexerConstraint5.js] -var x = { name: "x", 0: new Date() }; +var x = { + name: "x", + 0: new Date() +}; var z = x; diff --git a/tests/baselines/reference/numericIndexingResults.js b/tests/baselines/reference/numericIndexingResults.js index 70c6e15d15a..043bf3265e9 100644 --- a/tests/baselines/reference/numericIndexingResults.js +++ b/tests/baselines/reference/numericIndexingResults.js @@ -85,14 +85,20 @@ var r3 = a['3']; var r4 = a[1]; var r5 = a[2]; var r6 = a[3]; -var b = { 1: '', "2": '' }; +var b = { + 1: '', + "2": '' +}; var r1a = b['1']; var r2a = b['2']; var r3 = b['3']; var r4 = b[1]; var r5 = b[2]; var r6 = b[3]; -var b2 = { 1: '', "2": '' }; +var b2 = { + 1: '', + "2": '' +}; var r1b = b2['1']; var r2b = b2['2']; var r3 = b2['3']; diff --git a/tests/baselines/reference/objectLitIndexerContextualType.js b/tests/baselines/reference/objectLitIndexerContextualType.js index f0cf90724b3..a6124814cff 100644 --- a/tests/baselines/reference/objectLitIndexerContextualType.js +++ b/tests/baselines/reference/objectLitIndexerContextualType.js @@ -26,14 +26,22 @@ y = { var x; var y; x = { - s: function (t) { return t * t; } + s: function (t) { + return t * t; + } }; x = { - 0: function (t) { return t * t; } + 0: function (t) { + return t * t; + } }; y = { - s: function (t) { return t * t; } + s: function (t) { + return t * t; + } }; y = { - 0: function (t) { return t * t; } + 0: function (t) { + return t * t; + } }; diff --git a/tests/baselines/reference/objectLitStructuralTypeMismatch.js b/tests/baselines/reference/objectLitStructuralTypeMismatch.js index 380b8a2aacf..c24f742f082 100644 --- a/tests/baselines/reference/objectLitStructuralTypeMismatch.js +++ b/tests/baselines/reference/objectLitStructuralTypeMismatch.js @@ -4,4 +4,6 @@ var x: { a: number; } = { b: 5 }; //// [objectLitStructuralTypeMismatch.js] // Shouldn't compile -var x = { b: 5 }; +var x = { + b: 5 +}; diff --git a/tests/baselines/reference/objectLitTargetTypeCallSite.js b/tests/baselines/reference/objectLitTargetTypeCallSite.js index 999b889e415..76cd4c660dc 100644 --- a/tests/baselines/reference/objectLitTargetTypeCallSite.js +++ b/tests/baselines/reference/objectLitTargetTypeCallSite.js @@ -9,4 +9,7 @@ process({a:true,b:"y"}); function process(x) { return x.a; } -process({ a: true, b: "y" }); +process({ + a: true, + b: "y" +}); diff --git a/tests/baselines/reference/objectLiteral1.js b/tests/baselines/reference/objectLiteral1.js index ebeabd011b5..7d625c8e815 100644 --- a/tests/baselines/reference/objectLiteral1.js +++ b/tests/baselines/reference/objectLiteral1.js @@ -2,4 +2,7 @@ var v30 = {a:1, b:2}; //// [objectLiteral1.js] -var v30 = { a: 1, b: 2 }; +var v30 = { + a: 1, + b: 2 +}; diff --git a/tests/baselines/reference/objectLiteral2.js b/tests/baselines/reference/objectLiteral2.js index 189e495c5f5..b517d99b05d 100644 --- a/tests/baselines/reference/objectLiteral2.js +++ b/tests/baselines/reference/objectLiteral2.js @@ -2,4 +2,7 @@ var v30 = {a:1, b:2}, v31; //// [objectLiteral2.js] -var v30 = { a: 1, b: 2 }, v31; +var v30 = { + a: 1, + b: 2 +}, v31; diff --git a/tests/baselines/reference/objectLiteralArraySpecialization.js b/tests/baselines/reference/objectLiteralArraySpecialization.js index 0a48a3dccdd..9f704adba0e 100644 --- a/tests/baselines/reference/objectLiteralArraySpecialization.js +++ b/tests/baselines/reference/objectLiteralArraySpecialization.js @@ -9,5 +9,16 @@ thing.doSomething((x, y) => x.name === "bob"); // should not error //// [objectLiteralArraySpecialization.js] -var thing = create([{ name: "bob", id: 24 }, { name: "doug", id: 32 }]); // should not error -thing.doSomething(function (x, y) { return x.name === "bob"; }); // should not error +var thing = create([ + { + name: "bob", + id: 24 + }, + { + name: "doug", + id: 32 + } +]); // should not error +thing.doSomething(function (x, y) { + return x.name === "bob"; +}); // should not error diff --git a/tests/baselines/reference/objectLiteralContextualTyping.js b/tests/baselines/reference/objectLiteralContextualTyping.js index 48686042754..c61452c2057 100644 --- a/tests/baselines/reference/objectLiteralContextualTyping.js +++ b/tests/baselines/reference/objectLiteralContextualTyping.js @@ -29,13 +29,23 @@ var b: {}; //// [objectLiteralContextualTyping.js] // Tests related to #1774 -var x = foo({ name: "Sprocket" }); +var x = foo({ + name: "Sprocket" +}); var x; -var y = foo({ name: "Sprocket", description: "Bumpy wheel" }); +var y = foo({ + name: "Sprocket", + description: "Bumpy wheel" +}); var y; -var z = foo({ name: "Sprocket", description: false }); +var z = foo({ + name: "Sprocket", + description: false +}); var z; -var w = foo({ a: 10 }); +var w = foo({ + a: 10 +}); var w; var b = bar({}); var b; diff --git a/tests/baselines/reference/objectLiteralErrors.js b/tests/baselines/reference/objectLiteralErrors.js index 4dccc78b67d..ac1ab2ec10e 100644 --- a/tests/baselines/reference/objectLiteralErrors.js +++ b/tests/baselines/reference/objectLiteralErrors.js @@ -48,44 +48,210 @@ var g3 = { get a(): number { return undefined; }, set a(n: string) { } }; //// [objectLiteralErrors.js] // Multiple properties with the same name -var e1 = { a: 0, a: 0 }; -var e2 = { a: '', a: '' }; -var e3 = { a: 0, a: '' }; -var e4 = { a: true, a: false }; -var e5 = { a: {}, a: {} }; -var e6 = { a: 0, 'a': 0 }; -var e7 = { 'a': 0, a: 0 }; -var e8 = { 'a': 0, "a": 0 }; -var e9 = { 'a': 0, 'a': 0 }; -var e10 = { "a": 0, 'a': 0 }; -var e11 = { 1.0: 0, '1': 0 }; -var e12 = { 0: 0, 0: 0 }; -var e13 = { 0: 0, 0: 0 }; -var e14 = { 0: 0, 0x0: 0 }; -var e14 = { 0: 0, 000: 0 }; -var e15 = { "100": 0, 1e2: 0 }; -var e16 = { 0x20: 0, 3.2e1: 0 }; -var e17 = { a: 0, b: 1, a: 0 }; +var e1 = { + a: 0, + a: 0 +}; +var e2 = { + a: '', + a: '' +}; +var e3 = { + a: 0, + a: '' +}; +var e4 = { + a: true, + a: false +}; +var e5 = { + a: {}, + a: {} +}; +var e6 = { + a: 0, + 'a': 0 +}; +var e7 = { + 'a': 0, + a: 0 +}; +var e8 = { + 'a': 0, + "a": 0 +}; +var e9 = { + 'a': 0, + 'a': 0 +}; +var e10 = { + "a": 0, + 'a': 0 +}; +var e11 = { + 1.0: 0, + '1': 0 +}; +var e12 = { + 0: 0, + 0: 0 +}; +var e13 = { + 0: 0, + 0: 0 +}; +var e14 = { + 0: 0, + 0x0: 0 +}; +var e14 = { + 0: 0, + 000: 0 +}; +var e15 = { + "100": 0, + 1e2: 0 +}; +var e16 = { + 0x20: 0, + 3.2e1: 0 +}; +var e17 = { + a: 0, + b: 1, + a: 0 +}; // Accessor and property with the same name -var f1 = { a: 0, get a() { return 0; } }; -var f2 = { a: '', get a() { return ''; } }; -var f3 = { a: 0, get a() { return ''; } }; -var f4 = { a: true, get a() { return false; } }; -var f5 = { a: {}, get a() { return {}; } }; -var f6 = { a: 0, get 'a'() { return 0; } }; -var f7 = { 'a': 0, get a() { return 0; } }; -var f8 = { 'a': 0, get "a"() { return 0; } }; -var f9 = { 'a': 0, get 'a'() { return 0; } }; -var f10 = { "a": 0, get 'a'() { return 0; } }; -var f11 = { 1.0: 0, get '1'() { return 0; } }; -var f12 = { 0: 0, get 0() { return 0; } }; -var f13 = { 0: 0, get 0() { return 0; } }; -var f14 = { 0: 0, get 0x0() { return 0; } }; -var f14 = { 0: 0, get 000() { return 0; } }; -var f15 = { "100": 0, get 1e2() { return 0; } }; -var f16 = { 0x20: 0, get 3.2e1() { return 0; } }; -var f17 = { a: 0, get b() { return 1; }, get a() { return 0; } }; +var f1 = { + a: 0, + get a() { + return 0; + } +}; +var f2 = { + a: '', + get a() { + return ''; + } +}; +var f3 = { + a: 0, + get a() { + return ''; + } +}; +var f4 = { + a: true, + get a() { + return false; + } +}; +var f5 = { + a: {}, + get a() { + return {}; + } +}; +var f6 = { + a: 0, + get 'a'() { + return 0; + } +}; +var f7 = { + 'a': 0, + get a() { + return 0; + } +}; +var f8 = { + 'a': 0, + get "a"() { + return 0; + } +}; +var f9 = { + 'a': 0, + get 'a'() { + return 0; + } +}; +var f10 = { + "a": 0, + get 'a'() { + return 0; + } +}; +var f11 = { + 1.0: 0, + get '1'() { + return 0; + } +}; +var f12 = { + 0: 0, + get 0() { + return 0; + } +}; +var f13 = { + 0: 0, + get 0() { + return 0; + } +}; +var f14 = { + 0: 0, + get 0x0() { + return 0; + } +}; +var f14 = { + 0: 0, + get 000() { + return 0; + } +}; +var f15 = { + "100": 0, + get 1e2() { + return 0; + } +}; +var f16 = { + 0x20: 0, + get 3.2e1() { + return 0; + } +}; +var f17 = { + a: 0, + get b() { + return 1; + }, + get a() { + return 0; + } +}; // Get and set accessor with mismatched type annotations -var g1 = { get a() { return 4; }, set a(n) { } }; -var g2 = { get a() { return 4; }, set a(n) { } }; -var g3 = { get a() { return undefined; }, set a(n) { } }; +var g1 = { + get a() { + return 4; + }, + set a(n) { + } +}; +var g2 = { + get a() { + return 4; + }, + set a(n) { + } +}; +var g3 = { + get a() { + return undefined; + }, + set a(n) { + } +}; diff --git a/tests/baselines/reference/objectLiteralErrorsES3.js b/tests/baselines/reference/objectLiteralErrorsES3.js index 031a68fd109..f2910c37c3e 100644 --- a/tests/baselines/reference/objectLiteralErrorsES3.js +++ b/tests/baselines/reference/objectLiteralErrorsES3.js @@ -7,6 +7,19 @@ var e3 = { get a() { return ''; }, set a(n) { } }; //// [objectLiteralErrorsES3.js] -var e1 = { get a() { return 4; } }; -var e2 = { set a(n) { } }; -var e3 = { get a() { return ''; }, set a(n) { } }; +var e1 = { + get a() { + return 4; + } +}; +var e2 = { + set a(n) { + } +}; +var e3 = { + get a() { + return ''; + }, + set a(n) { + } +}; diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js index 7f9bdc5c54a..b0f18da34df 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js @@ -14,10 +14,31 @@ f2({ toString: (s: string) => s }) // error, missing property value from ArgsStr f2({ value: '', toString: (s) => s.uhhh }) // error //// [objectLiteralFunctionArgContextualTyping.js] -function f2(args) { } -f2({ hello: 1 }); // error -f2({ value: '' }); // missing toString satisfied by Object's member -f2({ value: '', what: 1 }); // missing toString satisfied by Object's member -f2({ toString: function (s) { return s; } }); // error, missing property value from ArgsString -f2({ toString: function (s) { return s; } }); // error, missing property value from ArgsString -f2({ value: '', toString: function (s) { return s.uhhh; } }); // error +function f2(args) { +} +f2({ + hello: 1 +}); // error +f2({ + value: '' +}); // missing toString satisfied by Object's member +f2({ + value: '', + what: 1 +}); // missing toString satisfied by Object's member +f2({ + toString: function (s) { + return s; + } +}); // error, missing property value from ArgsString +f2({ + toString: function (s) { + return s; + } +}); // error, missing property value from ArgsString +f2({ + value: '', + toString: function (s) { + return s.uhhh; + } +}); // error diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js index 96d1106e1ff..73d22c8dd51 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js @@ -14,10 +14,31 @@ f2({ toString: (s: string) => s }) f2({ value: '', toString: (s) => s.uhhh }) //// [objectLiteralFunctionArgContextualTyping2.js] -function f2(args) { } -f2({ hello: 1 }); -f2({ value: '' }); -f2({ value: '', what: 1 }); -f2({ toString: function (s) { return s; } }); -f2({ toString: function (s) { return s; } }); -f2({ value: '', toString: function (s) { return s.uhhh; } }); +function f2(args) { +} +f2({ + hello: 1 +}); +f2({ + value: '' +}); +f2({ + value: '', + what: 1 +}); +f2({ + toString: function (s) { + return s; + } +}); +f2({ + toString: function (s) { + return s; + } +}); +f2({ + value: '', + toString: function (s) { + return s.uhhh; + } +}); diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.js b/tests/baselines/reference/objectLiteralGettersAndSetters.js index d226c2c5569..bdaf0966e10 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.js +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.js @@ -85,40 +85,139 @@ var getParamType3 = { //// [objectLiteralGettersAndSetters.js] // Get and set accessor with the same name -var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p; } }; -var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p; } }; -var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p; } }; -var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p; } }; -var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p; } }; -var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p; } }; +var sameName1a = { + get 'a'() { + return ''; + }, + set a(n) { + var p = n; + var p; + } +}; +var sameName2a = { + get 0.0() { + return ''; + }, + set 0(n) { + var p = n; + var p; + } +}; +var sameName3a = { + get 0x20() { + return ''; + }, + set 3.2e1(n) { + var p = n; + var p; + } +}; +var sameName4a = { + get ''() { + return ''; + }, + set ""(n) { + var p = n; + var p; + } +}; +var sameName5a = { + get '\t'() { + return ''; + }, + set '\t'(n) { + var p = n; + var p; + } +}; +var sameName6a = { + get 'a'() { + return ''; + }, + set a(n) { + var p = n; + var p; + } +}; // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} -var callSig1 = { num: function (n) { return ''; } }; +var callSig1 = { + num: function (n) { + return ''; + } +}; var callSig1; -var callSig2 = { num: function (n) { return ''; } }; +var callSig2 = { + num: function (n) { + return ''; + } +}; var callSig2; -var callSig3 = { num: function (n) { return ''; } }; +var callSig3 = { + num: function (n) { + return ''; + } +}; var callSig3; // Get accessor only, type of the property is the annotated return type of the get accessor -var getter1 = { get x() { return undefined; } }; +var getter1 = { + get x() { + return undefined; + } +}; var getter1; // Get accessor only, type of the property is the inferred return type of the get accessor -var getter2 = { get x() { return ''; } }; +var getter2 = { + get x() { + return ''; + } +}; var getter2; // Set accessor only, type of the property is the param type of the set accessor -var setter1 = { set x(n) { } }; +var setter1 = { + set x(n) { + } +}; var setter1; // Set accessor only, type of the property is Any for an unannotated set accessor -var setter2 = { set x(n) { } }; +var setter2 = { + set x(n) { + } +}; var setter2; var anyVar; // Get and set accessor with matching type annotations -var sameType1 = { get x() { return undefined; }, set x(n) { } }; -var sameType2 = { get x() { return undefined; }, set x(n) { } }; -var sameType3 = { get x() { return undefined; }, set x(n) { } }; -var sameType4 = { get x() { return undefined; }, set x(n) { } }; +var sameType1 = { + get x() { + return undefined; + }, + set x(n) { + } +}; +var sameType2 = { + get x() { + return undefined; + }, + set x(n) { + } +}; +var sameType3 = { + get x() { + return undefined; + }, + set x(n) { + } +}; +var sameType4 = { + get x() { + return undefined; + }, + set x(n) { + } +}; // Type of unannotated get accessor return type is the type annotation of the set accessor param var setParamType1 = { - set n(x) { }, + set n(x) { + }, get n() { return function (t) { var p; @@ -133,7 +232,8 @@ var setParamType2 = { var p = t; }; }, - set n(x) { } + set n(x) { + } }; // Type of unannotated set accessor parameter is the return type annotation of the get accessor var getParamType1 = { @@ -141,10 +241,14 @@ var getParamType1 = { var y = x; var y; }, - get n() { return ''; } + get n() { + return ''; + } }; var getParamType2 = { - get n() { return ''; }, + get n() { + return ''; + }, set n(x) { var y = x; var y; @@ -152,7 +256,9 @@ var getParamType2 = { }; // Type of unannotated accessors is the inferred return type of the get accessor var getParamType3 = { - get n() { return ''; }, + get n() { + return ''; + }, set n(x) { var y = x; var y; diff --git a/tests/baselines/reference/objectLiteralIndexerErrors.js b/tests/baselines/reference/objectLiteralIndexerErrors.js index 5e0159015d5..2c619743094 100644 --- a/tests/baselines/reference/objectLiteralIndexerErrors.js +++ b/tests/baselines/reference/objectLiteralIndexerErrors.js @@ -18,5 +18,11 @@ o1 = { x: c, 0: a }; // string indexer is any, number indexer is A var a; var b; var c; -var o1 = { x: b, 0: a }; // both indexers are A -o1 = { x: c, 0: a }; // string indexer is any, number indexer is A +var o1 = { + x: b, + 0: a +}; // both indexers are A +o1 = { + x: c, + 0: a +}; // string indexer is any, number indexer is A diff --git a/tests/baselines/reference/objectLiteralIndexers.js b/tests/baselines/reference/objectLiteralIndexers.js index c36cbfc7571..97bb3ee78cc 100644 --- a/tests/baselines/reference/objectLiteralIndexers.js +++ b/tests/baselines/reference/objectLiteralIndexers.js @@ -19,6 +19,15 @@ o1 = { x: c, 0: b }; // string indexer is any, number indexer is B var a; var b; var c; -var o1 = { x: a, 0: b }; // string indexer is A, number indexer is B -o1 = { x: b, 0: c }; // both indexers are any -o1 = { x: c, 0: b }; // string indexer is any, number indexer is B +var o1 = { + x: a, + 0: b +}; // string indexer is A, number indexer is B +o1 = { + x: b, + 0: c +}; // both indexers are any +o1 = { + x: c, + 0: b +}; // string indexer is any, number indexer is B diff --git a/tests/baselines/reference/objectLiteralMemberWithModifiers1.js b/tests/baselines/reference/objectLiteralMemberWithModifiers1.js index a4389d49bdf..998bc292740 100644 --- a/tests/baselines/reference/objectLiteralMemberWithModifiers1.js +++ b/tests/baselines/reference/objectLiteralMemberWithModifiers1.js @@ -2,4 +2,7 @@ var v = { public foo() { } } //// [objectLiteralMemberWithModifiers1.js] -var v = { foo: function () { } }; +var v = { + foo: function () { + } +}; diff --git a/tests/baselines/reference/objectLiteralMemberWithModifiers2.js b/tests/baselines/reference/objectLiteralMemberWithModifiers2.js index ffe2b6678df..d8cb4a3ad49 100644 --- a/tests/baselines/reference/objectLiteralMemberWithModifiers2.js +++ b/tests/baselines/reference/objectLiteralMemberWithModifiers2.js @@ -2,4 +2,7 @@ var v = { public get foo() { } } //// [objectLiteralMemberWithModifiers2.js] -var v = { get foo() { } }; +var v = { + get foo() { + } +}; diff --git a/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js b/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js index 62f7a6eefe2..539c7a1cca9 100644 --- a/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js +++ b/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js @@ -2,4 +2,7 @@ var v = { foo?() { } } //// [objectLiteralMemberWithQuestionMark1.js] -var v = { foo: function () { } }; +var v = { + foo: function () { + } +}; diff --git a/tests/baselines/reference/objectLiteralMemberWithoutBlock1.js b/tests/baselines/reference/objectLiteralMemberWithoutBlock1.js index d6a8579be04..b8cd54803a5 100644 --- a/tests/baselines/reference/objectLiteralMemberWithoutBlock1.js +++ b/tests/baselines/reference/objectLiteralMemberWithoutBlock1.js @@ -2,4 +2,6 @@ var v = { foo(); } //// [objectLiteralMemberWithoutBlock1.js] -var v = { foo: function () { } }; +var v = { + foo: function () { } +}; diff --git a/tests/baselines/reference/objectLiteralParameterResolution.js b/tests/baselines/reference/objectLiteralParameterResolution.js index 5912a2229b1..1d680623600 100644 --- a/tests/baselines/reference/objectLiteralParameterResolution.js +++ b/tests/baselines/reference/objectLiteralParameterResolution.js @@ -23,7 +23,9 @@ var s = $.extend({ success: wrapSuccessCallback(requestContext, callback), error: wrapErrorCallback(requestContext, errorCallback), dataType: "json", - converters: { "text json": "" }, + converters: { + "text json": "" + }, traditional: true, timeout: 12 }, ""); diff --git a/tests/baselines/reference/objectLiteralReferencingInternalProperties.js b/tests/baselines/reference/objectLiteralReferencingInternalProperties.js index 793fa0c588a..1215dda92a7 100644 --- a/tests/baselines/reference/objectLiteralReferencingInternalProperties.js +++ b/tests/baselines/reference/objectLiteralReferencingInternalProperties.js @@ -2,4 +2,7 @@ var a = { b: 10, c: b }; // Should give error for attempting to reference b. //// [objectLiteralReferencingInternalProperties.js] -var a = { b: 10, c: b }; // Should give error for attempting to reference b. +var a = { + b: 10, + c: b +}; // Should give error for attempting to reference b. diff --git a/tests/baselines/reference/objectLiteralShorthandProperties.js b/tests/baselines/reference/objectLiteralShorthandProperties.js index bc18ecfb948..776b2bbe454 100644 --- a/tests/baselines/reference/objectLiteralShorthandProperties.js +++ b/tests/baselines/reference/objectLiteralShorthandProperties.js @@ -32,7 +32,8 @@ var x3 = { a: 0, b: b, c: c, - d: function () { }, + d: function () { + }, x3: x3, parent: x3 }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js index 251098eb6c8..f9b1e2caa9a 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js @@ -17,12 +17,30 @@ var person3: { name: string; id:number } = bar("Hello", 5); //// [objectLiteralShorthandPropertiesAssignment.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; -function foo(obj) { } +var person = { + name: name, + id: id +}; +function foo(obj) { +} ; -function bar(name, id) { return { name: name, id: id }; } -function bar1(name, id) { return { name: name }; } -function baz(name, id) { return { name: name, id: id }; } +function bar(name, id) { + return { + name: name, + id: id + }; +} +function bar1(name, id) { + return { + name: name + }; +} +function baz(name, id) { + return { + name: name, + id: id + }; +} foo(person); var person1 = bar("Hello", 5); var person2 = bar("Hello", 5); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js index 247ec56d127..4b21d8052ea 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js @@ -17,12 +17,30 @@ var person3: { name: string; id: number } = bar("Hello", 5); //// [objectLiteralShorthandPropertiesAssignmentES6.js] var id = 10000; var name = "my name"; -var person = { name, id }; -function foo(obj) { } +var person = { + name, + id +}; +function foo(obj) { +} ; -function bar(name, id) { return { name, id }; } -function bar1(name, id) { return { name }; } -function baz(name, id) { return { name, id }; } +function bar(name, id) { + return { + name, + id + }; +} +function bar1(name, id) { + return { + name + }; +} +function baz(name, id) { + return { + name, + id + }; +} foo(person); var person1 = bar("Hello", 5); var person2 = bar("Hello", 5); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js index 8e2d7f80356..4f99576c30e 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js @@ -13,9 +13,21 @@ bar({ name, id }); // error //// [objectLiteralShorthandPropertiesAssignmentError.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; // error +var person = { + name: name, + id: id +}; // error var person1 = name, id; ; // error: can't use short-hand property assignment in type position -function foo(name, id) { return { name: name, id: id }; } // error -function bar(obj) { } -bar({ name: name, id: id }); // error +function foo(name, id) { + return { + name: name, + id: id + }; +} // error +function bar(obj) { +} +bar({ + name: name, + id: id +}); // error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js index 71449746add..1ccdb274865 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js @@ -11,9 +11,22 @@ var person2: { name: string, id: number } = bar("hello", 5); //// [objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; // error -function bar(name, id) { return { name: name, id: id }; } // error -function foo(name, id) { return { name: name, id: id }; } // error +var person = { + name: name, + id: id +}; // error +function bar(name, id) { + return { + name: name, + id: id + }; +} // error +function foo(name, id) { + return { + name: name, + id: id + }; +} // error var person1 = name, id; ; // error : Can't use shorthand in the type position var person2 = bar("hello", 5); diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js index 9b19bdc8b5e..c65087a8da7 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js @@ -32,7 +32,8 @@ var x3 = { a: 0, b, c, - d() { }, + d() { + }, x3, parent: x3 }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js index b72f0351b9c..3c457178b3e 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js @@ -25,8 +25,10 @@ var v = { class }; // error var y = { "stringLiteral": , 42: , - get e() { }, - set f() { }, + get e() { + }, + set f() { + }, this: , super: , var: , @@ -35,7 +37,13 @@ var y = { }; var x = { a: .b, - a: ["ss"], - a: [1] + a: [ + "ss" + ], + a: [ + 1 + ] }; -var v = { class: }; // error +var v = { + class: +}; // error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js index 860abc24b19..65eed2eace7 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js @@ -13,7 +13,14 @@ var obj = { name: name, id: id }; //// [objectLiteralShorthandPropertiesFunctionArgument.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; -function foo(p) { } +var person = { + name: name, + id: id +}; +function foo(p) { +} foo(person); -var obj = { name: name, id: id }; +var obj = { + name: name, + id: id +}; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js index 7e9d2e7ca8b..3f396091d05 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js @@ -11,6 +11,10 @@ foo(person); // error //// [objectLiteralShorthandPropertiesFunctionArgument2.js] var id = 10000; var name = "my name"; -var person = { name: name, id: id }; -function foo(p) { } +var person = { + name: name, + id: id +}; +function foo(p) { +} foo(person); // error diff --git a/tests/baselines/reference/objectLiteralWithSemicolons1.js b/tests/baselines/reference/objectLiteralWithSemicolons1.js index b820b14428c..85aa5f268c5 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons1.js +++ b/tests/baselines/reference/objectLiteralWithSemicolons1.js @@ -2,4 +2,8 @@ var v = { a; b; c } //// [objectLiteralWithSemicolons1.js] -var v = { a: , b: , c: c }; +var v = { + a: , + b: , + c: c +}; diff --git a/tests/baselines/reference/objectLiteralWithSemicolons4.js b/tests/baselines/reference/objectLiteralWithSemicolons4.js index a01d52548ee..9e1e3dea4b9 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons4.js +++ b/tests/baselines/reference/objectLiteralWithSemicolons4.js @@ -5,4 +5,5 @@ var v = { //// [objectLiteralWithSemicolons4.js] var v = { - a: }; + a: +}; diff --git a/tests/baselines/reference/objectLiteralWithSemicolons5.js b/tests/baselines/reference/objectLiteralWithSemicolons5.js index 1c9c4ddf544..36fef30ad75 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons5.js +++ b/tests/baselines/reference/objectLiteralWithSemicolons5.js @@ -2,4 +2,10 @@ var v = { foo() { }; a: b; get baz() { }; } //// [objectLiteralWithSemicolons5.js] -var v = { foo: function () { }, a: b, get baz() { } }; +var v = { + foo: function () { + }, + a: b, + get baz() { + } +}; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index 16268c1331c..fa41e57e22e 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -76,7 +76,8 @@ var B = (function (_super) { var C = (function () { function C() { } - C.prototype.valueOf = function () { }; + C.prototype.valueOf = function () { + }; return C; })(); var c; @@ -90,7 +91,8 @@ var r2b = i.data; var r2c = r2b['hm']; // should be 'Object' var r2d = i['hm']; // should be 'any' var a = { - valueOf: function () { }, + valueOf: function () { + }, data: new B() }; var r3 = a.valueOf(); diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObject.js b/tests/baselines/reference/objectTypeHidingMembersOfObject.js index 291cc1858fd..113329cf8b6 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObject.js @@ -32,7 +32,8 @@ var r4: void = b.valueOf(); var C = (function () { function C() { } - C.prototype.valueOf = function () { }; + C.prototype.valueOf = function () { + }; return C; })(); var c; @@ -40,7 +41,8 @@ var r1 = c.valueOf(); var i; var r2 = i.valueOf(); var a = { - valueOf: function () { } + valueOf: function () { + } }; var r3 = a.valueOf(); var b; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js index 5ae0c2fb1bb..93d985f7987 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js @@ -29,14 +29,16 @@ i = o; // ok var C = (function () { function C() { } - C.prototype.toString = function () { }; + C.prototype.toString = function () { + }; return C; })(); var c; o = c; // error c = o; // ok var a = { - toString: function () { } + toString: function () { + } }; o = a; // error a = o; // ok diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js index 7a2b5e2ec2f..b8a5aa87aef 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js @@ -29,14 +29,17 @@ i = o; // error var C = (function () { function C() { } - C.prototype.toString = function () { return 1; }; + C.prototype.toString = function () { + return 1; + }; return C; })(); var c; o = c; // error c = o; // error var a = { - toString: function () { } + toString: function () { + } }; o = a; // error a = o; // ok diff --git a/tests/baselines/reference/objectTypesIdentity.js b/tests/baselines/reference/objectTypesIdentity.js index 7eccee23651..b757c18ac4f 100644 --- a/tests/baselines/reference/objectTypesIdentity.js +++ b/tests/baselines/reference/objectTypesIdentity.js @@ -106,21 +106,40 @@ var C = (function () { return C; })(); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentity2.js b/tests/baselines/reference/objectTypesIdentity2.js index adbb9caeada..bdd20d8ac5e 100644 --- a/tests/baselines/reference/objectTypesIdentity2.js +++ b/tests/baselines/reference/objectTypesIdentity2.js @@ -87,15 +87,28 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -var b = { foo: 0 /* A */ }; -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + foo: 0 /* A */ +}; +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js index 0c6952291f9..3465085bdaf 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js index 43473d88e0a..5a45e4b5af0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js index f4cfc8dc605..289ba25bf6e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js @@ -42,10 +42,17 @@ function foo15(x: any) { } //// [objectTypesIdentityWithCallSignatures3.js] // object types are identical structurally var a; -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo13(x) { } -function foo14(x) { } -function foo14b(x) { } -function foo15(x) { } +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo14b(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js index 498867f0a02..c258bc277d7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js index 98b17767b75..fe84b3e6b92 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js @@ -46,11 +46,19 @@ function foo15(x: any) { } //// [objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js] // object types are identical structurally var a; -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo13(x) { } -function foo14(x) { } -function foo14b(x) { } -function foo15(x) { } +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo14b(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js index 54400ad81d1..29cb6f3cd54 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js @@ -121,41 +121,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; var b = { - foo: function (x) { return ''; } + foo: function (x) { + return ''; + } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js index ca9db28223a..9f16153da37 100644 --- a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js @@ -15,4 +15,5 @@ function foo(x: B); // error after constraints above made illegal function foo(x: any) { } //// [objectTypesIdentityWithComplexConstraints.js] -function foo(x) { } +function foo(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js index 91208da5b90..caf28cd05de 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js @@ -105,19 +105,35 @@ var C = (function () { return C; })(); var a; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo15(x) { } +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js index 87067b6be28..641524de5a6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js @@ -91,18 +91,36 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + new: function (x) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js index c95159ed997..171dd5c3513 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js @@ -91,18 +91,36 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + new: function (x) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js index c8bed1a47ab..f366e79341f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js index 6ef5d15fd98..9d184204345 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x, y) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js index 2b83064afed..b5b7f6414e0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js index 1f9c5fa5256..cc1957eef3d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js @@ -121,47 +121,80 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { return null; }; + D.prototype.foo = function (x, y) { + return null; + }; return D; })(); var a; -var b = { foo: function (x, y) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo6c(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo6c(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js index 21106b56b00..9774cbd2b41 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js @@ -140,47 +140,80 @@ var Two = (function () { var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { return null; }; + D.prototype.foo = function (x, y) { + return null; + }; return D; })(); var a; -var b = { foo: function (x, y) { return ''; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo6c(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return ''; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo6c(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js index 99188347d36..ac686014aa6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return null; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return null; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js index 10d72bde0b3..e25e379bde8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return null; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return null; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js index 5a20dfdecb6..48e98f904b0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js index 6bfd019dc86..944fb7d9846 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js @@ -43,10 +43,17 @@ function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js] // object types are identical structurally var a; -function foo1(x) { } -function foo2(x) { } -function foo3(x) { } -function foo13(x) { } -function foo14(x) { } -function foo14b(x) { } -function foo15(x) { } +function foo1(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo14b(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js index ec9c786b890..518bbe550ec 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js @@ -105,39 +105,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x) { return null; }; + A.prototype.foo = function (x) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x) { return null; }; + B.prototype.foo = function (x) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x) { return null; }; + C.prototype.foo = function (x) { + return null; + }; return C; })(); var a; -var b = { foo: function (x) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js index a4af2bc820e..f84341e589b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x, y) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js index 28b2f978b55..ea385109821 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x, y) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js index de9b4859fa1..34acdef8599 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js @@ -109,39 +109,68 @@ function foo15(x: any) { } var A = (function () { function A() { } - A.prototype.foo = function (x, y) { return null; }; + A.prototype.foo = function (x, y) { + return null; + }; return A; })(); var B = (function () { function B() { } - B.prototype.foo = function (x, y) { return null; }; + B.prototype.foo = function (x, y) { + return null; + }; return B; })(); var C = (function () { function C() { } - C.prototype.foo = function (x, y) { return null; }; + C.prototype.foo = function (x, y) { + return null; + }; return C; })(); var a; -var b = { foo: function (x, y) { return x; } }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + foo: function (x, y) { + return x; + } +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js index fdc67d4b84a..b252fc7f8fe 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js @@ -92,17 +92,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js index 11dcdf0a609..e6450471a47 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js @@ -109,19 +109,38 @@ var D = (function () { return D; })(); var a; -var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5c(x) { } -function foo6c(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5c(x) { +} +function foo6c(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js index 5c6f59eef24..0a276be9f7a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js @@ -128,19 +128,38 @@ var D = (function () { return D; })(); var a; -var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5c(x) { } -function foo6c(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return ''; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5c(x) { +} +function foo6c(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js index 556d1bcaee0..e1c64ed0ec6 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js @@ -99,19 +99,38 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return null; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + new: function (x) { + return null; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js index 68c32cb0e71..ade431026d5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js @@ -95,18 +95,36 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return null; } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } +var b = { + new: function (x) { + return null; + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js index 789e02d2d7b..014b4126f2c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js @@ -87,17 +87,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return x; } }; -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x) { + return x; + } +}; +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js index 5a501d05834..d30a3a798a2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js @@ -87,17 +87,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x) { return new C(x); } }; -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x) { + return new C(x); + } +}; +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js index 685a8441d97..f71ef509ca9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js @@ -91,17 +91,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return new C(x, y); + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js index f16d69acaa1..00994a57fc8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js @@ -91,17 +91,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return new C(x, y); + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js index 25c628e9e15..572a9db5d33 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js @@ -91,17 +91,34 @@ var C = (function () { return C; })(); var a; -var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo12b(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + new: function (x, y) { + return new C(x, y); + } +}; // not a construct signature, function called new +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo12b(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 1dc6505456a..e49566c5531 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -160,27 +160,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index e2fd1b99bfa..ae00306f397 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -175,27 +175,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: null }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: null +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index 11d64efc9d5..cc9d605153c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -160,27 +160,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithOptionality.js b/tests/baselines/reference/objectTypesIdentityWithOptionality.js index 2a61cda1bb9..4fe529a1342 100644 --- a/tests/baselines/reference/objectTypesIdentityWithOptionality.js +++ b/tests/baselines/reference/objectTypesIdentityWithOptionality.js @@ -74,13 +74,24 @@ var C = (function () { return C; })(); var a; -var b = { foo: '' }; -function foo2(x) { } -function foo3(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo10(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + foo: '' +}; +function foo2(x) { +} +function foo3(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo10(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 5c8a0afed72..e8072e7f186 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -158,27 +158,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 36c3e67c70e..4e62e7b551a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -58,11 +58,17 @@ var D = (function (_super) { } return D; })(C); -function foo1(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } +function foo1(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} var r = foo4(new C()); var r = foo4(new D()); -function foo5(x) { } -function foo6(x) { } +function foo5(x) { +} +function foo6(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithPublics.js b/tests/baselines/reference/objectTypesIdentityWithPublics.js index 7c36eb48f2c..59b6e315c10 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPublics.js +++ b/tests/baselines/reference/objectTypesIdentityWithPublics.js @@ -106,21 +106,40 @@ var C = (function () { return C; })(); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index 37c5537aa4b..f9abb678959 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -160,27 +160,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: '' }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: '' +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index e90dc8598e4..6bb5369122a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -175,27 +175,52 @@ var PB = (function (_super) { return PB; })(B); var a; -var b = { foo: null }; -function foo1(x) { } -function foo1b(x) { } -function foo1c(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } -function foo5b(x) { } -function foo5c(x) { } -function foo5d(x) { } -function foo6(x) { } -function foo7(x) { } -function foo8(x) { } -function foo9(x) { } -function foo10(x) { } -function foo11(x) { } -function foo11b(x) { } -function foo11c(x) { } -function foo12(x) { } -function foo13(x) { } -function foo14(x) { } -function foo15(x) { } -function foo16(x) { } +var b = { + foo: null +}; +function foo1(x) { +} +function foo1b(x) { +} +function foo1c(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} +function foo5b(x) { +} +function foo5c(x) { +} +function foo5d(x) { +} +function foo6(x) { +} +function foo7(x) { +} +function foo8(x) { +} +function foo9(x) { +} +function foo10(x) { +} +function foo11(x) { +} +function foo11b(x) { +} +function foo11c(x) { +} +function foo12(x) { +} +function foo13(x) { +} +function foo14(x) { +} +function foo15(x) { +} +function foo16(x) { +} diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties2.js b/tests/baselines/reference/objectTypesWithOptionalProperties2.js index cf0d113c244..3faa10447b6 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties2.js +++ b/tests/baselines/reference/objectTypesWithOptionalProperties2.js @@ -42,5 +42,7 @@ var C2 = (function () { return C2; })(); var b = { - x: function () { }, 1: // error + x: function () { + }, + 1: // error }; diff --git a/tests/baselines/reference/optionalAccessorsInInterface1.js b/tests/baselines/reference/optionalAccessorsInInterface1.js index dd274b133e5..cf6a795b6bd 100644 --- a/tests/baselines/reference/optionalAccessorsInInterface1.js +++ b/tests/baselines/reference/optionalAccessorsInInterface1.js @@ -17,5 +17,13 @@ defineMyProperty2({}, "name", { get: function () { return 5; } }); //// [optionalAccessorsInInterface1.js] -defineMyProperty({}, "name", { get: function () { return 5; } }); -defineMyProperty2({}, "name", { get: function () { return 5; } }); +defineMyProperty({}, "name", { + get: function () { + return 5; + } +}); +defineMyProperty2({}, "name", { + get: function () { + return 5; + } +}); diff --git a/tests/baselines/reference/optionalBindingParameters1.js b/tests/baselines/reference/optionalBindingParameters1.js index 536cb1e567a..e2286bf40bd 100644 --- a/tests/baselines/reference/optionalBindingParameters1.js +++ b/tests/baselines/reference/optionalBindingParameters1.js @@ -12,5 +12,13 @@ foo([false, 0, ""]); function foo(_a) { var x = _a[0], y = _a[1], z = _a[2]; } -foo(["", 0, false]); -foo([false, 0, ""]); +foo([ + "", + 0, + false +]); +foo([ + false, + 0, + "" +]); diff --git a/tests/baselines/reference/optionalBindingParameters2.js b/tests/baselines/reference/optionalBindingParameters2.js index 04e1138561a..f9c55ebd4a3 100644 --- a/tests/baselines/reference/optionalBindingParameters2.js +++ b/tests/baselines/reference/optionalBindingParameters2.js @@ -12,5 +12,13 @@ foo({ x: false, y: 0, z: "" }); function foo(_a) { var x = _a.x, y = _a.y, z = _a.z; } -foo({ x: "", y: 0, z: false }); -foo({ x: false, y: 0, z: "" }); +foo({ + x: "", + y: 0, + z: false +}); +foo({ + x: false, + y: 0, + z: "" +}); diff --git a/tests/baselines/reference/optionalBindingParametersInOverloads1.js b/tests/baselines/reference/optionalBindingParametersInOverloads1.js index 3658efa72c6..40f60108aa7 100644 --- a/tests/baselines/reference/optionalBindingParametersInOverloads1.js +++ b/tests/baselines/reference/optionalBindingParametersInOverloads1.js @@ -16,5 +16,13 @@ function foo() { rest[_i - 0] = arguments[_i]; } } -foo(["", 0, false]); -foo([false, 0, ""]); +foo([ + "", + 0, + false +]); +foo([ + false, + 0, + "" +]); diff --git a/tests/baselines/reference/optionalBindingParametersInOverloads2.js b/tests/baselines/reference/optionalBindingParametersInOverloads2.js index 1ddfdae4f07..18e4c10fc93 100644 --- a/tests/baselines/reference/optionalBindingParametersInOverloads2.js +++ b/tests/baselines/reference/optionalBindingParametersInOverloads2.js @@ -16,5 +16,13 @@ function foo() { rest[_i - 0] = arguments[_i]; } } -foo({ x: "", y: 0, z: false }); -foo({ x: false, y: 0, z: "" }); +foo({ + x: "", + y: 0, + z: false +}); +foo({ + x: false, + y: 0, + z: "" +}); diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 5204d7f8307..45c0e032cd8 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -20,7 +20,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base(opt) { } - Base.prototype.foo = function (other) { }; + Base.prototype.foo = function (other) { + }; return Base; })(); var Derived = (function (_super) { diff --git a/tests/baselines/reference/optionalFunctionArgAssignability.js b/tests/baselines/reference/optionalFunctionArgAssignability.js index c82a47e88da..bca42060066 100644 --- a/tests/baselines/reference/optionalFunctionArgAssignability.js +++ b/tests/baselines/reference/optionalFunctionArgAssignability.js @@ -9,6 +9,10 @@ a = b; // error because number is not assignable to string //// [optionalFunctionArgAssignability.js] -var a = function then(onFulfill, onReject) { return null; }; -var b = function then(onFulFill, onReject) { return null; }; +var a = function then(onFulfill, onReject) { + return null; +}; +var b = function then(onFulFill, onReject) { + return null; +}; a = b; // error because number is not assignable to string diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 5598f8d0872..6837c024ffb 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -139,8 +139,12 @@ var C1 = (function () { if (p === void 0) { p = 0; } this.n = 0; } - C1.prototype.C1M1 = function () { return 0; }; // returning C1M1A1 will result in "Unresolved symbol C1M1A1" - C1.prototype.C1M2 = function (C1M2A1) { return C1M2A1; }; // will return C1M1A2 without complaint + C1.prototype.C1M1 = function () { + return 0; + }; // returning C1M1A1 will result in "Unresolved symbol C1M1A1" + C1.prototype.C1M2 = function (C1M2A1) { + return C1M2A1; + }; // will return C1M1A2 without complaint // C1M3 contains all optional parameters C1.prototype.C1M3 = function (C1M3A1, C1M3A2) { if (C1M3A1 === void 0) { C1M3A1 = 0; } @@ -148,7 +152,9 @@ var C1 = (function () { return C1M3A1 + C1M3A2; }; // C1M4 contains a mix of optional and non-optional parameters - C1.prototype.C1M4 = function (C1M4A1, C1M4A2) { return C1M4A1 + C1M4A2; }; + C1.prototype.C1M4 = function (C1M4A1, C1M4A2) { + return C1M4A1 + C1M4A2; + }; C1.prototype.C1M5 = function (C1M5A1, C1M5A2, C1M5A3) { if (C1M5A2 === void 0) { C1M5A2 = 0; } return C1M5A1 + C1M5A2; @@ -169,22 +175,34 @@ var C2 = (function (_super) { } return C2; })(C1); -function F1() { return 0; } -function F2(F2A1) { return F2A1; } +function F1() { + return 0; +} +function F2(F2A1) { + return F2A1; +} function F3(F3A1, F3A2) { if (F3A1 === void 0) { F3A1 = 0; } if (F3A2 === void 0) { F3A2 = F3A1; } return F3A1 + F3A2; } -function F4(F4A1, F4A2) { return F4A1 + F4A2; } -var L1 = function () { return 0; }; -var L2 = function (L2A1) { return L2A1; }; +function F4(F4A1, F4A2) { + return F4A1 + F4A2; +} +var L1 = function () { + return 0; +}; +var L2 = function (L2A1) { + return L2A1; +}; var L3 = function (L3A1, L3A2) { if (L3A1 === void 0) { L3A1 = 0; } if (L3A2 === void 0) { L3A2 = L3A1; } return L3A1 + L3A2; }; -var L4 = function (L4A1, L4A2) { return L4A1 + L4A2; }; +var L4 = function (L4A1, L4A2) { + return L4A1 + L4A2; +}; var c1o1 = new C1(5); var i1o1 = new C1(5); // Valid @@ -246,6 +264,17 @@ function fnOpt1(id, children, expectedPath, isRoot) { if (children === void 0) { children = []; } if (expectedPath === void 0) { expectedPath = []; } } -function fnOpt2(id, children, expectedPath, isRoot) { } -fnOpt1(1, [2, 3], [1], true); -fnOpt2(1, [2, 3], [1], true); +function fnOpt2(id, children, expectedPath, isRoot) { +} +fnOpt1(1, [ + 2, + 3 +], [ + 1 +], true); +fnOpt2(1, [ + 2, + 3 +], [ + 1 +], true); diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index cfdfce368d0..0a094c6534c 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -17,7 +17,8 @@ var __extends = this.__extends || function (d, b) { var Z = (function () { function Z() { } - Z.prototype.func = function () { }; + Z.prototype.func = function () { + }; return Z; })(); var Y = (function (_super) { @@ -25,6 +26,7 @@ var Y = (function (_super) { function Y() { _super.apply(this, arguments); } - Y.prototype.func = function (value) { }; + Y.prototype.func = function (value) { + }; return Y; })(Z); diff --git a/tests/baselines/reference/optionalPropertiesTest.js b/tests/baselines/reference/optionalPropertiesTest.js index 617db8d6185..3c68b90fdd8 100644 --- a/tests/baselines/reference/optionalPropertiesTest.js +++ b/tests/baselines/reference/optionalPropertiesTest.js @@ -43,10 +43,21 @@ test10_1 = test10_2; //// [optionalPropertiesTest.js] var x; var foo; -foo = { id: 1234 }; // Ok -foo = { id: 1234, name: "test" }; // Ok -foo = { name: "test" }; // Error, id missing -foo = { id: 1234, print: function () { } }; // Ok +foo = { + id: 1234 +}; // Ok +foo = { + id: 1234, + name: "test" +}; // Ok +foo = { + name: "test" +}; // Error, id missing +foo = { + id: 1234, + print: function () { + } +}; // Ok var s = foo.name || "default"; if (foo.print !== undefined) foo.print(); @@ -58,11 +69,21 @@ var test1 = {}; var test2 = {}; var test3 = {}; var test4 = {}; -var test5 = { M: function () { } }; -var test6 = { M: 5 }; -var test7 = { M: function () { } }; +var test5 = { + M: function () { + } +}; +var test6 = { + M: 5 +}; +var test7 = { + M: function () { + } +}; test7 = {}; -var test8 = { M: 5 }; +var test8 = { + M: 5 +}; test8 = {}; var test9_1; var test9_2; diff --git a/tests/baselines/reference/optionalSetterParam.js b/tests/baselines/reference/optionalSetterParam.js index 1632f33be9f..4b9b7f01360 100644 --- a/tests/baselines/reference/optionalSetterParam.js +++ b/tests/baselines/reference/optionalSetterParam.js @@ -10,7 +10,8 @@ var foo = (function () { function foo() { } Object.defineProperty(foo.prototype, "bar", { - set: function (param) { }, + set: function (param) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.js b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.js index 9a04ea28fba..66129a5d0be 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.js +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.js @@ -27,7 +27,13 @@ w({ s: "", n: 0 }).toLowerCase(); //// [orderMattersForSignatureGroupIdentity.js] var v; var v; -v({ s: "", n: 0 }).toLowerCase(); +v({ + s: "", + n: 0 +}).toLowerCase(); var w; var w; -w({ s: "", n: 0 }).toLowerCase(); +w({ + s: "", + n: 0 +}).toLowerCase(); diff --git a/tests/baselines/reference/overEagerReturnTypeSpecialization.js b/tests/baselines/reference/overEagerReturnTypeSpecialization.js index 90fcc388b76..3d91a6f2fa6 100644 --- a/tests/baselines/reference/overEagerReturnTypeSpecialization.js +++ b/tests/baselines/reference/overEagerReturnTypeSpecialization.js @@ -16,7 +16,15 @@ var r2: I1 = v1.func(num => num.toString()) // Correctly returns an I1 - .func(function (str) { return str.length; }); // should error -var r2 = v1.func(function (num) { return num.toString(); }) // Correctly returns an I1 - .func(function (str) { return str.length; }); // should be ok +var r1 = v1.func(function (num) { + return num.toString(); +}) // Correctly returns an I1 +.func(function (str) { + return str.length; +}); // should error +var r2 = v1.func(function (num) { + return num.toString(); +}) // Correctly returns an I1 +.func(function (str) { + return str.length; +}); // should be ok diff --git a/tests/baselines/reference/overloadAssignmentCompat.js b/tests/baselines/reference/overloadAssignmentCompat.js index 2d4bd931844..f6767f6f33e 100644 --- a/tests/baselines/reference/overloadAssignmentCompat.js +++ b/tests/baselines/reference/overloadAssignmentCompat.js @@ -65,5 +65,7 @@ function attr2(nameOrMap, value) { return "s"; } } -function foo() { return "a"; } +function foo() { + return "a"; +} ; diff --git a/tests/baselines/reference/overloadCallTest.js b/tests/baselines/reference/overloadCallTest.js index 38930b7aea3..f7eb97fc9eb 100644 --- a/tests/baselines/reference/overloadCallTest.js +++ b/tests/baselines/reference/overloadCallTest.js @@ -18,7 +18,9 @@ class foo { //// [overloadCallTest.js] var foo = (function () { function foo() { - function bar(foo) { return "foo"; } + function bar(foo) { + return "foo"; + } ; var test = bar("test"); var goo = bar(); diff --git a/tests/baselines/reference/overloadModifiersMustAgree.js b/tests/baselines/reference/overloadModifiersMustAgree.js index 3f9f7eb1415..8cb537c4410 100644 --- a/tests/baselines/reference/overloadModifiersMustAgree.js +++ b/tests/baselines/reference/overloadModifiersMustAgree.js @@ -19,7 +19,9 @@ interface I { var baz = (function () { function baz() { } - baz.prototype.foo = function (bar) { }; // error - access modifiers do not agree + baz.prototype.foo = function (bar) { + }; // error - access modifiers do not agree return baz; })(); -function bar(s) { } +function bar(s) { +} diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index eb613586118..a59ca2ceda1 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -32,7 +32,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -40,7 +41,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -48,7 +50,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -56,7 +59,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); var D = (function () { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index 25759d0a839..071b9372636 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -35,7 +35,8 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 5980c852f41..961411bf6e5 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -37,7 +37,8 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index b2ae1125750..5192afc35a2 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -45,7 +45,8 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js index 9bd8ca3a274..4ef71de6d3b 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js @@ -6,4 +6,7 @@ interface I { var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error //// [overloadOnConstInObjectLiteralImplementingAnInterface.js] -var i2 = { x1: function (a, cb) { } }; // error +var i2 = { + x1: function (a, cb) { + } +}; // error diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.js b/tests/baselines/reference/overloadOnConstNoAnyImplementation.js index 0c2f330b5ed..a17acae9354 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.js +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.js @@ -24,7 +24,13 @@ function x1(a, cb) { cb('uh'); cb(1); // error } -var cb = function (x) { return 1; }; +var cb = function (x) { + return 1; +}; x1(1, cb); -x1(1, function (x) { return 1; }); // error -x1(1, function (x) { return 1; }); +x1(1, function (x) { + return 1; +}); // error +x1(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js index 52f6639e352..6c66c23f1f8 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.js @@ -35,7 +35,15 @@ var C = (function () { return C; })(); var c; -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js index 980dfcb2145..33cc9c81b2c 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js @@ -9,6 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype.x1 = function (a) { }; + C.prototype.x1 = function (a) { + }; return C; })(); diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation.js b/tests/baselines/reference/overloadOnConstNoStringImplementation.js index 65fd6d07567..1fbf18d854d 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation.js +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation.js @@ -24,7 +24,13 @@ function x2(a, cb) { cb('uh'); cb(1); } -var cb = function (x) { return 1; }; +var cb = function (x) { + return 1; +}; x2(1, cb); // error -x2(1, function (x) { return 1; }); // error -x2(1, function (x) { return 1; }); +x2(1, function (x) { + return 1; +}); // error +x2(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadOnConstNoStringImplementation2.js b/tests/baselines/reference/overloadOnConstNoStringImplementation2.js index 71d7a4e4a3f..f51f84acb2a 100644 --- a/tests/baselines/reference/overloadOnConstNoStringImplementation2.js +++ b/tests/baselines/reference/overloadOnConstNoStringImplementation2.js @@ -34,7 +34,15 @@ var C = (function () { return C; })(); var c; -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); -c.x1(1, function (x) { return 1; }); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); +c.x1(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index cf9bc526b51..f4037c3f668 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -21,7 +21,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -29,7 +30,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -37,7 +39,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -45,7 +48,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); function foo(name) { diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index 1ee5e077c08..db042846c77 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -127,12 +127,16 @@ var SomeDerived3 = (function (_super) { } return SomeDerived3; })(SomeBase); -function fn1() { return null; } +function fn1() { + return null; +} var s = fn1(undefined); var s; // No candidate overloads found fn1({}); // Error -function fn2() { return undefined; } +function fn2() { + return undefined; +} var d = fn2(0, undefined); var d; // Generic and non - generic overload where generic overload is the only candidate when called without type arguments @@ -141,7 +145,9 @@ var s = fn2(0, ''); fn2('', 0); // Error // Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments fn2('', 0); // OK -function fn3() { return null; } +function fn3() { + return null; +} var s = fn3(3); var s = fn3('', 3, ''); var n = fn3(5, 5, 5); @@ -152,7 +158,8 @@ var s = fn3('', '', ''); var n = fn3('', '', 3); // Generic overloads with differing arity called with type argument count that doesn't match any overload fn3(); // Error -function fn4() { } +function fn4() { +} fn4('', 3); fn4(3, ''); // Error fn4('', 3); // Error @@ -167,6 +174,12 @@ fn4(null, null); // Error // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4(true, null); // Error fn4(null, true); // Error -function fn5() { return undefined; } -var n = fn5(function (n) { return n.toFixed(); }); -var s = fn5(function (n) { return n.substr(0); }); +function fn5() { + return undefined; +} +var n = fn5(function (n) { + return n.toFixed(); +}); +var s = fn5(function (n) { + return n.substr(0); +}); diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.js b/tests/baselines/reference/overloadResolutionClassConstructors.js index 2571a0e02db..8b4e4316faf 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.js +++ b/tests/baselines/reference/overloadResolutionClassConstructors.js @@ -198,6 +198,12 @@ var fn5 = (function () { } return fn5; })(); -new fn5(function (n) { return n.toFixed(); }); -new fn5(function (n) { return n.substr(0); }); -new fn5(function (n) { return n.blah; }); // Error +new fn5(function (n) { + return n.toFixed(); +}); +new fn5(function (n) { + return n.substr(0); +}); +new fn5(function (n) { + return n.blah; +}); // Error diff --git a/tests/baselines/reference/overloadResolutionConstructors.js b/tests/baselines/reference/overloadResolutionConstructors.js index 9e10215b1cb..39670160759 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.js +++ b/tests/baselines/reference/overloadResolutionConstructors.js @@ -177,5 +177,9 @@ new fn4(null, null); // Error new fn4(true, null); // Error new fn4(null, true); // Error var fn5; -var n = new fn5(function (n) { return n.toFixed(); }); -var s = new fn5(function (n) { return n.substr(0); }); +var n = new fn5(function (n) { + return n.toFixed(); +}); +var s = new fn5(function (n) { + return n.substr(0); +}); diff --git a/tests/baselines/reference/overloadResolutionOverCTLambda.js b/tests/baselines/reference/overloadResolutionOverCTLambda.js index 18ad08c9c82..84e8bb56ec7 100644 --- a/tests/baselines/reference/overloadResolutionOverCTLambda.js +++ b/tests/baselines/reference/overloadResolutionOverCTLambda.js @@ -3,5 +3,8 @@ function foo(b: (item: number) => boolean) { } foo(a => a); // can not convert (number)=>bool to (number)=>number //// [overloadResolutionOverCTLambda.js] -function foo(b) { } -foo(function (a) { return a; }); // can not convert (number)=>bool to (number)=>number +function foo(b) { +} +foo(function (a) { + return a; +}); // can not convert (number)=>bool to (number)=>number diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js index 170f2dd2137..86e84ced58f 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.js @@ -43,14 +43,18 @@ var Bugs; rest[_i - 1] = arguments[_i]; } var index = rest[0]; - return typeof args[index] !== 'undefined' - ? args[index] - : match; + return typeof args[index] !== 'undefined' ? args[index] : match; }); return result; } })(Bugs || (Bugs = {})); -function bug3(f) { return f("s"); } -function fprime(x) { return x; } +function bug3(f) { + return f("s"); +} +function fprime(x) { + return x; +} bug3(fprime); -bug3(function (x) { return x; }); +bug3(function (x) { + return x; +}); diff --git a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js index cf125bebbf5..e2b11529c36 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js +++ b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.js @@ -26,7 +26,17 @@ var Bugs; (function (Bugs) { function bug3() { var tokens = []; - tokens.push({ startIndex: 1, type: '', bracket: 3 }); - tokens.push(({ startIndex: 1, type: '', bracket: 3, state: null, length: 10 })); + tokens.push({ + startIndex: 1, + type: '', + bracket: 3 + }); + tokens.push(({ + startIndex: 1, + type: '', + bracket: 3, + state: null, + length: 10 + })); } })(Bugs || (Bugs = {})); diff --git a/tests/baselines/reference/overloadResolutionTest1.js b/tests/baselines/reference/overloadResolutionTest1.js index 60b99ebf7b9..2d813e6effe 100644 --- a/tests/baselines/reference/overloadResolutionTest1.js +++ b/tests/baselines/reference/overloadResolutionTest1.js @@ -26,17 +26,47 @@ function foo4(bar:{a:any;}):any{ return bar }; var x = foo4({a:true}); // error //// [overloadResolutionTest1.js] -function foo(bar) { return bar; } +function foo(bar) { + return bar; +} ; -var x1 = foo([{ a: true }]); // works -var x11 = foo([{ a: 0 }]); // works -var x111 = foo([{ a: "s" }]); // error - does not match any signature -var x1111 = foo([{ a: null }]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string -function foo2(bar) { return bar; } +var x1 = foo([ + { + a: true + } +]); // works +var x11 = foo([ + { + a: 0 + } +]); // works +var x111 = foo([ + { + a: "s" + } +]); // error - does not match any signature +var x1111 = foo([ + { + a: null + } +]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string +function foo2(bar) { + return bar; +} ; -var x2 = foo2({ a: 0 }); // works -var x3 = foo2({ a: true }); // works -var x4 = foo2({ a: "s" }); // error -function foo4(bar) { return bar; } +var x2 = foo2({ + a: 0 +}); // works +var x3 = foo2({ + a: true +}); // works +var x4 = foo2({ + a: "s" +}); // error +function foo4(bar) { + return bar; +} ; -var x = foo4({ a: true }); // error +var x = foo4({ + a: true +}); // error diff --git a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js index 03063855267..0a1a87091c1 100644 --- a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js +++ b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js @@ -7,6 +7,11 @@ x2((x) => 1 ); //// [overloadWithCallbacksWithDifferingOptionalityOnArgs.js] -function x2(callback) { } -x2(function () { return 1; }); -x2(function (x) { return 1; }); +function x2(callback) { +} +x2(function () { + return 1; +}); +x2(function (x) { + return 1; +}); diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index 7ebeeb2890f..e325e7ad8c0 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -35,7 +35,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -43,7 +44,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -51,7 +53,8 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { }; + Derived2.prototype.baz = function () { + }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -59,7 +62,8 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { }; + Derived3.prototype.biz = function () { + }; return Derived3; })(Base); var d2; diff --git a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js index 591826725b1..7e926a6250a 100644 --- a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js +++ b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js @@ -10,5 +10,6 @@ function boo() { test(); test(name, string); test(name ? : any); - { } + { + } } diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js index 63b4a2b1e93..1eff021f569 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.js @@ -28,8 +28,12 @@ var G = (function () { } return G; })(); -var result = foo(function (x) { return new G(x); }); // x has type D, new G(x) fails, so first overload is picked. -var result2 = foo(function (x) { return new G(x); }); // x has type D, new G(x) fails, so first overload is picked. +var result = foo(function (x) { + return new G(x); +}); // x has type D, new G(x) fails, so first overload is picked. +var result2 = foo(function (x) { + return new G(x); +}); // x has type D, new G(x) fails, so first overload is picked. var result3 = foo(function (x) { var y; // error that D does not satisfy constraint, y is of type G, entire call to foo is an error return y; diff --git a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js index 42c371dd218..4d0ac15c717 100644 --- a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js +++ b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js @@ -11,6 +11,7 @@ module M { //// [overloadsInDifferentContainersDisagreeOnAmbient.js] var M; (function (M) { - function f() { } + function f() { + } M.f = f; })(M || (M = {})); diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.js b/tests/baselines/reference/overloadsWithProvisionalErrors.js index c7fb4785d09..f684f1b12a9 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.js +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.js @@ -10,6 +10,17 @@ func(s => ({ a: blah })); // Two errors here, one for blah not being defined, an //// [overloadsWithProvisionalErrors.js] var func; -func(function (s) { return ({}); }); // Error for no applicable overload (object type is missing a and b) -func(function (s) { return ({ a: blah, b: 3 }); }); // Only error inside the function, but not outside (since it would be applicable if not for the provisional error) -func(function (s) { return ({ a: blah }); }); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway +func(function (s) { + return ({}); +}); // Error for no applicable overload (object type is missing a and b) +func(function (s) { + return ({ + a: blah, + b: 3 + }); +}); // Only error inside the function, but not outside (since it would be applicable if not for the provisional error) +func(function (s) { + return ({ + a: blah + }); +}); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway diff --git a/tests/baselines/reference/overloadsWithinClasses.js b/tests/baselines/reference/overloadsWithinClasses.js index 4ac612502c7..79f3c332be5 100644 --- a/tests/baselines/reference/overloadsWithinClasses.js +++ b/tests/baselines/reference/overloadsWithinClasses.js @@ -27,14 +27,17 @@ class X { var foo = (function () { function foo() { } - foo.fnOverload = function () { }; - foo.fnOverload = function (foo) { }; // error + foo.fnOverload = function () { + }; + foo.fnOverload = function (foo) { + }; // error return foo; })(); var bar = (function () { function bar() { } - bar.fnOverload = function (foo) { }; // no error + bar.fnOverload = function (foo) { + }; // no error return bar; })(); var X = (function () { diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing.js b/tests/baselines/reference/parameterInitializersForwardReferencing.js index 188a104f3af..61b116980ae 100644 --- a/tests/baselines/reference/parameterInitializersForwardReferencing.js +++ b/tests/baselines/reference/parameterInitializersForwardReferencing.js @@ -74,11 +74,17 @@ function outside() { } } function defaultArgFunction(a, b) { - if (a === void 0) { a = function () { return b; }; } + if (a === void 0) { a = function () { + return b; + }; } if (b === void 0) { b = 1; } } function defaultArgArrow(a, b) { - if (a === void 0) { a = function () { return function () { return b; }; }; } + if (a === void 0) { a = function () { + return function () { + return b; + }; + }; } if (b === void 0) { b = 3; } } var C = (function () { @@ -101,6 +107,8 @@ var x = function (a, b, c) { }; // Should not produce errors - can reference later parameters if they occur within a function expression initializer. function f(a, b, c) { - if (b === void 0) { b = function () { return c; }; } + if (b === void 0) { b = function () { + return c; + }; } if (c === void 0) { c = b(); } } diff --git a/tests/baselines/reference/parametersWithNoAnnotationAreAny.js b/tests/baselines/reference/parametersWithNoAnnotationAreAny.js index a8d06125d25..d0b48460649 100644 --- a/tests/baselines/reference/parametersWithNoAnnotationAreAny.js +++ b/tests/baselines/reference/parametersWithNoAnnotationAreAny.js @@ -30,10 +30,18 @@ var b = { } //// [parametersWithNoAnnotationAreAny.js] -function foo(x) { return x; } -var f = function foo(x) { return x; }; -var f2 = function (x) { return x; }; -var f3 = function (x) { return x; }; +function foo(x) { + return x; +} +var f = function foo(x) { + return x; +}; +var f2 = function (x) { + return x; +}; +var f3 = function (x) { + return x; +}; var C = (function () { function C() { } @@ -50,5 +58,7 @@ var b = { a: function foo(x) { return x; }, - b: function (x) { return x; } + b: function (x) { + return x; + } }; diff --git a/tests/baselines/reference/parenthesizedContexualTyping1.js b/tests/baselines/reference/parenthesizedContexualTyping1.js index 2f1e9ff62fc..cd3a2937395 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping1.js +++ b/tests/baselines/reference/parenthesizedContexualTyping1.js @@ -33,20 +33,82 @@ var obj2: ObjType = ({ x: x => (x, undefined), y: y => (y, undefined) }); function fun(g, x) { return g(x); } -var a = fun(function (x) { return x; }, 10); -var b = fun((function (x) { return x; }), 10); -var c = fun(((function (x) { return x; })), 10); -var d = fun((((function (x) { return x; }))), 10); -var e = fun(function (x) { return x; }, function (x) { return x; }, 10); -var f = fun((function (x) { return x; }), (function (x) { return x; }), 10); -var g = fun(((function (x) { return x; })), ((function (x) { return x; })), 10); -var h = fun((((function (x) { return x; }))), ((function (x) { return x; })), 10); +var a = fun(function (x) { + return x; +}, 10); +var b = fun((function (x) { + return x; +}), 10); +var c = fun(((function (x) { + return x; +})), 10); +var d = fun((((function (x) { + return x; +}))), 10); +var e = fun(function (x) { + return x; +}, function (x) { + return x; +}, 10); +var f = fun((function (x) { + return x; +}), (function (x) { + return x; +}), 10); +var g = fun(((function (x) { + return x; +})), ((function (x) { + return x; +})), 10); +var h = fun((((function (x) { + return x; +}))), ((function (x) { + return x; +})), 10); // Ternaries in parens -var i = fun((Math.random() < 0.5 ? function (x) { return x; } : function (x) { return undefined; }), 10); -var j = fun((Math.random() < 0.5 ? (function (x) { return x; }) : (function (x) { return undefined; })), 10); -var k = fun((Math.random() < 0.5 ? (function (x) { return x; }) : (function (x) { return undefined; })), function (x) { return x; }, 10); -var l = fun(((Math.random() < 0.5 ? ((function (x) { return x; })) : ((function (x) { return undefined; })))), ((function (x) { return x; })), 10); -var lambda1 = function (x) { return x; }; -var lambda2 = (function (x) { return x; }); -var obj1 = { x: function (x) { return (x, undefined); }, y: function (y) { return (y, undefined); } }; -var obj2 = ({ x: function (x) { return (x, undefined); }, y: function (y) { return (y, undefined); } }); +var i = fun((Math.random() < 0.5 ? function (x) { + return x; +} : function (x) { + return undefined; +}), 10); +var j = fun((Math.random() < 0.5 ? (function (x) { + return x; +}) : (function (x) { + return undefined; +})), 10); +var k = fun((Math.random() < 0.5 ? (function (x) { + return x; +}) : (function (x) { + return undefined; +})), function (x) { + return x; +}, 10); +var l = fun(((Math.random() < 0.5 ? ((function (x) { + return x; +})) : ((function (x) { + return undefined; +})))), ((function (x) { + return x; +})), 10); +var lambda1 = function (x) { + return x; +}; +var lambda2 = (function (x) { + return x; +}); +var obj1 = { + x: function (x) { + return (x, undefined); + }, + y: function (y) { + return (y, undefined); + } +}; +var obj2 = ({ + x: function (x) { + return (x, undefined); + }, + y: function (y) { + return (y, undefined); + } +}); diff --git a/tests/baselines/reference/parenthesizedContexualTyping2.js b/tests/baselines/reference/parenthesizedContexualTyping2.js index 993a10ba49c..68aa28386e9 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping2.js +++ b/tests/baselines/reference/parenthesizedContexualTyping2.js @@ -49,20 +49,102 @@ function fun() { } return undefined; } -var a = fun(function (x) { x(undefined); return x; }, 10); -var b = fun((function (x) { x(undefined); return x; }), 10); -var c = fun(((function (x) { x(undefined); return x; })), 10); -var d = fun((((function (x) { x(undefined); return x; }))), 10); -var e = fun(function (x) { x(undefined); return x; }, function (x) { x(undefined); return x; }, 10); -var f = fun((function (x) { x(undefined); return x; }), (function (x) { x(undefined); return x; }), 10); -var g = fun(((function (x) { x(undefined); return x; })), ((function (x) { x(undefined); return x; })), 10); -var h = fun((((function (x) { x(undefined); return x; }))), ((function (x) { x(undefined); return x; })), 10); +var a = fun(function (x) { + x(undefined); + return x; +}, 10); +var b = fun((function (x) { + x(undefined); + return x; +}), 10); +var c = fun(((function (x) { + x(undefined); + return x; +})), 10); +var d = fun((((function (x) { + x(undefined); + return x; +}))), 10); +var e = fun(function (x) { + x(undefined); + return x; +}, function (x) { + x(undefined); + return x; +}, 10); +var f = fun((function (x) { + x(undefined); + return x; +}), (function (x) { + x(undefined); + return x; +}), 10); +var g = fun(((function (x) { + x(undefined); + return x; +})), ((function (x) { + x(undefined); + return x; +})), 10); +var h = fun((((function (x) { + x(undefined); + return x; +}))), ((function (x) { + x(undefined); + return x; +})), 10); // Ternaries in parens -var i = fun((Math.random() < 0.5 ? function (x) { x(undefined); return x; } : function (x) { return undefined; }), 10); -var j = fun((Math.random() < 0.5 ? (function (x) { x(undefined); return x; }) : (function (x) { return undefined; })), 10); -var k = fun((Math.random() < 0.5 ? (function (x) { x(undefined); return x; }) : (function (x) { return undefined; })), function (x) { x(undefined); return x; }, 10); -var l = fun(((Math.random() < 0.5 ? ((function (x) { x(undefined); return x; })) : ((function (x) { return undefined; })))), ((function (x) { x(undefined); return x; })), 10); -var lambda1 = function (x) { x(undefined); return x; }; -var lambda2 = (function (x) { x(undefined); return x; }); -var obj1 = { x: function (x) { return (x, undefined); }, y: function (y) { return (y, undefined); } }; -var obj2 = ({ x: function (x) { return (x, undefined); }, y: function (y) { return (y, undefined); } }); +var i = fun((Math.random() < 0.5 ? function (x) { + x(undefined); + return x; +} : function (x) { + return undefined; +}), 10); +var j = fun((Math.random() < 0.5 ? (function (x) { + x(undefined); + return x; +}) : (function (x) { + return undefined; +})), 10); +var k = fun((Math.random() < 0.5 ? (function (x) { + x(undefined); + return x; +}) : (function (x) { + return undefined; +})), function (x) { + x(undefined); + return x; +}, 10); +var l = fun(((Math.random() < 0.5 ? ((function (x) { + x(undefined); + return x; +})) : ((function (x) { + return undefined; +})))), ((function (x) { + x(undefined); + return x; +})), 10); +var lambda1 = function (x) { + x(undefined); + return x; +}; +var lambda2 = (function (x) { + x(undefined); + return x; +}); +var obj1 = { + x: function (x) { + return (x, undefined); + }, + y: function (y) { + return (y, undefined); + } +}; +var obj2 = ({ + x: function (x) { + return (x, undefined); + }, + y: function (y) { + return (y, undefined); + } +}); diff --git a/tests/baselines/reference/parse1.js b/tests/baselines/reference/parse1.js index 4804e31adcd..08af81bda17 100644 --- a/tests/baselines/reference/parse1.js +++ b/tests/baselines/reference/parse1.js @@ -8,6 +8,5 @@ function foo() { //// [parse1.js] var bar = 42; function foo() { - bar. - ; + bar.; } diff --git a/tests/baselines/reference/parseTypes.js b/tests/baselines/reference/parseTypes.js index 08cc9f2a6bd..193533de04a 100644 --- a/tests/baselines/reference/parseTypes.js +++ b/tests/baselines/reference/parseTypes.js @@ -18,9 +18,13 @@ var x = null; var y = null; var z = null; var w = null; -function f() { return 3; } +function f() { + return 3; +} ; -function g(s) { true; } +function g(s) { + true; +} ; y = f; y = g; diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.js b/tests/baselines/reference/parser15.4.4.14-9-2.js index 0f533cd9a26..e9a29e7eead 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.js +++ b/tests/baselines/reference/parser15.4.4.14-9-2.js @@ -37,14 +37,15 @@ runTestCase(testcase); * @description Array.prototype.indexOf must return correct index (Number) */ function testcase() { - var obj = { toString: function () { return 0; } }; + var obj = { + toString: function () { + return 0; + } + }; var one = 1; var _float = -(4 / 3); var a = new Array(false, undefined, null, "0", obj, -1.3333333333333, "str", -0, true, +0, one, 1, 0, false, _float, -(4 / 3)); - if (a.indexOf(-(4 / 3)) === 14 && - a.indexOf(0) === 7 && - a.indexOf(-0) === 7 && - a.indexOf(1) === 10) { + if (a.indexOf(-(4 / 3)) === 14 && a.indexOf(0) === 7 && a.indexOf(-0) === 7 && a.indexOf(1) === 10) { return true; } } diff --git a/tests/baselines/reference/parser509667.js b/tests/baselines/reference/parser509667.js index 0938613b295..21e0bc55ce4 100644 --- a/tests/baselines/reference/parser509667.js +++ b/tests/baselines/reference/parser509667.js @@ -16,8 +16,7 @@ var Foo = (function () { function Foo() { } Foo.prototype.f1 = function () { - if (this. - ) + if (this.) ; }; Foo.prototype.f2 = function () { diff --git a/tests/baselines/reference/parser509669.js b/tests/baselines/reference/parser509669.js index 3fa4cf696c0..e4ce2b90312 100644 --- a/tests/baselines/reference/parser509669.js +++ b/tests/baselines/reference/parser509669.js @@ -5,5 +5,6 @@ function foo():any { //// [parser509669.js] function foo() { - return function () { }; + return function () { + }; } diff --git a/tests/baselines/reference/parser512097.js b/tests/baselines/reference/parser512097.js index ce73dadf3bc..c495e68c847 100644 --- a/tests/baselines/reference/parser512097.js +++ b/tests/baselines/reference/parser512097.js @@ -5,6 +5,8 @@ if (true) { } //// [parser512097.js] -var tt = { aa: }; // After this point, no useful parsing occurs in the entire file +var tt = { + aa: +}; // After this point, no useful parsing occurs in the entire file if (true) { } diff --git a/tests/baselines/reference/parser521128.js b/tests/baselines/reference/parser521128.js index 2471f740d77..e16cbad6c33 100644 --- a/tests/baselines/reference/parser521128.js +++ b/tests/baselines/reference/parser521128.js @@ -3,4 +3,5 @@ module.module { } //// [parser521128.js] module.module; -{ } +{ +} diff --git a/tests/baselines/reference/parser536727.js b/tests/baselines/reference/parser536727.js index fe086d8d3be..39b0d66f6c8 100644 --- a/tests/baselines/reference/parser536727.js +++ b/tests/baselines/reference/parser536727.js @@ -13,8 +13,14 @@ foo(x); function foo(f) { return f(""); } -var g = function (x) { return x + "blah"; }; -var x = function () { return g; }; +var g = function (x) { + return x + "blah"; +}; +var x = function () { + return g; +}; foo(g); -foo(function () { return g; }); +foo(function () { + return g; +}); foo(x); diff --git a/tests/baselines/reference/parser553699.js b/tests/baselines/reference/parser553699.js index 8570780e74a..f245ecc3446 100644 --- a/tests/baselines/reference/parser553699.js +++ b/tests/baselines/reference/parser553699.js @@ -12,7 +12,8 @@ class Bar { var Foo = (function () { function Foo() { } - Foo.prototype.banana = function (x) { }; + Foo.prototype.banana = function (x) { + }; return Foo; })(); var Bar = (function () { diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic10.js b/tests/baselines/reference/parserAccessibilityAfterStatic10.js index 6756a57ce7e..feded66fe95 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic10.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic10.js @@ -9,6 +9,7 @@ static public intI() {} var Outer = (function () { function Outer() { } - Outer.intI = function () { }; + Outer.intI = function () { + }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic11.js b/tests/baselines/reference/parserAccessibilityAfterStatic11.js index 8b16153b797..094202014a1 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic11.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic11.js @@ -9,6 +9,7 @@ static public() {} var Outer = (function () { function Outer() { } - Outer.public = function () { }; + Outer.public = function () { + }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic14.js b/tests/baselines/reference/parserAccessibilityAfterStatic14.js index 4455936a859..b2a6be7464c 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic14.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic14.js @@ -9,6 +9,7 @@ static public() {} var Outer = (function () { function Outer() { } - Outer.public = function () { }; + Outer.public = function () { + }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic7.js b/tests/baselines/reference/parserAccessibilityAfterStatic7.js index 2d94be8ea50..a2bc5c7fba3 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic7.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic7.js @@ -9,6 +9,7 @@ static public intI() {} var Outer = (function () { function Outer() { } - Outer.intI = function () { }; + Outer.intI = function () { + }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessors1.js b/tests/baselines/reference/parserAccessors1.js index 6b47a46ede1..b4cc809e7b2 100644 --- a/tests/baselines/reference/parserAccessors1.js +++ b/tests/baselines/reference/parserAccessors1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserAccessors10.js b/tests/baselines/reference/parserAccessors10.js index d5d7e89a7d0..f1bed41edee 100644 --- a/tests/baselines/reference/parserAccessors10.js +++ b/tests/baselines/reference/parserAccessors10.js @@ -5,5 +5,6 @@ var v = { //// [parserAccessors10.js] var v = { - get foo() { } + get foo() { + } }; diff --git a/tests/baselines/reference/parserAccessors2.js b/tests/baselines/reference/parserAccessors2.js index 482daa74a64..71cbd6f466b 100644 --- a/tests/baselines/reference/parserAccessors2.js +++ b/tests/baselines/reference/parserAccessors2.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserAccessors3.js b/tests/baselines/reference/parserAccessors3.js index 287f607725a..f5f9c43fb4f 100644 --- a/tests/baselines/reference/parserAccessors3.js +++ b/tests/baselines/reference/parserAccessors3.js @@ -2,4 +2,7 @@ var v = { get Foo() { } }; //// [parserAccessors3.js] -var v = { get Foo() { } }; +var v = { + get Foo() { + } +}; diff --git a/tests/baselines/reference/parserAccessors4.js b/tests/baselines/reference/parserAccessors4.js index 0716078a8c8..24ee1bbcdcd 100644 --- a/tests/baselines/reference/parserAccessors4.js +++ b/tests/baselines/reference/parserAccessors4.js @@ -2,4 +2,7 @@ var v = { set Foo(a) { } }; //// [parserAccessors4.js] -var v = { set Foo(a) { } }; +var v = { + set Foo(a) { + } +}; diff --git a/tests/baselines/reference/parserAccessors7.js b/tests/baselines/reference/parserAccessors7.js index 4b7f2d55860..be3802979b6 100644 --- a/tests/baselines/reference/parserAccessors7.js +++ b/tests/baselines/reference/parserAccessors7.js @@ -2,4 +2,7 @@ var v = { get foo(v: number) { } }; //// [parserAccessors7.js] -var v = { get foo(v) { } }; +var v = { + get foo(v) { + } +}; diff --git a/tests/baselines/reference/parserAccessors8.js b/tests/baselines/reference/parserAccessors8.js index 18fb4454071..3bb926521e9 100644 --- a/tests/baselines/reference/parserAccessors8.js +++ b/tests/baselines/reference/parserAccessors8.js @@ -2,4 +2,7 @@ var v = { set foo() { } } //// [parserAccessors8.js] -var v = { set foo() { } }; +var v = { + set foo() { + } +}; diff --git a/tests/baselines/reference/parserAccessors9.js b/tests/baselines/reference/parserAccessors9.js index 448d93a2c01..ad52d9827b3 100644 --- a/tests/baselines/reference/parserAccessors9.js +++ b/tests/baselines/reference/parserAccessors9.js @@ -2,4 +2,7 @@ var v = { set foo(a, b) { } } //// [parserAccessors9.js] -var v = { set foo(a, b) { } }; +var v = { + set foo(a, b) { + } +}; diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js index 6c74814917a..18a1dee3e9f 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js @@ -7,5 +7,6 @@ function f1() { //// [parserAmbiguityWithBinaryOperator1.js] function f1() { var a, b, c; - if (a < b || b > (c + 1)) { } + if (a < b || b > (c + 1)) { + } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js index 6cd6de58d47..9589d57e3af 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js @@ -7,5 +7,6 @@ function f() { //// [parserAmbiguityWithBinaryOperator2.js] function f() { var a, b, c; - if (a < b && b > (c + 1)) { } + if (a < b && b > (c + 1)) { + } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js index e3df2894777..95745263c71 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js @@ -8,5 +8,6 @@ function f() { //// [parserAmbiguityWithBinaryOperator3.js] function f() { var a, b, c; - if (a < b && b < (c + 1)) { } + if (a < b && b < (c + 1)) { + } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js index a6ba380112b..cdcec030ae7 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js @@ -7,5 +7,6 @@ function g() { //// [parserAmbiguityWithBinaryOperator4.js] function g() { var a, b, c; - if (a(c + 1)) { } + if (a(c + 1)) { + } } diff --git a/tests/baselines/reference/parserArrayLiteralExpression10.js b/tests/baselines/reference/parserArrayLiteralExpression10.js index 986d3045dc0..5f49958b862 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression10.js +++ b/tests/baselines/reference/parserArrayLiteralExpression10.js @@ -2,4 +2,7 @@ var v = [1,1,]; //// [parserArrayLiteralExpression10.js] -var v = [1, 1,]; +var v = [ + 1, + 1, +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression11.js b/tests/baselines/reference/parserArrayLiteralExpression11.js index 24ab8968fea..79b4bf35182 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression11.js +++ b/tests/baselines/reference/parserArrayLiteralExpression11.js @@ -2,4 +2,8 @@ var v = [1,,1]; //// [parserArrayLiteralExpression11.js] -var v = [1, , 1]; +var v = [ + 1, + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression12.js b/tests/baselines/reference/parserArrayLiteralExpression12.js index 6795ef29908..1ad1bc40121 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression12.js +++ b/tests/baselines/reference/parserArrayLiteralExpression12.js @@ -2,4 +2,9 @@ var v = [1,,,1]; //// [parserArrayLiteralExpression12.js] -var v = [1, , , 1]; +var v = [ + 1, + , + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression13.js b/tests/baselines/reference/parserArrayLiteralExpression13.js index 504663e5ced..78b08548288 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression13.js +++ b/tests/baselines/reference/parserArrayLiteralExpression13.js @@ -2,4 +2,10 @@ var v = [1,,1,,1]; //// [parserArrayLiteralExpression13.js] -var v = [1, , 1, , 1]; +var v = [ + 1, + , + 1, + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression14.js b/tests/baselines/reference/parserArrayLiteralExpression14.js index eeb13dc53a5..188b9e734ff 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression14.js +++ b/tests/baselines/reference/parserArrayLiteralExpression14.js @@ -2,4 +2,16 @@ var v = [,,1,1,,1,,1,1,,1]; //// [parserArrayLiteralExpression14.js] -var v = [, , 1, 1, , 1, , 1, 1, , 1]; +var v = [ + , + , + 1, + 1, + , + 1, + , + 1, + 1, + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression15.js b/tests/baselines/reference/parserArrayLiteralExpression15.js index 84ab9dac240..4894a874bef 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression15.js +++ b/tests/baselines/reference/parserArrayLiteralExpression15.js @@ -2,4 +2,16 @@ var v = [,,1,1,,1,,1,1,,1,]; //// [parserArrayLiteralExpression15.js] -var v = [, , 1, 1, , 1, , 1, 1, , 1,]; +var v = [ + , + , + 1, + 1, + , + 1, + , + 1, + 1, + , + 1, +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression2.js b/tests/baselines/reference/parserArrayLiteralExpression2.js index 1fb26155eb5..587b4180ec6 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression2.js +++ b/tests/baselines/reference/parserArrayLiteralExpression2.js @@ -2,4 +2,6 @@ var v = [,]; //// [parserArrayLiteralExpression2.js] -var v = [,]; +var v = [ + , +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression3.js b/tests/baselines/reference/parserArrayLiteralExpression3.js index 2d7d19fc2c3..45a9c945ba8 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression3.js +++ b/tests/baselines/reference/parserArrayLiteralExpression3.js @@ -2,4 +2,7 @@ var v = [,,]; //// [parserArrayLiteralExpression3.js] -var v = [, ,]; +var v = [ + , + , +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression4.js b/tests/baselines/reference/parserArrayLiteralExpression4.js index 2287897338e..7a69500ba74 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression4.js +++ b/tests/baselines/reference/parserArrayLiteralExpression4.js @@ -2,4 +2,8 @@ var v = [,,,]; //// [parserArrayLiteralExpression4.js] -var v = [, , ,]; +var v = [ + , + , + , +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression5.js b/tests/baselines/reference/parserArrayLiteralExpression5.js index 43b784b2e5e..1affdb1ac38 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression5.js +++ b/tests/baselines/reference/parserArrayLiteralExpression5.js @@ -2,4 +2,6 @@ var v = [1]; //// [parserArrayLiteralExpression5.js] -var v = [1]; +var v = [ + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression6.js b/tests/baselines/reference/parserArrayLiteralExpression6.js index 28cd901f4ac..b5831c7345e 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression6.js +++ b/tests/baselines/reference/parserArrayLiteralExpression6.js @@ -2,4 +2,7 @@ var v = [,1]; //// [parserArrayLiteralExpression6.js] -var v = [, 1]; +var v = [ + , + 1 +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression7.js b/tests/baselines/reference/parserArrayLiteralExpression7.js index b302e87e352..e10cf021a73 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression7.js +++ b/tests/baselines/reference/parserArrayLiteralExpression7.js @@ -2,4 +2,6 @@ var v = [1,]; //// [parserArrayLiteralExpression7.js] -var v = [1,]; +var v = [ + 1, +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression8.js b/tests/baselines/reference/parserArrayLiteralExpression8.js index 223a86db229..6d8b252521d 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression8.js +++ b/tests/baselines/reference/parserArrayLiteralExpression8.js @@ -2,4 +2,7 @@ var v = [,1,]; //// [parserArrayLiteralExpression8.js] -var v = [, 1,]; +var v = [ + , + 1, +]; diff --git a/tests/baselines/reference/parserArrayLiteralExpression9.js b/tests/baselines/reference/parserArrayLiteralExpression9.js index 5043f522dde..d44d072eb57 100644 --- a/tests/baselines/reference/parserArrayLiteralExpression9.js +++ b/tests/baselines/reference/parserArrayLiteralExpression9.js @@ -2,4 +2,7 @@ var v = [1,1]; //// [parserArrayLiteralExpression9.js] -var v = [1, 1]; +var v = [ + 1, + 1 +]; diff --git a/tests/baselines/reference/parserArrowFunctionExpression1.js b/tests/baselines/reference/parserArrowFunctionExpression1.js index e4ae59fdb99..5ab29fee64c 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression1.js +++ b/tests/baselines/reference/parserArrowFunctionExpression1.js @@ -2,4 +2,5 @@ var v = (public x: string) => { }; //// [parserArrowFunctionExpression1.js] -var v = function (x) { }; +var v = function (x) { +}; diff --git a/tests/baselines/reference/parserArrowFunctionExpression2.js b/tests/baselines/reference/parserArrowFunctionExpression2.js index 9004468ec76..5059cf32182 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression2.js +++ b/tests/baselines/reference/parserArrowFunctionExpression2.js @@ -2,5 +2,6 @@ a = () => { } || a //// [parserArrowFunctionExpression2.js] -a = function () { }; +a = function () { +}; || a; diff --git a/tests/baselines/reference/parserArrowFunctionExpression3.js b/tests/baselines/reference/parserArrowFunctionExpression3.js index 9e6b2706108..68ea230d87b 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression3.js +++ b/tests/baselines/reference/parserArrowFunctionExpression3.js @@ -2,4 +2,5 @@ a = (() => { } || a) //// [parserArrowFunctionExpression3.js] -a = (function () { }) || a; +a = (function () { +}) || a; diff --git a/tests/baselines/reference/parserArrowFunctionExpression4.js b/tests/baselines/reference/parserArrowFunctionExpression4.js index e77a42162cd..53aaee9e6ff 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression4.js +++ b/tests/baselines/reference/parserArrowFunctionExpression4.js @@ -2,4 +2,5 @@ a = (() => { }, a) //// [parserArrowFunctionExpression4.js] -a = (function () { }, a); +a = (function () { +}, a); diff --git a/tests/baselines/reference/parserCastVersusArrowFunction1.js b/tests/baselines/reference/parserCastVersusArrowFunction1.js index df46753b9e4..63a19924d3e 100644 --- a/tests/baselines/reference/parserCastVersusArrowFunction1.js +++ b/tests/baselines/reference/parserCastVersusArrowFunction1.js @@ -11,10 +11,16 @@ var v = (a, b); var v = (a = 1, b = 2); //// [parserCastVersusArrowFunction1.js] -var v = function () { return 1; }; +var v = function () { + return 1; +}; var v = a; -var v = function (a) { return 1; }; -var v = function (a, b) { return 1; }; +var v = function (a) { + return 1; +}; +var v = function (a, b) { + return 1; +}; var v = function (a, b) { if (a === void 0) { a = 1; } if (b === void 0) { b = 2; } diff --git a/tests/baselines/reference/parserClass1.js b/tests/baselines/reference/parserClass1.js index eb1d17566aa..1245da3363f 100644 --- a/tests/baselines/reference/parserClass1.js +++ b/tests/baselines/reference/parserClass1.js @@ -13,11 +13,21 @@ var NullLogger = (function () { function NullLogger() { } - NullLogger.prototype.information = function () { return false; }; - NullLogger.prototype.debug = function () { return false; }; - NullLogger.prototype.warning = function () { return false; }; - NullLogger.prototype.error = function () { return false; }; - NullLogger.prototype.fatal = function () { return false; }; + NullLogger.prototype.information = function () { + return false; + }; + NullLogger.prototype.debug = function () { + return false; + }; + NullLogger.prototype.warning = function () { + return false; + }; + NullLogger.prototype.error = function () { + return false; + }; + NullLogger.prototype.fatal = function () { + return false; + }; NullLogger.prototype.log = function (s) { }; return NullLogger; diff --git a/tests/baselines/reference/parserClassDeclaration11.js b/tests/baselines/reference/parserClassDeclaration11.js index 078d3553a43..80a27d71e6c 100644 --- a/tests/baselines/reference/parserClassDeclaration11.js +++ b/tests/baselines/reference/parserClassDeclaration11.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration13.js b/tests/baselines/reference/parserClassDeclaration13.js index 93ce76fb168..dcb704ae1d3 100644 --- a/tests/baselines/reference/parserClassDeclaration13.js +++ b/tests/baselines/reference/parserClassDeclaration13.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration16.js b/tests/baselines/reference/parserClassDeclaration16.js index a6a92d73afa..7048980597e 100644 --- a/tests/baselines/reference/parserClassDeclaration16.js +++ b/tests/baselines/reference/parserClassDeclaration16.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration19.js b/tests/baselines/reference/parserClassDeclaration19.js index 7900aa4d552..5b77e263ec9 100644 --- a/tests/baselines/reference/parserClassDeclaration19.js +++ b/tests/baselines/reference/parserClassDeclaration19.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype["foo"] = function () { }; + C.prototype["foo"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration20.js b/tests/baselines/reference/parserClassDeclaration20.js index 7c99f2d8ee6..68d97b66bb9 100644 --- a/tests/baselines/reference/parserClassDeclaration20.js +++ b/tests/baselines/reference/parserClassDeclaration20.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype["0"] = function () { }; + C.prototype["0"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration21.js b/tests/baselines/reference/parserClassDeclaration21.js index fa4cef46e0e..248f10e8681 100644 --- a/tests/baselines/reference/parserClassDeclaration21.js +++ b/tests/baselines/reference/parserClassDeclaration21.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype[1] = function () { }; + C.prototype[1] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration22.js b/tests/baselines/reference/parserClassDeclaration22.js index 596f7a4474b..60f708d4835 100644 --- a/tests/baselines/reference/parserClassDeclaration22.js +++ b/tests/baselines/reference/parserClassDeclaration22.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype["bar"] = function () { }; + C.prototype["bar"] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserCommaInTypeMemberList2.js b/tests/baselines/reference/parserCommaInTypeMemberList2.js index fd79326b7b0..9593bdea98f 100644 --- a/tests/baselines/reference/parserCommaInTypeMemberList2.js +++ b/tests/baselines/reference/parserCommaInTypeMemberList2.js @@ -3,4 +3,6 @@ var s = $.extend< { workItem: any }, { workItem: any, width: string }>({ workIte //// [parserCommaInTypeMemberList2.js] -var s = $.extend({ workItem: this._workItem }, {}); +var s = $.extend({ + workItem: this._workItem +}, {}); diff --git a/tests/baselines/reference/parserComputedPropertyName1.js b/tests/baselines/reference/parserComputedPropertyName1.js index ee5b0a22cb6..4a42b2e97e7 100644 --- a/tests/baselines/reference/parserComputedPropertyName1.js +++ b/tests/baselines/reference/parserComputedPropertyName1.js @@ -2,4 +2,6 @@ var v = { [e] }; //// [parserComputedPropertyName1.js] -var v = { [e]: }; +var v = { + [e]: +}; diff --git a/tests/baselines/reference/parserComputedPropertyName12.js b/tests/baselines/reference/parserComputedPropertyName12.js index f879d4166dd..96e62b626e7 100644 --- a/tests/baselines/reference/parserComputedPropertyName12.js +++ b/tests/baselines/reference/parserComputedPropertyName12.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype[e] = function () { }; + C.prototype[e] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserComputedPropertyName17.js b/tests/baselines/reference/parserComputedPropertyName17.js index f1fc4caacb3..cfff46e52fc 100644 --- a/tests/baselines/reference/parserComputedPropertyName17.js +++ b/tests/baselines/reference/parserComputedPropertyName17.js @@ -2,4 +2,7 @@ var v = { set [e](v) { } } //// [parserComputedPropertyName17.js] -var v = { set [e](v) { } }; +var v = { + set [e](v) { + } +}; diff --git a/tests/baselines/reference/parserComputedPropertyName2.js b/tests/baselines/reference/parserComputedPropertyName2.js index f3c41f963f5..ea8532945a1 100644 --- a/tests/baselines/reference/parserComputedPropertyName2.js +++ b/tests/baselines/reference/parserComputedPropertyName2.js @@ -2,4 +2,6 @@ var v = { [e]: 1 }; //// [parserComputedPropertyName2.js] -var v = { [e]: 1 }; +var v = { + [e]: 1 +}; diff --git a/tests/baselines/reference/parserComputedPropertyName24.js b/tests/baselines/reference/parserComputedPropertyName24.js index 13f14f2e466..0b9467fb26d 100644 --- a/tests/baselines/reference/parserComputedPropertyName24.js +++ b/tests/baselines/reference/parserComputedPropertyName24.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, e, { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserComputedPropertyName3.js b/tests/baselines/reference/parserComputedPropertyName3.js index 70273ed501d..b3c8cc27bf8 100644 --- a/tests/baselines/reference/parserComputedPropertyName3.js +++ b/tests/baselines/reference/parserComputedPropertyName3.js @@ -2,4 +2,7 @@ var v = { [e]() { } }; //// [parserComputedPropertyName3.js] -var v = { [e]() { } }; +var v = { + [e]() { + } +}; diff --git a/tests/baselines/reference/parserComputedPropertyName33.js b/tests/baselines/reference/parserComputedPropertyName33.js index 924bb872115..1cc06c06780 100644 --- a/tests/baselines/reference/parserComputedPropertyName33.js +++ b/tests/baselines/reference/parserComputedPropertyName33.js @@ -13,4 +13,5 @@ var C = (function () { } return C; })(); -{ } +{ +} diff --git a/tests/baselines/reference/parserComputedPropertyName38.js b/tests/baselines/reference/parserComputedPropertyName38.js index 6fc40f0802a..487ff4078fd 100644 --- a/tests/baselines/reference/parserComputedPropertyName38.js +++ b/tests/baselines/reference/parserComputedPropertyName38.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype[public] = function () { }; + C.prototype[public] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserComputedPropertyName39.js b/tests/baselines/reference/parserComputedPropertyName39.js index 2849acd0562..c37312f0034 100644 --- a/tests/baselines/reference/parserComputedPropertyName39.js +++ b/tests/baselines/reference/parserComputedPropertyName39.js @@ -11,4 +11,5 @@ var C = (function () { } return C; })(); -(() => { }); +(() => { +}); diff --git a/tests/baselines/reference/parserComputedPropertyName4.js b/tests/baselines/reference/parserComputedPropertyName4.js index e456ca74f93..679733529a3 100644 --- a/tests/baselines/reference/parserComputedPropertyName4.js +++ b/tests/baselines/reference/parserComputedPropertyName4.js @@ -2,4 +2,7 @@ var v = { get [e]() { } }; //// [parserComputedPropertyName4.js] -var v = { get [e]() { } }; +var v = { + get [e]() { + } +}; diff --git a/tests/baselines/reference/parserComputedPropertyName40.js b/tests/baselines/reference/parserComputedPropertyName40.js index dc77466492d..5f6381360fc 100644 --- a/tests/baselines/reference/parserComputedPropertyName40.js +++ b/tests/baselines/reference/parserComputedPropertyName40.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype[a ? "" : ""] = function () { }; + C.prototype[a ? "" : ""] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserComputedPropertyName5.js b/tests/baselines/reference/parserComputedPropertyName5.js index b94acd5523b..956b885bffb 100644 --- a/tests/baselines/reference/parserComputedPropertyName5.js +++ b/tests/baselines/reference/parserComputedPropertyName5.js @@ -2,4 +2,7 @@ var v = { public get [e]() { } }; //// [parserComputedPropertyName5.js] -var v = { get [e]() { } }; +var v = { + get [e]() { + } +}; diff --git a/tests/baselines/reference/parserComputedPropertyName6.js b/tests/baselines/reference/parserComputedPropertyName6.js index b60ad66a9d8..b18bb6ff305 100644 --- a/tests/baselines/reference/parserComputedPropertyName6.js +++ b/tests/baselines/reference/parserComputedPropertyName6.js @@ -2,4 +2,7 @@ var v = { [e]: 1, [e + e]: 2 }; //// [parserComputedPropertyName6.js] -var v = { [e]: 1, [e + e]: 2 }; +var v = { + [e]: 1, + [e + e]: 2 +}; diff --git a/tests/baselines/reference/parserES3Accessors1.js b/tests/baselines/reference/parserES3Accessors1.js index b4d0b9d6576..4900c1f32d9 100644 --- a/tests/baselines/reference/parserES3Accessors1.js +++ b/tests/baselines/reference/parserES3Accessors1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserES3Accessors2.js b/tests/baselines/reference/parserES3Accessors2.js index 3d18e8ac280..08259f2655e 100644 --- a/tests/baselines/reference/parserES3Accessors2.js +++ b/tests/baselines/reference/parserES3Accessors2.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserES3Accessors3.js b/tests/baselines/reference/parserES3Accessors3.js index f623fc546fd..c7dc2e3cea6 100644 --- a/tests/baselines/reference/parserES3Accessors3.js +++ b/tests/baselines/reference/parserES3Accessors3.js @@ -2,4 +2,7 @@ var v = { get Foo() { } }; //// [parserES3Accessors3.js] -var v = { get Foo() { } }; +var v = { + get Foo() { + } +}; diff --git a/tests/baselines/reference/parserES3Accessors4.js b/tests/baselines/reference/parserES3Accessors4.js index 2bc5c9d1f78..9133c29a02a 100644 --- a/tests/baselines/reference/parserES3Accessors4.js +++ b/tests/baselines/reference/parserES3Accessors4.js @@ -2,4 +2,7 @@ var v = { set Foo(a) { } }; //// [parserES3Accessors4.js] -var v = { set Foo(a) { } }; +var v = { + set Foo(a) { + } +}; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName3.js b/tests/baselines/reference/parserES5ComputedPropertyName3.js index 26067467953..85a031fdfa3 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName3.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName3.js @@ -3,6 +3,7 @@ var v = { [e]() { } }; //// [parserES5ComputedPropertyName3.js] var v = (_a = {}, - _a[e] = function () { }, + _a[e] = function () { + }, _a); var _a; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName4.js b/tests/baselines/reference/parserES5ComputedPropertyName4.js index 378624af08b..5233471b6ff 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName4.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName4.js @@ -3,6 +3,11 @@ var v = { get [e]() { } }; //// [parserES5ComputedPropertyName4.js] var v = (_a = {}, - _a[e] = Object.defineProperty({ get: function () { }, enumerable: true, configurable: true }), + _a[e] = Object.defineProperty({ + get: function () { + }, + enumerable: true, + configurable: true + }), _a); var _a; diff --git a/tests/baselines/reference/parserES5ForOfStatement17.js b/tests/baselines/reference/parserES5ForOfStatement17.js index 7995c4c689e..29b4f32b912 100644 --- a/tests/baselines/reference/parserES5ForOfStatement17.js +++ b/tests/baselines/reference/parserES5ForOfStatement17.js @@ -2,4 +2,5 @@ for (var of; ;) { } //// [parserES5ForOfStatement17.js] -for (var of;;) { } +for (var of;;) { +} diff --git a/tests/baselines/reference/parserES5ForOfStatement18.js b/tests/baselines/reference/parserES5ForOfStatement18.js index 1df3e0bed7b..c0d5c1f84a5 100644 --- a/tests/baselines/reference/parserES5ForOfStatement18.js +++ b/tests/baselines/reference/parserES5ForOfStatement18.js @@ -2,4 +2,5 @@ for (var of of of) { } //// [parserES5ForOfStatement18.js] -for (var of of of) { } +for (var of of of) { +} diff --git a/tests/baselines/reference/parserES5ForOfStatement19.js b/tests/baselines/reference/parserES5ForOfStatement19.js index 7ed0d5a333a..3838461a640 100644 --- a/tests/baselines/reference/parserES5ForOfStatement19.js +++ b/tests/baselines/reference/parserES5ForOfStatement19.js @@ -2,4 +2,5 @@ for (var of in of) { } //// [parserES5ForOfStatement19.js] -for (var of in of) { } +for (var of in of) { +} diff --git a/tests/baselines/reference/parserES5ForOfStatement20.js b/tests/baselines/reference/parserES5ForOfStatement20.js index c51cbbc2a3a..74fceaef68c 100644 --- a/tests/baselines/reference/parserES5ForOfStatement20.js +++ b/tests/baselines/reference/parserES5ForOfStatement20.js @@ -2,4 +2,5 @@ for (var of = 0 in of) { } //// [parserES5ForOfStatement20.js] -for (var of = 0 in of) { } +for (var of = 0 in of) { +} diff --git a/tests/baselines/reference/parserES5ForOfStatement21.js b/tests/baselines/reference/parserES5ForOfStatement21.js index e02ed853cb5..36d4c4ba635 100644 --- a/tests/baselines/reference/parserES5ForOfStatement21.js +++ b/tests/baselines/reference/parserES5ForOfStatement21.js @@ -2,4 +2,5 @@ for (var of of) { } //// [parserES5ForOfStatement21.js] -for ( of of) { } +for ( of of) { +} diff --git a/tests/baselines/reference/parserES5SymbolProperty7.js b/tests/baselines/reference/parserES5SymbolProperty7.js index 102d10af417..b6096b798df 100644 --- a/tests/baselines/reference/parserES5SymbolProperty7.js +++ b/tests/baselines/reference/parserES5SymbolProperty7.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype[Symbol.toStringTag] = function () { }; + C.prototype[Symbol.toStringTag] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserErrantSemicolonInClass1.js b/tests/baselines/reference/parserErrantSemicolonInClass1.js index f761b04ca78..56eb3427168 100644 --- a/tests/baselines/reference/parserErrantSemicolonInClass1.js +++ b/tests/baselines/reference/parserErrantSemicolonInClass1.js @@ -39,7 +39,8 @@ class a { var a = (function () { function a(ns) { } - a.prototype.pgF = function () { }; + a.prototype.pgF = function () { + }; Object.defineProperty(a.prototype, "d", { get: function () { return 30; @@ -51,7 +52,10 @@ var a = (function () { }); Object.defineProperty(a, "p2", { get: function () { - return { x: 30, y: 40 }; + return { + x: 30, + y: 40 + }; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression1.js b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression1.js index c33dbc2a626..bea1ae993a5 100644 --- a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression1.js +++ b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression1.js @@ -3,5 +3,12 @@ var v = [1, 2, 3 4, 5, 6, 7]; //// [parserErrorRecoveryArrayLiteralExpression1.js] -var v = [1, 2, 3, - 4, 5, 6, 7]; +var v = [ + 1, + 2, + 3, + 4, + 5, + 6, + 7 +]; diff --git a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression2.js b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression2.js index 0bfe59964db..c56dcd4ad9e 100644 --- a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression2.js +++ b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression2.js @@ -5,5 +5,13 @@ var points = [-0.6961439251899719, 1.207661509513855, 0.19374050199985504, -0 //// [parserErrorRecoveryArrayLiteralExpression2.js] -var points = [-0.6961439251899719, 1.207661509513855, 0.19374050199985504, -0, - .7042760848999023, 1.1955541372299194, 0.19600726664066315, -0.7120069861412048]; +var points = [ + -0.6961439251899719, + 1.207661509513855, + 0.19374050199985504, + -0, + .7042760848999023, + 1.1955541372299194, + 0.19600726664066315, + -0.7120069861412048 +]; diff --git a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.js b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.js index c366c750cc7..a40433ba461 100644 --- a/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.js +++ b/tests/baselines/reference/parserErrorRecoveryArrayLiteralExpression3.js @@ -4,6 +4,11 @@ var texCoords = [2, 2, 0.5000001192092895, 0.8749999 ; 403953552, 0.500000119209 //// [parserErrorRecoveryArrayLiteralExpression3.js] -var texCoords = [2, 2, 0.5000001192092895, 0.8749999]; +var texCoords = [ + 2, + 2, + 0.5000001192092895, + 0.8749999 +]; 403953552, 0.5000001192092895, 0.8749999403953552; ; diff --git a/tests/baselines/reference/parserErrorRecovery_Block1.js b/tests/baselines/reference/parserErrorRecovery_Block1.js index e2bc5f89a39..cdcd5856fa6 100644 --- a/tests/baselines/reference/parserErrorRecovery_Block1.js +++ b/tests/baselines/reference/parserErrorRecovery_Block1.js @@ -6,7 +6,6 @@ function f() { //// [parserErrorRecovery_Block1.js] function f() { - 1 + - ; + 1 + ; return; } diff --git a/tests/baselines/reference/parserErrorRecovery_Block3.js b/tests/baselines/reference/parserErrorRecovery_Block3.js index 55b0a4d65e7..30183fb7d8b 100644 --- a/tests/baselines/reference/parserErrorRecovery_Block3.js +++ b/tests/baselines/reference/parserErrorRecovery_Block3.js @@ -10,7 +10,8 @@ class C { var C = (function () { function C() { } - C.prototype.a = function () { }; + C.prototype.a = function () { + }; C.prototype.b = function () { }; return C; diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js index ae2509c3f49..c26b16b5a0a 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable1.js @@ -41,7 +41,9 @@ var Shapes; this.con = "hello"; } // Instance member - Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; + Point.prototype.getDist = function () { + return Math.sqrt(this.x * this.x + this.y * this.y); + }; // Static member Point.origin = new Point(0, 0); return Point; diff --git a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js index 4936b1ea8bc..866f96a8030 100644 --- a/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js +++ b/tests/baselines/reference/parserErrorRecovery_IncompleteMemberVariable2.js @@ -41,7 +41,9 @@ var Shapes; this.con = "hello"; } // Instance member - Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; + Point.prototype.getDist = function () { + return Math.sqrt(this.x * this.x + this.y * this.y); + }; // Static member Point.origin = new Point(0, 0); return Point; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral1.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral1.js index dbf89fec52b..04085a4b595 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral1.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral1.js @@ -2,4 +2,7 @@ var v = { a: 1 b: 2 } //// [parserErrorRecovery_ObjectLiteral1.js] -var v = { a: 1, b: 2 }; +var v = { + a: 1, + b: 2 +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js index 6a703759fff..3c258ef406e 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js @@ -3,5 +3,7 @@ var v = { a return; //// [parserErrorRecovery_ObjectLiteral2.js] -var v = { a: , - return: }; +var v = { + a: , + return: +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js index eecf45fea4f..49902122ac3 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js @@ -3,5 +3,7 @@ var v = { a: return; //// [parserErrorRecovery_ObjectLiteral3.js] -var v = { a: , - return: }; +var v = { + a: , + return: +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js index 87a1a31437e..b0962100500 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js @@ -3,5 +3,7 @@ var v = { a: 1 return; //// [parserErrorRecovery_ObjectLiteral4.js] -var v = { a: 1, - return: }; +var v = { + a: 1, + return: +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js index 97e618946a0..6b691e376ce 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js @@ -3,5 +3,7 @@ var v = { a: 1, return; //// [parserErrorRecovery_ObjectLiteral5.js] -var v = { a: 1, - return: }; +var v = { + a: 1, + return: +}; diff --git a/tests/baselines/reference/parserErrorRecovery_ParameterList6.js b/tests/baselines/reference/parserErrorRecovery_ParameterList6.js index 060ad14766b..e83c045208d 100644 --- a/tests/baselines/reference/parserErrorRecovery_ParameterList6.js +++ b/tests/baselines/reference/parserErrorRecovery_ParameterList6.js @@ -11,4 +11,5 @@ var Foo = (function () { return Foo; })(); break ; -{ } +{ +} diff --git a/tests/baselines/reference/parserErrorRecovery_SwitchStatement1.js b/tests/baselines/reference/parserErrorRecovery_SwitchStatement1.js index 4d8008639c9..63591985d1e 100644 --- a/tests/baselines/reference/parserErrorRecovery_SwitchStatement1.js +++ b/tests/baselines/reference/parserErrorRecovery_SwitchStatement1.js @@ -10,10 +10,8 @@ switch (e) { //// [parserErrorRecovery_SwitchStatement1.js] switch (e) { case 1: - 1 + - ; + 1 + ; case 2: - 1 + - ; + 1 + ; default: } diff --git a/tests/baselines/reference/parserForOfStatement17.js b/tests/baselines/reference/parserForOfStatement17.js index a6e2aee79a4..38ee81e71fc 100644 --- a/tests/baselines/reference/parserForOfStatement17.js +++ b/tests/baselines/reference/parserForOfStatement17.js @@ -2,4 +2,5 @@ for (var of; ;) { } //// [parserForOfStatement17.js] -for (var of;;) { } +for (var of;;) { +} diff --git a/tests/baselines/reference/parserForOfStatement18.js b/tests/baselines/reference/parserForOfStatement18.js index c30fbb60857..519d92f3357 100644 --- a/tests/baselines/reference/parserForOfStatement18.js +++ b/tests/baselines/reference/parserForOfStatement18.js @@ -2,4 +2,5 @@ for (var of of of) { } //// [parserForOfStatement18.js] -for (var of of of) { } +for (var of of of) { +} diff --git a/tests/baselines/reference/parserForOfStatement19.js b/tests/baselines/reference/parserForOfStatement19.js index c838e8c71e0..9b6a5c8da27 100644 --- a/tests/baselines/reference/parserForOfStatement19.js +++ b/tests/baselines/reference/parserForOfStatement19.js @@ -2,4 +2,5 @@ for (var of in of) { } //// [parserForOfStatement19.js] -for (var of in of) { } +for (var of in of) { +} diff --git a/tests/baselines/reference/parserForOfStatement20.js b/tests/baselines/reference/parserForOfStatement20.js index 8599238d853..7190bbeb1d2 100644 --- a/tests/baselines/reference/parserForOfStatement20.js +++ b/tests/baselines/reference/parserForOfStatement20.js @@ -2,4 +2,5 @@ for (var of = 0 in of) { } //// [parserForOfStatement20.js] -for (var of = 0 in of) { } +for (var of = 0 in of) { +} diff --git a/tests/baselines/reference/parserForOfStatement21.js b/tests/baselines/reference/parserForOfStatement21.js index 5db883e18a0..593582e035a 100644 --- a/tests/baselines/reference/parserForOfStatement21.js +++ b/tests/baselines/reference/parserForOfStatement21.js @@ -2,4 +2,5 @@ for (var of of) { } //// [parserForOfStatement21.js] -for ( of of) { } +for ( of of) { +} diff --git a/tests/baselines/reference/parserFunctionDeclaration4.js b/tests/baselines/reference/parserFunctionDeclaration4.js index a36a41e0809..285f36e6838 100644 --- a/tests/baselines/reference/parserFunctionDeclaration4.js +++ b/tests/baselines/reference/parserFunctionDeclaration4.js @@ -3,4 +3,5 @@ function foo(); function bar() { } //// [parserFunctionDeclaration4.js] -function bar() { } +function bar() { +} diff --git a/tests/baselines/reference/parserFunctionDeclaration5.js b/tests/baselines/reference/parserFunctionDeclaration5.js index fd35c14675e..1c80f842c0d 100644 --- a/tests/baselines/reference/parserFunctionDeclaration5.js +++ b/tests/baselines/reference/parserFunctionDeclaration5.js @@ -3,4 +3,5 @@ function foo(); function foo() { } //// [parserFunctionDeclaration5.js] -function foo() { } +function foo() { +} diff --git a/tests/baselines/reference/parserFunctionDeclaration6.js b/tests/baselines/reference/parserFunctionDeclaration6.js index 05afe2d33a8..6f877b07b14 100644 --- a/tests/baselines/reference/parserFunctionDeclaration6.js +++ b/tests/baselines/reference/parserFunctionDeclaration6.js @@ -6,5 +6,6 @@ //// [parserFunctionDeclaration6.js] { - function bar() { } + function bar() { + } } diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment1.js b/tests/baselines/reference/parserFunctionPropertyAssignment1.js index ea7b20f05d5..c66c134ac48 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment1.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment1.js @@ -2,4 +2,7 @@ var v = { foo() { } }; //// [parserFunctionPropertyAssignment1.js] -var v = { foo: function () { } }; +var v = { + foo: function () { + } +}; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment2.js b/tests/baselines/reference/parserFunctionPropertyAssignment2.js index 668e8df2cfc..7f6b3001c9b 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment2.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment2.js @@ -2,4 +2,7 @@ var v = { 0() { } }; //// [parserFunctionPropertyAssignment2.js] -var v = { 0: function () { } }; +var v = { + 0: function () { + } +}; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment3.js b/tests/baselines/reference/parserFunctionPropertyAssignment3.js index 87a98ac402c..2ed2152ae19 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment3.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment3.js @@ -2,4 +2,7 @@ var v = { "foo"() { } }; //// [parserFunctionPropertyAssignment3.js] -var v = { "foo": function () { } }; +var v = { + "foo": function () { + } +}; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment4.js b/tests/baselines/reference/parserFunctionPropertyAssignment4.js index e9b41e754e6..eb95d79ac40 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment4.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment4.js @@ -2,4 +2,7 @@ var v = { 0() { } }; //// [parserFunctionPropertyAssignment4.js] -var v = { 0: function () { } }; +var v = { + 0: function () { + } +}; diff --git a/tests/baselines/reference/parserFuzz1.js b/tests/baselines/reference/parserFuzz1.js index b9ffb540049..969c07c1659 100644 --- a/tests/baselines/reference/parserFuzz1.js +++ b/tests/baselines/reference/parserFuzz1.js @@ -6,6 +6,8 @@ cla >> 2; +1 >>> 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity14.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity14.js index b2eba6d5873..5cc8bb3b88e 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity14.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity14.js @@ -3,6 +3,5 @@ = 2; //// [parserGreaterThanTokenAmbiguity14.js] -1 >> -; +1 >> ; 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js index 7b44da35688..df9e55b7e3c 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js @@ -5,5 +5,4 @@ 2; //// [parserGreaterThanTokenAmbiguity15.js] -1 - >>= 2; +1 >>= 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity19.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity19.js index d0671d8649f..52035691c84 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity19.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity19.js @@ -3,6 +3,5 @@ = 2; //// [parserGreaterThanTokenAmbiguity19.js] -1 >>> -; +1 >>> ; 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js index 7a3650fdfd5..e6043febcd1 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js @@ -5,5 +5,4 @@ 2; //// [parserGreaterThanTokenAmbiguity20.js] -1 - >>>= 2; +1 >>>= 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity4.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity4.js index dcfb51575e4..5ef065681dc 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity4.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity4.js @@ -3,5 +3,4 @@ > 2; //// [parserGreaterThanTokenAmbiguity4.js] -1 > - > 2; +1 > > 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js index baa3af48e9d..a707e808b4a 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js @@ -5,5 +5,4 @@ 2; //// [parserGreaterThanTokenAmbiguity5.js] -1 - >> 2; +1 >> 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity9.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity9.js index 96be8d0749c..25c5ed53a7c 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity9.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity9.js @@ -3,5 +3,4 @@ > 2; //// [parserGreaterThanTokenAmbiguity9.js] -1 >> - > 2; +1 >> > 2; diff --git a/tests/baselines/reference/parserInExpression1.js b/tests/baselines/reference/parserInExpression1.js index d6100b9b57f..21538288049 100644 --- a/tests/baselines/reference/parserInExpression1.js +++ b/tests/baselines/reference/parserInExpression1.js @@ -2,4 +2,6 @@ console.log("a" in { "a": true }); //// [parserInExpression1.js] -console.log("a" in { "a": true }); +console.log("a" in { + "a": true +}); diff --git a/tests/baselines/reference/parserMemberAccessor1.js b/tests/baselines/reference/parserMemberAccessor1.js index 866a171bc43..3d4690d58e9 100644 --- a/tests/baselines/reference/parserMemberAccessor1.js +++ b/tests/baselines/reference/parserMemberAccessor1.js @@ -9,8 +9,10 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "foo", { - get: function () { }, - set: function (a) { }, + get: function () { + }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration1.js b/tests/baselines/reference/parserMemberAccessorDeclaration1.js index 30534735cfc..1f0b5eb3bd9 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration1.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "a", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration10.js b/tests/baselines/reference/parserMemberAccessorDeclaration10.js index d778b192279..dba06544963 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration10.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration10.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { } + get: function () { + } exports.Foo = Foo;, enumerable: true, configurable: true diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration11.js b/tests/baselines/reference/parserMemberAccessorDeclaration11.js index da8d7fc6425..2a286b8ca6b 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration11.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration11.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration12.js b/tests/baselines/reference/parserMemberAccessorDeclaration12.js index 72923e060c4..aea6eccfbc2 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration12.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration12.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function (a) { }, + get: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration13.js b/tests/baselines/reference/parserMemberAccessorDeclaration13.js index 14b0f1b0a05..f6ca4ee6a02 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration13.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration13.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function () { }, + set: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration14.js b/tests/baselines/reference/parserMemberAccessorDeclaration14.js index 21b11219ca1..62877d402d1 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration14.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration14.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a, b) { }, + set: function (a, b) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration15.js b/tests/baselines/reference/parserMemberAccessorDeclaration15.js index 0d01c75840c..59ff360d432 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration15.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration15.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration17.js b/tests/baselines/reference/parserMemberAccessorDeclaration17.js index d61fa2e8409..6c99c7ddae6 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration17.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration17.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { }, + set: function (a) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration2.js b/tests/baselines/reference/parserMemberAccessorDeclaration2.js index f29efc846ee..00cc2812014 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration2.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration2.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "b", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration3.js b/tests/baselines/reference/parserMemberAccessorDeclaration3.js index 9c64bf02522..86fc2c3e532 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration3.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration3.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "0", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration4.js b/tests/baselines/reference/parserMemberAccessorDeclaration4.js index e65f6431a7c..552c2c1d27a 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration4.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration4.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "a", { - set: function (i) { }, + set: function (i) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration5.js b/tests/baselines/reference/parserMemberAccessorDeclaration5.js index d304a44d64d..309df8b68ec 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration5.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration5.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "a", { - set: function (i) { }, + set: function (i) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration6.js b/tests/baselines/reference/parserMemberAccessorDeclaration6.js index 9c6f3ce8a55..0b44673f146 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration6.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration6.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "0", { - set: function (i) { }, + set: function (i) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration7.js b/tests/baselines/reference/parserMemberAccessorDeclaration7.js index ce103accf61..0d2d24092e5 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration7.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration7.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration8.js b/tests/baselines/reference/parserMemberAccessorDeclaration8.js index 07f12acae40..dd93fa4852e 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration8.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration8.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberAccessorDeclaration9.js b/tests/baselines/reference/parserMemberAccessorDeclaration9.js index 02183d46ef1..5fca86f689b 100644 --- a/tests/baselines/reference/parserMemberAccessorDeclaration9.js +++ b/tests/baselines/reference/parserMemberAccessorDeclaration9.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C, "Foo", { - get: function () { }, + get: function () { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration1.js b/tests/baselines/reference/parserMemberFunctionDeclaration1.js index 1d40fa94700..564245157b0 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration1.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration1.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.Foo = function () { }; + C.prototype.Foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration2.js b/tests/baselines/reference/parserMemberFunctionDeclaration2.js index fed1a6a0743..0f103c90b7d 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration2.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration2.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.Foo = function () { }; + C.Foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration3.js b/tests/baselines/reference/parserMemberFunctionDeclaration3.js index 18bbec7ba5f..46243f08dad 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration3.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration3.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.Foo = function () { }; + C.Foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration4.js b/tests/baselines/reference/parserMemberFunctionDeclaration4.js index cd12f23442c..bcf00aeb1bc 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration4.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration4.js @@ -7,7 +7,8 @@ class C { var C = (function () { function C() { } - C.prototype.Foo = function () { } + C.prototype.Foo = function () { + } exports.Foo = Foo;; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration5.js b/tests/baselines/reference/parserMemberFunctionDeclaration5.js index 75630d34551..da2d2281999 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration5.js +++ b/tests/baselines/reference/parserMemberFunctionDeclaration5.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.Foo = function () { }; + C.prototype.Foo = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.js b/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.js index e0a0f7860cc..59017d97fe2 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.js +++ b/tests/baselines/reference/parserMemberFunctionDeclarationAmbiguities1.js @@ -17,13 +17,21 @@ class C { var C = (function () { function C() { } - C.prototype.public = function () { }; - C.prototype.static = function () { }; - C.prototype.public = function () { }; - C.prototype.static = function () { }; - C.public = function () { }; - C.static = function () { }; - C.public = function () { }; - C.static = function () { }; + C.prototype.public = function () { + }; + C.prototype.static = function () { + }; + C.prototype.public = function () { + }; + C.prototype.static = function () { + }; + C.public = function () { + }; + C.static = function () { + }; + C.public = function () { + }; + C.static = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserMissingLambdaOpenBrace1.js b/tests/baselines/reference/parserMissingLambdaOpenBrace1.js index 8280d8dc9b2..1c532f3d4b4 100644 --- a/tests/baselines/reference/parserMissingLambdaOpenBrace1.js +++ b/tests/baselines/reference/parserMissingLambdaOpenBrace1.js @@ -16,7 +16,9 @@ var C = (function () { var _this = this; return fromDoWhile(function (test) { var index = 0; - return _this.doWhile(function (item, i) { return filter(item, i) ? test(item, index++) : true; }); + return _this.doWhile(function (item, i) { + return filter(item, i) ? test(item, index++) : true; + }); }); }; return C; diff --git a/tests/baselines/reference/parserMissingToken1.js b/tests/baselines/reference/parserMissingToken1.js index 7017d9d0b17..506e628fa38 100644 --- a/tests/baselines/reference/parserMissingToken1.js +++ b/tests/baselines/reference/parserMissingToken1.js @@ -3,5 +3,7 @@ a / finally //// [parserMissingToken1.js] a / ; -try { } -finally { } +try { +} +finally { +} diff --git a/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.js b/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.js index 51581b1c74f..83df05206ce 100644 --- a/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.js +++ b/tests/baselines/reference/parserNoASIOnCallAfterFunctionExpression1.js @@ -4,4 +4,5 @@ var x = function () { } //// [parserNoASIOnCallAfterFunctionExpression1.js] -var x = function () { }(window).foo; +var x = function () { +}(window).foo; diff --git a/tests/baselines/reference/parserNotHexLiteral1.js b/tests/baselines/reference/parserNotHexLiteral1.js index 89b978fcaa8..eadbf8da275 100644 --- a/tests/baselines/reference/parserNotHexLiteral1.js +++ b/tests/baselines/reference/parserNotHexLiteral1.js @@ -7,7 +7,10 @@ console.info (x.e0); //// [parserNotHexLiteral1.js] -var x = { e0: 'cat', x0: 'dog' }; +var x = { + e0: 'cat', + x0: 'dog' +}; console.info(x.x0); // tsc dies on this next line with "bug.ts (5,16): Expected ')'" // tsc seems to be parsing the e0 as a hex constant. diff --git a/tests/baselines/reference/parserObjectLiterals1.js b/tests/baselines/reference/parserObjectLiterals1.js index 426b8107d3b..2224809474b 100644 --- a/tests/baselines/reference/parserObjectLiterals1.js +++ b/tests/baselines/reference/parserObjectLiterals1.js @@ -2,4 +2,7 @@ var v = { a: 1, b: 2 }; //// [parserObjectLiterals1.js] -var v = { a: 1, b: 2 }; +var v = { + a: 1, + b: 2 +}; diff --git a/tests/baselines/reference/parserParameterList1.js b/tests/baselines/reference/parserParameterList1.js index 86b0690728d..49af7780b1f 100644 --- a/tests/baselines/reference/parserParameterList1.js +++ b/tests/baselines/reference/parserParameterList1.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.F = function (A, B) { }; + C.prototype.F = function (A, B) { + }; return C; })(); diff --git a/tests/baselines/reference/parserParameterList15.js b/tests/baselines/reference/parserParameterList15.js index 83216f12568..289c65c88c2 100644 --- a/tests/baselines/reference/parserParameterList15.js +++ b/tests/baselines/reference/parserParameterList15.js @@ -3,4 +3,5 @@ function foo(a = 4); function foo(a, b) {} //// [parserParameterList15.js] -function foo(a, b) { } +function foo(a, b) { +} diff --git a/tests/baselines/reference/parserParameterList16.js b/tests/baselines/reference/parserParameterList16.js index 50c58215478..368939bbcdc 100644 --- a/tests/baselines/reference/parserParameterList16.js +++ b/tests/baselines/reference/parserParameterList16.js @@ -8,6 +8,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function (a, b) { }; + C.prototype.foo = function (a, b) { + }; return C; })(); diff --git a/tests/baselines/reference/parserParameterList3.js b/tests/baselines/reference/parserParameterList3.js index 3992dc548ef..01135f0ceff 100644 --- a/tests/baselines/reference/parserParameterList3.js +++ b/tests/baselines/reference/parserParameterList3.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype.F = function (A, B) { }; + C.prototype.F = function (A, B) { + }; return C; })(); diff --git a/tests/baselines/reference/parserRealSource1.js b/tests/baselines/reference/parserRealSource1.js index d19c2242f0b..c62897c9aff 100644 --- a/tests/baselines/reference/parserRealSource1.js +++ b/tests/baselines/reference/parserRealSource1.js @@ -189,11 +189,21 @@ var TypeScript; var NullLogger = (function () { function NullLogger() { } - NullLogger.prototype.information = function () { return false; }; - NullLogger.prototype.debug = function () { return false; }; - NullLogger.prototype.warning = function () { return false; }; - NullLogger.prototype.error = function () { return false; }; - NullLogger.prototype.fatal = function () { return false; }; + NullLogger.prototype.information = function () { + return false; + }; + NullLogger.prototype.debug = function () { + return false; + }; + NullLogger.prototype.warning = function () { + return false; + }; + NullLogger.prototype.error = function () { + return false; + }; + NullLogger.prototype.fatal = function () { + return false; + }; NullLogger.prototype.log = function (s) { }; return NullLogger; @@ -208,11 +218,21 @@ var TypeScript; this._error = this.logger.error(); this._fatal = this.logger.fatal(); } - LoggerAdapter.prototype.information = function () { return this._information; }; - LoggerAdapter.prototype.debug = function () { return this._debug; }; - LoggerAdapter.prototype.warning = function () { return this._warning; }; - LoggerAdapter.prototype.error = function () { return this._error; }; - LoggerAdapter.prototype.fatal = function () { return this._fatal; }; + LoggerAdapter.prototype.information = function () { + return this._information; + }; + LoggerAdapter.prototype.debug = function () { + return this._debug; + }; + LoggerAdapter.prototype.warning = function () { + return this._warning; + }; + LoggerAdapter.prototype.error = function () { + return this._error; + }; + LoggerAdapter.prototype.fatal = function () { + return this._fatal; + }; LoggerAdapter.prototype.log = function (s) { this.logger.log(s); }; @@ -223,11 +243,21 @@ var TypeScript; function BufferedLogger() { this.logContents = []; } - BufferedLogger.prototype.information = function () { return false; }; - BufferedLogger.prototype.debug = function () { return false; }; - BufferedLogger.prototype.warning = function () { return false; }; - BufferedLogger.prototype.error = function () { return false; }; - BufferedLogger.prototype.fatal = function () { return false; }; + BufferedLogger.prototype.information = function () { + return false; + }; + BufferedLogger.prototype.debug = function () { + return false; + }; + BufferedLogger.prototype.warning = function () { + return false; + }; + BufferedLogger.prototype.error = function () { + return false; + }; + BufferedLogger.prototype.fatal = function () { + return false; + }; BufferedLogger.prototype.log = function (s) { this.logContents.push(s); }; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 768e35c1a3b..0dd944a7721 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -813,8 +813,7 @@ var TypeScript; else { var tokenInfo = lookupToken(this.tokenId); if (tokenInfo != undefined) { - if ((tokenInfo.unopNodeType != NodeType.None) || - (tokenInfo.binopNodeType != NodeType.None)) { + if ((tokenInfo.unopNodeType != NodeType.None) || (tokenInfo.binopNodeType != NodeType.None)) { return 2 /* Operator */; } } diff --git a/tests/baselines/reference/parserRealSource11.js b/tests/baselines/reference/parserRealSource11.js index 72fec692184..89c38a96fdf 100644 --- a/tests/baselines/reference/parserRealSource11.js +++ b/tests/baselines/reference/parserRealSource11.js @@ -2397,10 +2397,18 @@ var TypeScript; this.postComments = null; this.isParenthesized = false; } - AST.prototype.isExpression = function () { return false; }; - AST.prototype.isStatementOrExpression = function () { return false; }; - AST.prototype.isCompoundStatement = function () { return false; }; - AST.prototype.isLeaf = function () { return this.isStatementOrExpression() && (!this.isCompoundStatement()); }; + AST.prototype.isExpression = function () { + return false; + }; + AST.prototype.isStatementOrExpression = function () { + return false; + }; + AST.prototype.isCompoundStatement = function () { + return false; + }; + AST.prototype.isLeaf = function () { + return this.isStatementOrExpression() && (!this.isCompoundStatement()); + }; AST.prototype.typeCheck = function (typeFlow) { switch (this.nodeType) { case NodeType.Error: @@ -2483,13 +2491,18 @@ var TypeScript; }; AST.prototype.print = function (context) { context.startLine(); - var lineCol = { line: -1, col: -1 }; - var limLineCol = { line: -1, col: -1 }; + var lineCol = { + line: -1, + col: -1 + }; + var limLineCol = { + line: -1, + col: -1 + }; if (context.parser !== null) { context.parser.getSourceLineCol(lineCol, this.minChar); context.parser.getSourceLineCol(limLineCol, this.limChar); - context.write("(" + lineCol.line + "," + lineCol.col + ")--" + - "(" + limLineCol.line + "," + limLineCol.col + "): "); + context.write("(" + lineCol.line + "," + lineCol.col + ")--" + "(" + limLineCol.line + "," + limLineCol.col + "): "); } var lab = this.printLabel(); if (hasFlag(this.flags, ASTFlags.Error)) { @@ -2636,8 +2649,12 @@ var TypeScript; this.text = actualText; } }; - Identifier.prototype.isMissing = function () { return false; }; - Identifier.prototype.isLeaf = function () { return true; }; + Identifier.prototype.isMissing = function () { + return false; + }; + Identifier.prototype.isLeaf = function () { + return true; + }; Identifier.prototype.treeViewLabel = function () { return "id: " + this.actualText; }; @@ -2681,7 +2698,9 @@ var TypeScript; _super.call(this, NodeType.Label); this.id = id; } - Label.prototype.printLabel = function () { return this.id.actualText + ":"; }; + Label.prototype.printLabel = function () { + return this.id.actualText + ":"; + }; Label.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.voidType; return this; @@ -2704,8 +2723,12 @@ var TypeScript; function Expression(nodeType) { _super.call(this, nodeType); } - Expression.prototype.isExpression = function () { return true; }; - Expression.prototype.isStatementOrExpression = function () { return true; }; + Expression.prototype.isExpression = function () { + return true; + }; + Expression.prototype.isStatementOrExpression = function () { + return true; + }; return Expression; })(AST); TypeScript.Expression = Expression; @@ -3166,7 +3189,9 @@ var TypeScript; this.varFlags = VarFlags.None; this.isDynamicImport = false; } - ImportDeclaration.prototype.isStatementOrExpression = function () { return true; }; + ImportDeclaration.prototype.isStatementOrExpression = function () { + return true; + }; ImportDeclaration.prototype.emit = function (emitter, tokenId, startLine) { var mod = this.alias.type; // REVIEW: Only modules may be aliased for now, though there's no real @@ -3227,10 +3252,18 @@ var TypeScript; this.varFlags = VarFlags.None; this.sym = null; } - BoundDecl.prototype.isStatementOrExpression = function () { return true; }; - BoundDecl.prototype.isPrivate = function () { return hasFlag(this.varFlags, VarFlags.Private); }; - BoundDecl.prototype.isPublic = function () { return hasFlag(this.varFlags, VarFlags.Public); }; - BoundDecl.prototype.isProperty = function () { return hasFlag(this.varFlags, VarFlags.Property); }; + BoundDecl.prototype.isStatementOrExpression = function () { + return true; + }; + BoundDecl.prototype.isPrivate = function () { + return hasFlag(this.varFlags, VarFlags.Private); + }; + BoundDecl.prototype.isPublic = function () { + return hasFlag(this.varFlags, VarFlags.Public); + }; + BoundDecl.prototype.isProperty = function () { + return hasFlag(this.varFlags, VarFlags.Property); + }; BoundDecl.prototype.typeCheck = function (typeFlow) { return typeFlow.typeCheckBoundDecl(this); }; @@ -3245,9 +3278,15 @@ var TypeScript; function VarDecl(id, nest) { _super.call(this, id, NodeType.VarDecl, nest); } - VarDecl.prototype.isAmbient = function () { return hasFlag(this.varFlags, VarFlags.Ambient); }; - VarDecl.prototype.isExported = function () { return hasFlag(this.varFlags, VarFlags.Exported); }; - VarDecl.prototype.isStatic = function () { return hasFlag(this.varFlags, VarFlags.Static); }; + VarDecl.prototype.isAmbient = function () { + return hasFlag(this.varFlags, VarFlags.Ambient); + }; + VarDecl.prototype.isExported = function () { + return hasFlag(this.varFlags, VarFlags.Exported); + }; + VarDecl.prototype.isStatic = function () { + return hasFlag(this.varFlags, VarFlags.Static); + }; VarDecl.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitJavascriptVarDecl(this, tokenId); }; @@ -3264,7 +3303,9 @@ var TypeScript; this.isOptional = false; this.parameterPropertySym = null; } - ArgDecl.prototype.isOptionalArg = function () { return this.isOptional || this.init; }; + ArgDecl.prototype.isOptionalArg = function () { + return this.isOptional || this.init; + }; ArgDecl.prototype.treeViewLabel = function () { return "arg: " + this.id.actualText; }; @@ -3325,8 +3366,12 @@ var TypeScript; } return this.internalNameCache; }; - FuncDecl.prototype.hasSelfReference = function () { return hasFlag(this.fncFlags, FncFlags.HasSelfReference); }; - FuncDecl.prototype.setHasSelfReference = function () { this.fncFlags |= FncFlags.HasSelfReference; }; + FuncDecl.prototype.hasSelfReference = function () { + return hasFlag(this.fncFlags, FncFlags.HasSelfReference); + }; + FuncDecl.prototype.setHasSelfReference = function () { + this.fncFlags |= FncFlags.HasSelfReference; + }; FuncDecl.prototype.addCloRef = function (id, sym) { if (this.envids == null) { this.envids = new Identifier[]; @@ -3380,19 +3425,45 @@ var TypeScript; FuncDecl.prototype.isMethod = function () { return (this.fncFlags & FncFlags.Method) != FncFlags.None; }; - FuncDecl.prototype.isCallMember = function () { return hasFlag(this.fncFlags, FncFlags.CallMember); }; - FuncDecl.prototype.isConstructMember = function () { return hasFlag(this.fncFlags, FncFlags.ConstructMember); }; - FuncDecl.prototype.isIndexerMember = function () { return hasFlag(this.fncFlags, FncFlags.IndexerMember); }; - FuncDecl.prototype.isSpecialFn = function () { return this.isCallMember() || this.isIndexerMember() || this.isConstructMember(); }; - FuncDecl.prototype.isAnonymousFn = function () { return this.name === null; }; - FuncDecl.prototype.isAccessor = function () { return hasFlag(this.fncFlags, FncFlags.GetAccessor) || hasFlag(this.fncFlags, FncFlags.SetAccessor); }; - FuncDecl.prototype.isGetAccessor = function () { return hasFlag(this.fncFlags, FncFlags.GetAccessor); }; - FuncDecl.prototype.isSetAccessor = function () { return hasFlag(this.fncFlags, FncFlags.SetAccessor); }; - FuncDecl.prototype.isAmbient = function () { return hasFlag(this.fncFlags, FncFlags.Ambient); }; - FuncDecl.prototype.isExported = function () { return hasFlag(this.fncFlags, FncFlags.Exported); }; - FuncDecl.prototype.isPrivate = function () { return hasFlag(this.fncFlags, FncFlags.Private); }; - FuncDecl.prototype.isPublic = function () { return hasFlag(this.fncFlags, FncFlags.Public); }; - FuncDecl.prototype.isStatic = function () { return hasFlag(this.fncFlags, FncFlags.Static); }; + FuncDecl.prototype.isCallMember = function () { + return hasFlag(this.fncFlags, FncFlags.CallMember); + }; + FuncDecl.prototype.isConstructMember = function () { + return hasFlag(this.fncFlags, FncFlags.ConstructMember); + }; + FuncDecl.prototype.isIndexerMember = function () { + return hasFlag(this.fncFlags, FncFlags.IndexerMember); + }; + FuncDecl.prototype.isSpecialFn = function () { + return this.isCallMember() || this.isIndexerMember() || this.isConstructMember(); + }; + FuncDecl.prototype.isAnonymousFn = function () { + return this.name === null; + }; + FuncDecl.prototype.isAccessor = function () { + return hasFlag(this.fncFlags, FncFlags.GetAccessor) || hasFlag(this.fncFlags, FncFlags.SetAccessor); + }; + FuncDecl.prototype.isGetAccessor = function () { + return hasFlag(this.fncFlags, FncFlags.GetAccessor); + }; + FuncDecl.prototype.isSetAccessor = function () { + return hasFlag(this.fncFlags, FncFlags.SetAccessor); + }; + FuncDecl.prototype.isAmbient = function () { + return hasFlag(this.fncFlags, FncFlags.Ambient); + }; + FuncDecl.prototype.isExported = function () { + return hasFlag(this.fncFlags, FncFlags.Exported); + }; + FuncDecl.prototype.isPrivate = function () { + return hasFlag(this.fncFlags, FncFlags.Private); + }; + FuncDecl.prototype.isPublic = function () { + return hasFlag(this.fncFlags, FncFlags.Public); + }; + FuncDecl.prototype.isStatic = function () { + return hasFlag(this.fncFlags, FncFlags.Static); + }; FuncDecl.prototype.treeViewLabel = function () { if (this.name == null) { return "funcExpr"; @@ -3404,8 +3475,12 @@ var TypeScript; FuncDecl.prototype.ClearFlags = function () { this.fncFlags = FncFlags.None; }; - FuncDecl.prototype.isSignature = function () { return (this.fncFlags & FncFlags.Signature) != FncFlags.None; }; - FuncDecl.prototype.hasStaticDeclarations = function () { return (!this.isConstructor && (this.statics.members.length > 0 || this.innerStaticFuncs.length > 0)); }; + FuncDecl.prototype.isSignature = function () { + return (this.fncFlags & FncFlags.Signature) != FncFlags.None; + }; + FuncDecl.prototype.hasStaticDeclarations = function () { + return (!this.isConstructor && (this.statics.members.length > 0 || this.innerStaticFuncs.length > 0)); + }; return FuncDecl; })(AST); TypeScript.FuncDecl = FuncDecl; @@ -3514,9 +3589,15 @@ var TypeScript; this.scopes = scopes; this.prettyName = this.name.actualText; } - ModuleDeclaration.prototype.isExported = function () { return hasFlag(this.modFlags, ModuleFlags.Exported); }; - ModuleDeclaration.prototype.isAmbient = function () { return hasFlag(this.modFlags, ModuleFlags.Ambient); }; - ModuleDeclaration.prototype.isEnum = function () { return hasFlag(this.modFlags, ModuleFlags.IsEnum); }; + ModuleDeclaration.prototype.isExported = function () { + return hasFlag(this.modFlags, ModuleFlags.Exported); + }; + ModuleDeclaration.prototype.isAmbient = function () { + return hasFlag(this.modFlags, ModuleFlags.Ambient); + }; + ModuleDeclaration.prototype.isEnum = function () { + return hasFlag(this.modFlags, ModuleFlags.IsEnum); + }; ModuleDeclaration.prototype.recordNonInterface = function () { this.modFlags &= ~ModuleFlags.ShouldEmitModuleDecl; }; @@ -3589,9 +3670,15 @@ var TypeScript; _super.call(this, nodeType); this.flags |= ASTFlags.IsStatement; } - Statement.prototype.isLoop = function () { return false; }; - Statement.prototype.isStatementOrExpression = function () { return true; }; - Statement.prototype.isCompoundStatement = function () { return this.isLoop(); }; + Statement.prototype.isLoop = function () { + return false; + }; + Statement.prototype.isStatementOrExpression = function () { + return true; + }; + Statement.prototype.isCompoundStatement = function () { + return this.isLoop(); + }; Statement.prototype.typeCheck = function (typeFlow) { this.type = typeFlow.voidType; return this; @@ -3695,7 +3782,9 @@ var TypeScript; this.target = null; this.resolvedTarget = null; } - Jump.prototype.hasExplicitTarget = function () { return (this.target); }; + Jump.prototype.hasExplicitTarget = function () { + return (this.target); + }; Jump.prototype.setResolvedTarget = function (parser, stmt) { if (stmt.isLoop()) { this.resolvedTarget = stmt; @@ -3746,7 +3835,9 @@ var TypeScript; this.cond = cond; this.body = null; } - WhileStatement.prototype.isLoop = function () { return true; }; + WhileStatement.prototype.isLoop = function () { + return true; + }; WhileStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -3799,7 +3890,9 @@ var TypeScript; this.whileAST = null; this.cond = null; } - DoWhileStatement.prototype.isLoop = function () { return true; }; + DoWhileStatement.prototype.isLoop = function () { + return true; + }; DoWhileStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -3855,7 +3948,9 @@ var TypeScript; this.elseBod = null; this.statement = new ASTSpan(); } - IfStatement.prototype.isCompoundStatement = function () { return true; }; + IfStatement.prototype.isCompoundStatement = function () { + return true; + }; IfStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -3975,7 +4070,9 @@ var TypeScript; this.lval.varFlags |= VarFlags.AutoInit; } } - ForInStatement.prototype.isLoop = function () { return true; }; + ForInStatement.prototype.isLoop = function () { + return true; + }; ForInStatement.prototype.isFiltered = function () { if (this.body) { var singleItem = null; @@ -4002,16 +4099,13 @@ var TypeScript; var target = cond.target; if (target.nodeType == NodeType.Dot) { var binex = target; - if ((binex.operand1.nodeType == NodeType.Name) && - (this.obj.nodeType == NodeType.Name) && - (binex.operand1.actualText == this.obj.actualText)) { + if ((binex.operand1.nodeType == NodeType.Name) && (this.obj.nodeType == NodeType.Name) && (binex.operand1.actualText == this.obj.actualText)) { var prop = binex.operand2; if (prop.actualText == "hasOwnProperty") { var args = cond.arguments; if ((args !== null) && (args.members.length == 1)) { var arg = args.members[0]; - if ((arg.nodeType == NodeType.Name) && - (this.lval.nodeType == NodeType.Name)) { + if ((arg.nodeType == NodeType.Name) && (this.lval.nodeType == NodeType.Name)) { if ((this.lval.actualText) == arg.actualText) { return true; } @@ -4085,7 +4179,9 @@ var TypeScript; _super.call(this, NodeType.For); this.init = init; } - ForStatement.prototype.isLoop = function () { return true; }; + ForStatement.prototype.isLoop = function () { + return true; + }; ForStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -4177,7 +4273,9 @@ var TypeScript; this.expr = expr; this.withSym = null; } - WithStatement.prototype.isCompoundStatement = function () { return true; }; + WithStatement.prototype.isCompoundStatement = function () { + return true; + }; WithStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -4204,7 +4302,9 @@ var TypeScript; this.defaultCase = null; this.statement = new ASTSpan(); } - SwitchStatement.prototype.isCompoundStatement = function () { return true; }; + SwitchStatement.prototype.isCompoundStatement = function () { + return true; + }; SwitchStatement.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -4358,7 +4458,9 @@ var TypeScript; this.tryNode = tryNode; this.finallyNode = finallyNode; } - TryFinally.prototype.isCompoundStatement = function () { return true; }; + TryFinally.prototype.isCompoundStatement = function () { + return true; + }; TryFinally.prototype.emit = function (emitter, tokenId, startLine) { emitter.recordSourceMappingStart(this); emitter.emitJavascript(this.tryNode, TokenID.Try, false); @@ -4403,7 +4505,9 @@ var TypeScript; this.tryNode = tryNode; this.catchNode = catchNode; } - TryCatch.prototype.isCompoundStatement = function () { return true; }; + TryCatch.prototype.isCompoundStatement = function () { + return true; + }; TryCatch.prototype.emit = function (emitter, tokenId, startLine) { emitter.emitParensAndCommentsInPlace(this, true); emitter.recordSourceMappingStart(this); @@ -4593,7 +4697,9 @@ var TypeScript; } } else { - this.text = [(this.content.replace(/^\s+|\s+$/g, ''))]; + this.text = [ + (this.content.replace(/^\s+|\s+$/g, '')) + ]; } } return this.text; diff --git a/tests/baselines/reference/parserRealSource14.js b/tests/baselines/reference/parserRealSource14.js index 8deae79f5e2..9b9ee2bcf84 100644 --- a/tests/baselines/reference/parserRealSource14.js +++ b/tests/baselines/reference/parserRealSource14.js @@ -607,7 +607,9 @@ var TypeScript; }; AstPath.prototype.clone = function () { var clone = new AstPath(); - clone.asts = this.asts.map(function (value) { return value; }); + clone.asts = this.asts.map(function (value) { + return value; + }); clone.top = this.top; return clone; }; @@ -656,288 +658,167 @@ var TypeScript; AstPath.prototype.isNameOfClass = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && - (this.parent().name === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && (this.parent().name === this.ast()); }; AstPath.prototype.isNameOfInterface = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && - (this.parent().name === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && (this.parent().name === this.ast()); }; AstPath.prototype.isNameOfArgument = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && - (this.parent().id === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && (this.parent().id === this.ast()); }; AstPath.prototype.isNameOfVariable = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.VarDecl) && - (this.parent().id === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.VarDecl) && (this.parent().id === this.ast()); }; AstPath.prototype.isNameOfModule = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && - (this.parent().name === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && (this.parent().name === this.ast()); }; AstPath.prototype.isNameOfFunction = function () { if (this.ast() === null || this.parent() === null) return false; - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && - (this.parent().name === this.ast()); + return (this.ast().nodeType === TypeScript.NodeType.Name) && (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && (this.parent().name === this.ast()); }; AstPath.prototype.isChildOfScript = function () { var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; + return this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; }; AstPath.prototype.isChildOfModule = function () { var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; + return this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; }; AstPath.prototype.isChildOfClass = function () { var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; + return this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; }; AstPath.prototype.isArgumentOfClassConstructor = function () { var ast = lastOf(this.asts); - return this.count() >= 5 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && - (this.asts[this.top - 2].isConstructor) && - (this.asts[this.top - 2].arguments === this.asts[this.top - 1]) && - (this.asts[this.top - 4].constructorDecl === this.asts[this.top - 2]); + return this.count() >= 5 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && (this.asts[this.top - 2].isConstructor) && (this.asts[this.top - 2].arguments === this.asts[this.top - 1]) && (this.asts[this.top - 4].constructorDecl === this.asts[this.top - 2]); }; AstPath.prototype.isChildOfInterface = function () { var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; + return this.count() >= 3 && this.asts[this.top] === ast && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; }; AstPath.prototype.isTopLevelImplicitModule = function () { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && - TypeScript.hasFlag(this.asts[this.top].modFlags, TypeScript.ModuleFlags.IsWholeFile); + return this.count() >= 1 && this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && TypeScript.hasFlag(this.asts[this.top].modFlags, TypeScript.ModuleFlags.IsWholeFile); }; AstPath.prototype.isBodyOfTopLevelImplicitModule = function () { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - this.asts[this.top - 1].members == this.asts[this.top - 0] && - TypeScript.hasFlag(this.asts[this.top - 1].modFlags, TypeScript.ModuleFlags.IsWholeFile); + return this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && this.asts[this.top - 1].members == this.asts[this.top - 0] && TypeScript.hasFlag(this.asts[this.top - 1].modFlags, TypeScript.ModuleFlags.IsWholeFile); }; AstPath.prototype.isBodyOfScript = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && - this.asts[this.top - 1].bod == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && this.asts[this.top - 1].bod == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfSwitch = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].caseList == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].caseList == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfModule = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - this.asts[this.top - 1].members == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && this.asts[this.top - 1].members == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfClass = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && - this.asts[this.top - 1].members == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && this.asts[this.top - 1].members == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfFunction = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 1].bod == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 1].bod == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfInterface = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && - this.asts[this.top - 1].members == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && this.asts[this.top - 1].members == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfBlock = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && - this.asts[this.top - 1].statements == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && this.asts[this.top - 1].statements == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfFor = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfCase = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfTry = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfCatch = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfDoWhile = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfWhile = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfForIn = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfWith = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfFinally = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && - this.asts[this.top - 1].body == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && this.asts[this.top - 1].body == this.asts[this.top - 0]; }; AstPath.prototype.isCaseOfSwitch = function () { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].caseList == this.asts[this.top - 1]; + return this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].caseList == this.asts[this.top - 1]; }; AstPath.prototype.isDefaultCaseOfSwitch = function () { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].caseList == this.asts[this.top - 1] && - this.asts[this.top - 2].defaultCase == this.asts[this.top - 0]; + return this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].caseList == this.asts[this.top - 1] && this.asts[this.top - 2].defaultCase == this.asts[this.top - 0]; }; AstPath.prototype.isListOfObjectLit = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].operand == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].operand == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfObjectLit = function () { return this.isListOfObjectLit(); }; AstPath.prototype.isEmptyListOfObjectLit = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].operand == this.asts[this.top - 0] && - this.asts[this.top - 0].members.length == 0; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].operand == this.asts[this.top - 0] && this.asts[this.top - 0].members.length == 0; }; AstPath.prototype.isMemberOfObjectLit = function () { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 2].operand == this.asts[this.top - 1]; + return this.count() >= 3 && this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 2].operand == this.asts[this.top - 1]; }; AstPath.prototype.isNameOfMemberOfObjectLit = function () { - return this.count() >= 4 && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && - this.asts[this.top - 3].operand == this.asts[this.top - 2]; + return this.count() >= 4 && this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && this.asts[this.top - 3].operand == this.asts[this.top - 2]; }; AstPath.prototype.isListOfArrayLit = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].operand == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].operand == this.asts[this.top - 0]; }; AstPath.prototype.isTargetOfMember = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 1].operand1 === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 1].operand1 === this.asts[this.top - 0]; }; AstPath.prototype.isMemberOfMember = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 1].operand2 === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && this.asts[this.top - 1].operand2 === this.asts[this.top - 0]; }; AstPath.prototype.isItemOfList = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; }; AstPath.prototype.isThenOfIf = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - this.asts[this.top - 1].thenBod == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && this.asts[this.top - 1].thenBod == this.asts[this.top - 0]; }; AstPath.prototype.isElseOfIf = function () { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - this.asts[this.top - 1].elseBod == this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && this.asts[this.top - 1].elseBod == this.asts[this.top - 0]; }; AstPath.prototype.isBodyOfDefaultCase = function () { return this.isBodyOfCase(); }; AstPath.prototype.isSingleStatementList = function () { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.List && - this.asts[this.top].members.length === 1; + return this.count() >= 1 && this.asts[this.top].nodeType === TypeScript.NodeType.List && this.asts[this.top].members.length === 1; }; AstPath.prototype.isArgumentListOfFunction = function () { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 1].arguments === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 1].arguments === this.asts[this.top - 0]; }; AstPath.prototype.isArgumentOfFunction = function () { - return this.count() >= 3 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 2].arguments === this.asts[this.top - 1]; + return this.count() >= 3 && this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && this.asts[this.top - 2].arguments === this.asts[this.top - 1]; }; AstPath.prototype.isArgumentListOfCall = function () { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && - this.asts[this.top - 1].arguments === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && this.asts[this.top - 1].arguments === this.asts[this.top - 0]; }; AstPath.prototype.isArgumentListOfNew = function () { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && - this.asts[this.top - 1].arguments === this.asts[this.top - 0]; + return this.count() >= 2 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && this.asts[this.top - 1].arguments === this.asts[this.top - 0]; }; AstPath.prototype.isSynthesizedBlock = function () { - return this.count() >= 1 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && - this.asts[this.top - 0].isStatementBlock === false; + return this.count() >= 1 && this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && this.asts[this.top - 0].isStatementBlock === false; }; return AstPath; })(); @@ -998,9 +879,7 @@ var TypeScript; // bar // 0123 // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid - var inclusive = hasFlag(options, 1 /* EdgeInclusive */) || - cur.nodeType === TypeScript.NodeType.Name || - pos === script.limChar; // Special "EOF" case + var inclusive = hasFlag(options, 1 /* EdgeInclusive */) || cur.nodeType === TypeScript.NodeType.Name || pos === script.limChar; // Special "EOF" case var minChar = cur.minChar; var limChar = cur.limChar + (inclusive ? 1 : 0); if (pos >= minChar && pos < limChar) { diff --git a/tests/baselines/reference/parserRealSource4.js b/tests/baselines/reference/parserRealSource4.js index 563e9e92a08..1d6ed0aaf13 100644 --- a/tests/baselines/reference/parserRealSource4.js +++ b/tests/baselines/reference/parserRealSource4.js @@ -377,7 +377,9 @@ var TypeScript; } return false; }; - StringHashTable.prototype.count = function () { return this.itemCount; }; + StringHashTable.prototype.count = function () { + return this.itemCount; + }; StringHashTable.prototype.lookup = function (key) { var data = this.table[key]; if (data != undefined) { @@ -513,7 +515,9 @@ var TypeScript; } return result; }; - HashTable.prototype.count = function () { return this.itemCount; }; + HashTable.prototype.count = function () { + return this.itemCount; + }; HashTable.prototype.lookup = function (key) { var current; var val = this.hashFn(key); diff --git a/tests/baselines/reference/parserRealSource6.js b/tests/baselines/reference/parserRealSource6.js index d65207b8c77..e747b95e610 100644 --- a/tests/baselines/reference/parserRealSource6.js +++ b/tests/baselines/reference/parserRealSource6.js @@ -329,8 +329,7 @@ var TypeScript; // is has not been fully re-parsed yet. if (ast.nodeType == NodeType.Script && context.pos > limChar) limChar = context.pos; - if ((minChar <= context.pos) && - (limChar >= context.pos)) { + if ((minChar <= context.pos) && (limChar >= context.pos)) { switch (ast.nodeType) { case NodeType.Script: var script = ast; diff --git a/tests/baselines/reference/parserRealSource7.js b/tests/baselines/reference/parserRealSource7.js index 5073c33febd..73b9aab5017 100644 --- a/tests/baselines/reference/parserRealSource7.js +++ b/tests/baselines/reference/parserRealSource7.js @@ -962,7 +962,11 @@ var TypeScript; var importDecl = ast; var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported); // REVIEW: technically, this call isn't strictly necessary, since we'll find the type during the call to resolveTypeMembers - var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members: null, tcContext: context }); + var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { + topLevelScope: scopeChain, + members: null, + tcContext: context + }); var isGlobal = context.scopeChain.container == context.checker.gloMod; if (aliasedModSymbol) { var aliasedModType = aliasedModSymbol.getType(); @@ -1053,8 +1057,7 @@ var TypeScript; if (isExported) { typeSymbol.flags |= SymbolFlags.Exported; } - if ((context.scopeChain.moduleDecl) || - (context.scopeChain.container == context.checker.gloMod)) { + if ((context.scopeChain.moduleDecl) || (context.scopeChain.container == context.checker.gloMod)) { typeSymbol.flags |= SymbolFlags.ModuleMember; } moduleDecl.mod = modType; @@ -1080,11 +1083,7 @@ var TypeScript; // REVIEW-CLASSES if (!typeSymbol) { var valTypeSymbol = scopeChain.scope.findLocal(className, false, false); - if (valTypeSymbol && - valTypeSymbol.isType() && - valTypeSymbol.declAST && - valTypeSymbol.declAST.nodeType == NodeType.FuncDecl && - valTypeSymbol.declAST.isSignature()) { + if (valTypeSymbol && valTypeSymbol.isType() && valTypeSymbol.declAST && valTypeSymbol.declAST.nodeType == NodeType.FuncDecl && valTypeSymbol.declAST.isSignature()) { typeSymbol = valTypeSymbol; foundValSymbol = true; if (isExported) { @@ -1238,10 +1237,7 @@ var TypeScript; if (context.scopeChain.moduleDecl) { context.scopeChain.moduleDecl.recordNonInterface(); } - if (isProperty || - isExported || - (context.scopeChain.container == context.checker.gloMod) || - context.scopeChain.moduleDecl) { + if (isProperty || isExported || (context.scopeChain.container == context.checker.gloMod) || context.scopeChain.moduleDecl) { if (isAmbient) { var existingSym = scopeChain.scope.findLocal(varDecl.id.text, false, false); if (existingSym) { @@ -1262,8 +1258,7 @@ var TypeScript; } field.symbol = fieldSymbol; fieldSymbol.declAST = ast; - if ((context.scopeChain.moduleDecl) || - (context.scopeChain.container == context.checker.gloMod)) { + if ((context.scopeChain.moduleDecl) || (context.scopeChain.container == context.checker.gloMod)) { fieldSymbol.flags |= SymbolFlags.ModuleMember; fieldSymbol.declModule = context.scopeChain.moduleDecl; } @@ -1314,12 +1309,7 @@ var TypeScript; // If the parent is the constructor, and this isn't an instance method, skip it. // That way, we'll set the type during scope assignment, and can be sure that the // function will be placed in the constructor-local scope - if (!funcDecl.isConstructor && - containerSym && - containerSym.declAST && - containerSym.declAST.nodeType == NodeType.FuncDecl && - containerSym.declAST.isConstructor && - !funcDecl.isMethod()) { + if (!funcDecl.isConstructor && containerSym && containerSym.declAST && containerSym.declAST.nodeType == NodeType.FuncDecl && containerSym.declAST.isConstructor && !funcDecl.isMethod()) { return go; } // Interfaces and overloads @@ -1408,14 +1398,7 @@ var TypeScript; } } // REVIEW: Move this check into the typecheck phase? It's only being run over properties... - if (fgSym && - !fgSym.isAccessor() && - fgSym.type && - fgSym.type.construct && - fgSym.type.construct.signatures != [] && - (fgSym.type.construct.signatures[0].declAST == null || - !hasFlag(fgSym.type.construct.signatures[0].declAST.fncFlags, FncFlags.Ambient)) && - !funcDecl.isConstructor) { + if (fgSym && !fgSym.isAccessor() && fgSym.type && fgSym.type.construct && fgSym.type.construct.signatures != [] && (fgSym.type.construct.signatures[0].declAST == null || !hasFlag(fgSym.type.construct.signatures[0].declAST.fncFlags, FncFlags.Ambient)) && !funcDecl.isConstructor) { context.checker.errorReporter.simpleError(funcDecl, "Functions may not have class overloads"); } if (fgSym && !(fgSym.kind() == SymbolKind.Type) && funcDecl.isMethod() && !funcDecl.isAccessor() && !funcDecl.isConstructor) { diff --git a/tests/baselines/reference/parserRealSource8.js b/tests/baselines/reference/parserRealSource8.js index 8a667ad6dbe..fcdb170ae12 100644 --- a/tests/baselines/reference/parserRealSource8.js +++ b/tests/baselines/reference/parserRealSource8.js @@ -632,8 +632,7 @@ var TypeScript; // the enclosing scope // REVIEW: Some twisted logic here - this needs to be cleaned up once old classes are removed // - if it's a new class, always use the contained scope, since we initialize the constructor scope below - if (context.scopeChain.thisType && - (!funcDecl.isConstructor || hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod))) { + if (context.scopeChain.thisType && (!funcDecl.isConstructor || hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod))) { var instType = context.scopeChain.thisType; if (!(instType.typeFlags & TypeFlags.IsClass) && !hasFlag(funcDecl.fncFlags, FncFlags.ClassMethod)) { if (!funcDecl.isMethod() || isStatic) { @@ -645,10 +644,7 @@ var TypeScript; } } else { - if (context.scopeChain.previous.scope.container && - context.scopeChain.previous.scope.container.declAST && - context.scopeChain.previous.scope.container.declAST.nodeType == NodeType.FuncDecl && - context.scopeChain.previous.scope.container.declAST.isConstructor) { + if (context.scopeChain.previous.scope.container && context.scopeChain.previous.scope.container.declAST && context.scopeChain.previous.scope.container.declAST.nodeType == NodeType.FuncDecl && context.scopeChain.previous.scope.container.declAST.isConstructor) { // if the parent is the class constructor, use the constructor scope parentScope = instType.constructorScope; } @@ -685,12 +681,7 @@ var TypeScript; outerFnc.innerStaticFuncs[outerFnc.innerStaticFuncs.length] = funcDecl; } else { - if (!funcDecl.isConstructor && - container && - container.declAST && - container.declAST.nodeType == NodeType.FuncDecl && - container.declAST.isConstructor && - !funcDecl.isMethod()) { + if (!funcDecl.isConstructor && container && container.declAST && container.declAST.nodeType == NodeType.FuncDecl && container.declAST.isConstructor && !funcDecl.isMethod()) { funcScope = context.scopeChain.thisType.constructorScope; //locals; } else { @@ -711,11 +702,7 @@ var TypeScript; } context.typeFlow.checker.createFunctionSignature(funcDecl, container, funcScope, fgSym, fgSym == null); // it's a getter or setter for a class property - if (!funcDecl.accessorSymbol && - (funcDecl.fncFlags & FncFlags.ClassMethod) && - container && - ((!fgSym || fgSym.declAST.nodeType != NodeType.FuncDecl) && funcDecl.isAccessor()) || - (fgSym && fgSym.isAccessor())) { + if (!funcDecl.accessorSymbol && (funcDecl.fncFlags & FncFlags.ClassMethod) && container && ((!fgSym || fgSym.declAST.nodeType != NodeType.FuncDecl) && funcDecl.isAccessor()) || (fgSym && fgSym.isAccessor())) { funcDecl.accessorSymbol = context.typeFlow.checker.createAccessorSymbol(funcDecl, fgSym, container.getType(), (funcDecl.isMethod() && isStatic), true, funcScope, container); } funcDecl.type.symbol.flags |= SymbolFlags.TypeSetDuringScopeAssignment; diff --git a/tests/baselines/reference/parserRealSource9.js b/tests/baselines/reference/parserRealSource9.js index dba28c4f295..5b1423bff39 100644 --- a/tests/baselines/reference/parserRealSource9.js +++ b/tests/baselines/reference/parserRealSource9.js @@ -364,7 +364,9 @@ var TypeScript; // context of a given module (E.g., an outer import statement) if (typeSymbol.aliasLink && !typeSymbol.type && typeSymbol.aliasLink.alias.nodeType == NodeType.Name) { var modPath = typeSymbol.aliasLink.alias.text; - var modSym = this.checker.findSymbolForDynamicModule(modPath, this.checker.locationInfo.filename, function (id) { return scope.find(id, false, true); }); + var modSym = this.checker.findSymbolForDynamicModule(modPath, this.checker.locationInfo.filename, function (id) { + return scope.find(id, false, true); + }); if (modSym) { typeSymbol.type = modSym.getType(); } diff --git a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.js b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.js index c3e61545c2c..79e0c04d409 100644 --- a/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.js +++ b/tests/baselines/reference/parserRegularExpressionDivideAmbiguity1.js @@ -3,5 +3,4 @@ /notregexp/a.foo(); //// [parserRegularExpressionDivideAmbiguity1.js] -1 - / notregexp / a.foo(); +1 / notregexp / a.foo(); diff --git a/tests/baselines/reference/parserReturnStatement4.js b/tests/baselines/reference/parserReturnStatement4.js index f6800cbb8fd..aab5215ba07 100644 --- a/tests/baselines/reference/parserReturnStatement4.js +++ b/tests/baselines/reference/parserReturnStatement4.js @@ -2,4 +2,8 @@ var v = { get foo() { return } }; //// [parserReturnStatement4.js] -var v = { get foo() { return; } }; +var v = { + get foo() { + return; + } +}; diff --git a/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js b/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js index 651640c6466..a19675167c8 100644 --- a/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js +++ b/tests/baselines/reference/parserSetAccessorWithTypeParameters1.js @@ -8,7 +8,8 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "foo", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment1.js b/tests/baselines/reference/parserShorthandPropertyAssignment1.js index 0ef3c50d78f..2aabfc906ae 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment1.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment1.js @@ -4,6 +4,10 @@ var name:any, id: any; foo({ name?, id? }); //// [parserShorthandPropertyAssignment1.js] -function foo(obj) { } +function foo(obj) { +} var name, id; -foo({ name: name, id: id }); +foo({ + name: name, + id: id +}); diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment2.js b/tests/baselines/reference/parserShorthandPropertyAssignment2.js index 0de0fa3829f..f05c9b08b33 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment2.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment2.js @@ -2,4 +2,6 @@ var v = { class }; //// [parserShorthandPropertyAssignment2.js] -var v = { class: }; +var v = { + class: +}; diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment3.js b/tests/baselines/reference/parserShorthandPropertyAssignment3.js index 814a725dcba..a1d5ad3e646 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment3.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment3.js @@ -2,4 +2,6 @@ var v = { "" }; //// [parserShorthandPropertyAssignment3.js] -var v = { "": }; +var v = { + "": +}; diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment4.js b/tests/baselines/reference/parserShorthandPropertyAssignment4.js index e10928ae2ab..b0f05e2d9e3 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment4.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment4.js @@ -2,4 +2,6 @@ var v = { 0 }; //// [parserShorthandPropertyAssignment4.js] -var v = { 0: }; +var v = { + 0: +}; diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment5.js b/tests/baselines/reference/parserShorthandPropertyAssignment5.js index 90d74722a99..9dc4c781123 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment5.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment5.js @@ -4,4 +4,6 @@ var obj = { greet? }; //// [parserShorthandPropertyAssignment5.js] var greet = "hello"; -var obj = { greet: greet }; +var obj = { + greet: greet +}; diff --git a/tests/baselines/reference/parserSkippedTokens16.js b/tests/baselines/reference/parserSkippedTokens16.js index dfbd8a4277a..a31d0e7e248 100644 --- a/tests/baselines/reference/parserSkippedTokens16.js +++ b/tests/baselines/reference/parserSkippedTokens16.js @@ -11,12 +11,15 @@ var x = //// [parserSkippedTokens16.js] foo(); Bar; -{ } -{ } +{ +} +{ +} 4 + ; 5; var M; (function (M) { - function a(T) { } + function a(T) { + } })(M || (M = {})); var x = ; diff --git a/tests/baselines/reference/parserStrictMode12.js b/tests/baselines/reference/parserStrictMode12.js index ce97b2a91cb..199ed43cc97 100644 --- a/tests/baselines/reference/parserStrictMode12.js +++ b/tests/baselines/reference/parserStrictMode12.js @@ -4,4 +4,7 @@ var v = { set foo(eval) { } } //// [parserStrictMode12.js] "use strict"; -var v = { set foo(eval) { } }; +var v = { + set foo(eval) { + } +}; diff --git a/tests/baselines/reference/parserSymbolIndexer5.js b/tests/baselines/reference/parserSymbolIndexer5.js index 3aa046e2114..43c456b64aa 100644 --- a/tests/baselines/reference/parserSymbolIndexer5.js +++ b/tests/baselines/reference/parserSymbolIndexer5.js @@ -5,5 +5,6 @@ var x = { //// [parserSymbolIndexer5.js] var x = { - [s]: symbol, "": + [s]: symbol, + "": }; diff --git a/tests/baselines/reference/parserSymbolProperty7.js b/tests/baselines/reference/parserSymbolProperty7.js index 9368fd12855..9d34b9e3bce 100644 --- a/tests/baselines/reference/parserSymbolProperty7.js +++ b/tests/baselines/reference/parserSymbolProperty7.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.prototype[Symbol.toStringTag] = function () { }; + C.prototype[Symbol.toStringTag] = function () { + }; return C; })(); diff --git a/tests/baselines/reference/parserUnaryExpression2.js b/tests/baselines/reference/parserUnaryExpression2.js index 2d1fa8eef56..97b17b2b800 100644 --- a/tests/baselines/reference/parserUnaryExpression2.js +++ b/tests/baselines/reference/parserUnaryExpression2.js @@ -2,4 +2,5 @@ ++function(e) { } //// [parserUnaryExpression2.js] -++function (e) { }; +++function (e) { +}; diff --git a/tests/baselines/reference/parserUnaryExpression3.js b/tests/baselines/reference/parserUnaryExpression3.js index 37a9f72e7b2..f075032a7c9 100644 --- a/tests/baselines/reference/parserUnaryExpression3.js +++ b/tests/baselines/reference/parserUnaryExpression3.js @@ -2,4 +2,6 @@ ++[0]; //// [parserUnaryExpression3.js] -++[0]; +++[ + 0 +]; diff --git a/tests/baselines/reference/parserUnicodeWhitespaceCharacter1.js b/tests/baselines/reference/parserUnicodeWhitespaceCharacter1.js index dfd9b807053..e6f7a2374e5 100644 --- a/tests/baselines/reference/parserUnicodeWhitespaceCharacter1.js +++ b/tests/baselines/reference/parserUnicodeWhitespaceCharacter1.js @@ -3,4 +3,5 @@ function foo(){ } //// [parserUnicodeWhitespaceCharacter1.js] -function foo() { } +function foo() { +} diff --git a/tests/baselines/reference/parserUsingConstructorAsIdentifier.js b/tests/baselines/reference/parserUsingConstructorAsIdentifier.js index ebf5663573c..c239bbe3c31 100644 --- a/tests/baselines/reference/parserUsingConstructorAsIdentifier.js +++ b/tests/baselines/reference/parserUsingConstructorAsIdentifier.js @@ -41,7 +41,8 @@ //// [parserUsingConstructorAsIdentifier.js] function define(constructor, instanceMembers, staticMembers) { - constructor = constructor || function () { }; + constructor = constructor || function () { + }; PluginUtilities.Utilities.markSupportedForProcessing(constructor); if (instanceMembers) { initializeProperties(constructor.prototype, instanceMembers); @@ -53,11 +54,17 @@ function define(constructor, instanceMembers, staticMembers) { } function derive(baseClass, constructor, instanceMembers, staticMembers) { if (baseClass) { - constructor = constructor || function () { }; + constructor = constructor || function () { + }; var basePrototype = baseClass.prototype; constructor.prototype = Object.create(basePrototype); PluginUtilities.Utilities.markSupportedForProcessing(constructor); - Object.defineProperty(constructor.prototype, "constructor", { value: constructor, writable: true, configurable: true, enumerable: true }); + Object.defineProperty(constructor.prototype, "constructor", { + value: constructor, + writable: true, + configurable: true, + enumerable: true + }); if (instanceMembers) { initializeProperties(constructor.prototype, instanceMembers); } @@ -71,7 +78,8 @@ function derive(baseClass, constructor, instanceMembers, staticMembers) { } } function mix(constructor) { - constructor = constructor || function () { }; + constructor = constructor || function () { + }; var i, len; for (i = 1, len = arguments.length; i < len; i++) { initializeProperties(constructor.prototype, arguments[i]); diff --git a/tests/baselines/reference/parserharness.js b/tests/baselines/reference/parserharness.js index 02304380013..3645f21e5ce 100644 --- a/tests/baselines/reference/parserharness.js +++ b/tests/baselines/reference/parserharness.js @@ -2151,7 +2151,9 @@ var Harness; function bugs(content) { var bugs = content.match(/\bbug (\d+)/i); if (bugs) { - bugs.forEach(function (bug) { return assert.bug(bug); }); + bugs.forEach(function (bug) { + return assert.bug(bug); + }); } } Assert.bugs = bugs; @@ -2164,7 +2166,9 @@ var Harness; function arrayLengthIs(arr, length) { if (arr.length != length) { var actual = ''; - arr.forEach(function (n) { return actual = actual + '\n ' + n.toString(); }); + arr.forEach(function (n) { + return actual = actual + '\n ' + n.toString(); + }); Assert.throwAssertError(new Error('Expected array to have ' + length + ' elements. Actual elements were:' + actual)); } } @@ -2271,17 +2275,28 @@ var Harness; var Logger = (function () { function Logger() { } - Logger.prototype.start = function (fileName, priority) { }; - Logger.prototype.end = function (fileName) { }; - Logger.prototype.scenarioStart = function (scenario) { }; - Logger.prototype.scenarioEnd = function (scenario, error) { }; - Logger.prototype.testStart = function (test) { }; - Logger.prototype.pass = function (test) { }; - Logger.prototype.bug = function (test) { }; - Logger.prototype.fail = function (test) { }; - Logger.prototype.error = function (test, error) { }; - Logger.prototype.comment = function (comment) { }; - Logger.prototype.verify = function (test, passed, actual, expected, message) { }; + Logger.prototype.start = function (fileName, priority) { + }; + Logger.prototype.end = function (fileName) { + }; + Logger.prototype.scenarioStart = function (scenario) { + }; + Logger.prototype.scenarioEnd = function (scenario, error) { + }; + Logger.prototype.testStart = function (test) { + }; + Logger.prototype.pass = function (test) { + }; + Logger.prototype.bug = function (test) { + }; + Logger.prototype.fail = function (test) { + }; + Logger.prototype.error = function (test, error) { + }; + Logger.prototype.comment = function (comment) { + }; + Logger.prototype.verify = function (test, passed, actual, expected, message) { + }; return Logger; })(); Harness.Logger = Logger; @@ -2348,13 +2363,16 @@ var Harness; return false; } }; - Runnable.prototype.run = function (done) { }; + Runnable.prototype.run = function (done) { + }; Runnable.prototype.runBlock = function (done) { return this.call(this.block, done); }; Runnable.prototype.runChild = function (index, done) { var _this = this; - return this.call((function (done) { return _this.children[index].run(done); }), done); + return this.call((function (done) { + return _this.children[index].run(done); + }), done); }; Runnable.pushGlobalErrorHandler = function (done) { errorHandlerStack.push(function (e) { @@ -2392,17 +2410,25 @@ var Harness; TestCase.prototype.run = function (done) { var that = this; Runnable.currentStack.push(this); - emitLog('testStart', { desc: this.description }); + emitLog('testStart', { + desc: this.description + }); if (this.block) { var async = this.runBlock(function (e) { if (e) { that.passed = false; that.error = e; - emitLog('error', { desc: this.description, pass: false }, e); + emitLog('error', { + desc: this.description, + pass: false + }, e); } else { that.passed = true; - emitLog('pass', { desc: this.description, pass: true }); + emitLog('pass', { + desc: this.description, + pass: true + }); } Runnable.currentStack.pop(); done(); @@ -2423,15 +2449,24 @@ var Harness; Scenario.prototype.run = function (done) { var that = this; Runnable.currentStack.push(this); - emitLog('scenarioStart', { desc: this.description }); + emitLog('scenarioStart', { + desc: this.description + }); var async = this.runBlock(function (e) { Runnable.currentStack.pop(); if (e) { that.passed = false; that.error = e; - var metadata = { id: undefined, desc: this.description, pass: false, bugs: assert.bugIds }; + var metadata = { + id: undefined, + desc: this.description, + pass: false, + bugs: assert.bugIds + }; // Report all bugs affecting this scenario - assert.bugIds.forEach(function (desc) { return emitLog('bug', metadata, desc); }); + assert.bugIds.forEach(function (desc) { + return emitLog('bug', metadata, desc); + }); emitLog('scenarioEnd', metadata, e); done(); } @@ -2458,9 +2493,16 @@ var Harness; if (async) return; } - var metadata = { id: undefined, desc: this.description, pass: this.passed, bugs: assert.bugIds }; + var metadata = { + id: undefined, + desc: this.description, + pass: this.passed, + bugs: assert.bugIds + }; // Report all bugs affecting this scenario - assert.bugIds.forEach(function (desc) { return emitLog('bug', metadata, desc); }); + assert.bugIds.forEach(function (desc) { + return emitLog('bug', metadata, desc); + }); emitLog('scenarioEnd', metadata); done(); }; @@ -2585,11 +2627,16 @@ var Harness; this.description = ""; this.results = {}; } - Benchmark.prototype.bench = function (subBench) { }; - Benchmark.prototype.before = function () { }; - Benchmark.prototype.beforeEach = function () { }; - Benchmark.prototype.after = function () { }; - Benchmark.prototype.afterEach = function () { }; + Benchmark.prototype.bench = function (subBench) { + }; + Benchmark.prototype.before = function () { + }; + Benchmark.prototype.beforeEach = function () { + }; + Benchmark.prototype.after = function () { + }; + Benchmark.prototype.afterEach = function () { + }; Benchmark.prototype.addTimingFor = function (name, timing) { this.results[name] = this.results[name] || new Dataset(); this.results[name].add(timing); @@ -2625,9 +2672,13 @@ var Harness; b.after(); for (var prop in b.results) { var description = b.description + (prop ? ": " + prop : ''); - emitLog('testStart', { desc: description }); + emitLog('testStart', { + desc: description + }); emitLog('pass', { - desc: description, pass: true, perfResults: { + desc: description, + pass: true, + perfResults: { mean: b.results[prop].mean(), min: b.results[prop].min(), max: b.results[prop].max(), @@ -2692,10 +2743,18 @@ var Harness; this.fileCollection[s] = writer; return writer; }; - EmitterIOHost.prototype.directoryExists = function (s) { return false; }; - EmitterIOHost.prototype.fileExists = function (s) { return typeof this.fileCollection[s] !== 'undefined'; }; - EmitterIOHost.prototype.resolvePath = function (s) { return s; }; - EmitterIOHost.prototype.reset = function () { this.fileCollection = {}; }; + EmitterIOHost.prototype.directoryExists = function (s) { + return false; + }; + EmitterIOHost.prototype.fileExists = function (s) { + return typeof this.fileCollection[s] !== 'undefined'; + }; + EmitterIOHost.prototype.resolvePath = function (s) { + return s; + }; + EmitterIOHost.prototype.reset = function () { + this.fileCollection = {}; + }; EmitterIOHost.prototype.toArray = function () { var result = []; for (var p in this.fileCollection) { @@ -2705,7 +2764,10 @@ var Harness; if (p !== '0.js') { current.lines.unshift('////[' + p + ']'); } - result.push({ filename: p, file: this.fileCollection[p] }); + result.push({ + filename: p, + file: this.fileCollection[p] + }); } } } @@ -2769,7 +2831,9 @@ var Harness; Type.prototype.normalizeToArray = function (arg) { if ((Array.isArray && Array.isArray(arg)) || arg instanceof Array) return arg; - return [arg]; + return [ + arg + ]; }; Type.prototype.compilesOk = function (testCode) { var errors = null; @@ -2927,7 +2991,9 @@ var Harness; var tyInfo = compiler.pullGetTypeInfoAtPosition(targetPosition, script2); var name = this.getTypeInfoName(tyInfo.ast); var foundValue = new Type(tyInfo.typeInfo, code, name); - if (!matchingIdentifiers.some(function (value) { return (value.identifier === foundValue.identifier) && (value.code === foundValue.code) && (value.type === foundValue.type); })) { + if (!matchingIdentifiers.some(function (value) { + return (value.identifier === foundValue.identifier) && (value.code === foundValue.code) && (value.type === foundValue.type); + })) { matchingIdentifiers.push(foundValue); } } @@ -2937,7 +3003,9 @@ var Harness; var name = this.getTypeInfoName(tyInfo.ast); if (name === targetIdentifier) { var foundValue = new Type(tyInfo.typeInfo, code, targetIdentifier); - if (!matchingIdentifiers.some(function (value) { return (value.identifier === foundValue.identifier) && (value.code === foundValue.code) && (value.type === foundValue.type); })) { + if (!matchingIdentifiers.some(function (value) { + return (value.identifier === foundValue.identifier) && (value.code === foundValue.code) && (value.type === foundValue.type); + })) { matchingIdentifiers.push(foundValue); } } @@ -3043,9 +3111,15 @@ var Harness; outputs[fn] = new Harness.Compiler.WriterAggregator(); return outputs[fn]; }, - directoryExists: function (path) { return true; }, - fileExists: function (path) { return true; }, - resolvePath: function (path) { return path; } + directoryExists: function (path) { + return true; + }, + fileExists: function (path) { + return true; + }, + resolvePath: function (path) { + return path; + } }); compiler.emitDeclarations(); var results = null; @@ -3086,7 +3160,9 @@ var Harness; this.fileResults = fileResults; this.scripts = scripts; var lines = []; - fileResults.forEach(function (v) { return lines = lines.concat(v.file.lines); }); + fileResults.forEach(function (v) { + return lines = lines.concat(v.file.lines); + }); this.code = lines.join("\n"); this.errors = []; for (var i = 0; i < errorLines.length; i++) { @@ -3143,7 +3219,9 @@ var Harness; function reset() { stdout.reset(); stderr.reset(); - var files = compiler.units.map(function (value) { return value.filename; }); + var files = compiler.units.map(function (value) { + return value.filename; + }); for (var i = 0; i < files.length; i++) { var fname = files[i]; if (fname !== 'lib.d.ts') { @@ -3304,12 +3382,24 @@ var Harness; (function (TestCaseParser) { optionRegex = /^[\/]{2}\s*@(\w+):\s*(\S*)/gm; // multiple matches on multiple lines // List of allowed metadata names - var fileMetadataNames = ["filename", "comments", "declaration", "module", "nolib", "sourcemap", "target", "out"]; + var fileMetadataNames = [ + "filename", + "comments", + "declaration", + "module", + "nolib", + "sourcemap", + "target", + "out" + ]; function extractCompilerSettings(content) { var opts = []; var match; while ((match = optionRegex.exec(content)) != null) { - opts.push({ flag: match[1], value: match[2] }); + opts.push({ + flag: match[1], + value: match[2] + }); } return opts; } @@ -3402,7 +3492,10 @@ var Harness; references: refs }; files.push(newTestFile); - return { settings: settings, testUnitData: files }; + return { + settings: settings, + testUnitData: files + }; } TestCaseParser.makeUnitsFromTest = makeUnitsFromTest; })(TestCaseParser = Harness.TestCaseParser || (Harness.TestCaseParser = {})); @@ -3449,9 +3542,21 @@ var Harness; return TypeScript.ScriptEditRange.unknown(); } var entries = this.editRanges.slice(initialEditRangeIndex); - var minDistFromStart = entries.map(function (x) { return x.editRange.minChar; }).reduce(function (prev, current) { return Math.min(prev, current); }); - var minDistFromEnd = entries.map(function (x) { return x.length - x.editRange.limChar; }).reduce(function (prev, current) { return Math.min(prev, current); }); - var aggDelta = entries.map(function (x) { return x.editRange.delta; }).reduce(function (prev, current) { return prev + current; }); + var minDistFromStart = entries.map(function (x) { + return x.editRange.minChar; + }).reduce(function (prev, current) { + return Math.min(prev, current); + }); + var minDistFromEnd = entries.map(function (x) { + return x.length - x.editRange.limChar; + }).reduce(function (prev, current) { + return Math.min(prev, current); + }); + var aggDelta = entries.map(function (x) { + return x.editRange.delta; + }).reduce(function (prev, current) { + return prev + current; + }); return new TypeScript.ScriptEditRange(minDistFromStart, entries[0].length - minDistFromEnd, aggDelta); }; return ScriptInfo; @@ -3501,11 +3606,21 @@ var Harness; ////////////////////////////////////////////////////////////////////// // ILogger implementation // - TypeScriptLS.prototype.information = function () { return false; }; - TypeScriptLS.prototype.debug = function () { return true; }; - TypeScriptLS.prototype.warning = function () { return true; }; - TypeScriptLS.prototype.error = function () { return true; }; - TypeScriptLS.prototype.fatal = function () { return true; }; + TypeScriptLS.prototype.information = function () { + return false; + }; + TypeScriptLS.prototype.debug = function () { + return true; + }; + TypeScriptLS.prototype.warning = function () { + return true; + }; + TypeScriptLS.prototype.error = function () { + return true; + }; + TypeScriptLS.prototype.fatal = function () { + return true; + }; TypeScriptLS.prototype.log = function (s) { // For debugging... //IO.printLine("TypeScriptLS:" + s); @@ -3552,7 +3667,8 @@ var Harness; TypeScriptLS.prototype.parseSourceText = function (fileName, sourceText) { var parser = new TypeScript.Parser(); parser.setErrorRecovery(null); - parser.errorCallback = function (a, b, c, d) { }; + parser.errorCallback = function (a, b, c, d) { + }; var script = parser.parse(sourceText, fileName, 0); return script; }; @@ -3612,7 +3728,10 @@ var Harness; function mapEdits(edits) { var result = []; for (var i = 0; i < edits.length; i++) { - result.push({ edit: edits[i], index: i }); + result.push({ + edit: edits[i], + index: i + }); } return result; } @@ -3654,7 +3773,9 @@ var Harness; return result; }; TypeScriptLS.prototype.getHostSettings = function () { - return JSON.stringify({ usePullLanguageService: Harness.usePull }); + return JSON.stringify({ + usePullLanguageService: Harness.usePull + }); }; return TypeScriptLS; })(); @@ -3691,7 +3812,9 @@ var Harness; Runner.runCollateral = runCollateral; function runJSString(code, callback) { // List of names that get overriden by various test code we eval - var dangerNames = ['Array']; + var dangerNames = [ + 'Array' + ]; var globalBackup = {}; var n = null; for (n in dangerNames) { @@ -3809,7 +3932,10 @@ var Harness; expected = expected.replace(/\r\n?/g, '\n'); actual = actual.replace(/\r\n?/g, '\n'); } - return { expected: expected, actual: actual }; + return { + expected: expected, + actual: actual + }; } function writeComparison(expected, actual, relativeFilename, actualFilename, descriptionForDescribe) { if (expected != actual) { diff --git a/tests/baselines/reference/parserindenter.js b/tests/baselines/reference/parserindenter.js index 511e75ea135..514a24afcf6 100644 --- a/tests/baselines/reference/parserindenter.js +++ b/tests/baselines/reference/parserindenter.js @@ -778,10 +778,7 @@ var Formatting; } Indenter.prototype.GetIndentationEdits = function (token, nextToken, node, sameLineIndent) { if (this.logger.information()) { - this.logger.log("GetIndentationEdits(" + - "t1=[" + token.Span.startPosition() + "," + token.Span.endPosition() + "], " + - "t2=[" + (nextToken == null ? "null" : (nextToken.Span.startPosition() + "," + nextToken.Span.endPosition())) + "]" + - ")"); + this.logger.log("GetIndentationEdits(" + "t1=[" + token.Span.startPosition() + "," + token.Span.endPosition() + "], " + "t2=[" + (nextToken == null ? "null" : (nextToken.Span.startPosition() + "," + nextToken.Span.endPosition())) + "]" + ")"); } var result = this.GetIndentationEditsWorker(token, nextToken, node, sameLineIndent); if (this.logger.information()) { @@ -941,8 +938,7 @@ var Formatting; }; Indenter.prototype.GetSpecialCaseIndentationForLCurly = function (node) { var indentationInfo = null; - if (node.AuthorNode.Details.Kind == AuthorParseNodeKind.apnkFncDecl || - node.AuthorNode.EdgeLabel == AuthorParseNodeEdge.apneThen || node.AuthorNode.EdgeLabel == AuthorParseNodeEdge.apneElse) { + if (node.AuthorNode.Details.Kind == AuthorParseNodeKind.apnkFncDecl || node.AuthorNode.EdgeLabel == AuthorParseNodeEdge.apneThen || node.AuthorNode.EdgeLabel == AuthorParseNodeEdge.apneElse) { // flushed with the node (function & if) indentationInfo = node.GetNodeStartLineIndentation(this); return indentationInfo; @@ -1237,8 +1233,7 @@ var Formatting; // Get the parent that is really on a different line from the self node var startNodeLineNumber = this.snapshot.GetLineNumberFromPosition(tree.StartNodeSelf.AuthorNode.Details.StartOffset); parent = tree.StartNodeSelf.Parent; - while (parent != null && - startNodeLineNumber == this.snapshot.GetLineNumberFromPosition(parent.AuthorNode.Details.StartOffset)) { + while (parent != null && startNodeLineNumber == this.snapshot.GetLineNumberFromPosition(parent.AuthorNode.Details.StartOffset)) { parent = parent.Parent; } } @@ -1336,8 +1331,7 @@ var Formatting; } }; Indenter.prototype.IsMultiLineString = function (token) { - return token.tokenID === TypeScript.TokenID.StringLiteral && - this.snapshot.GetLineNumberFromPosition(token.Span.endPosition()) > this.snapshot.GetLineNumberFromPosition(token.Span.startPosition()); + return token.tokenID === TypeScript.TokenID.StringLiteral && this.snapshot.GetLineNumberFromPosition(token.Span.endPosition()) > this.snapshot.GetLineNumberFromPosition(token.Span.startPosition()); }; return Indenter; })(); diff --git a/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js b/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js index 8b197fd35a4..add4e3a69f3 100644 --- a/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js +++ b/tests/baselines/reference/parsingClassRecoversWhenHittingUnexpectedSemicolon.js @@ -9,6 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype.f = function () { }; + C.prototype.f = function () { + }; return C; })(); diff --git a/tests/baselines/reference/partiallyAmbientFundule.js b/tests/baselines/reference/partiallyAmbientFundule.js index 9b52ca2147f..21cb5179aef 100644 --- a/tests/baselines/reference/partiallyAmbientFundule.js +++ b/tests/baselines/reference/partiallyAmbientFundule.js @@ -5,4 +5,5 @@ declare module foo { function foo () { } // Legal, because module is ambient //// [partiallyAmbientFundule.js] -function foo() { } // Legal, because module is ambient +function foo() { +} // Legal, because module is ambient diff --git a/tests/baselines/reference/plusOperatorWithAnyOtherType.js b/tests/baselines/reference/plusOperatorWithAnyOtherType.js index 33ac4ebb144..5a30af7e9f6 100644 --- a/tests/baselines/reference/plusOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/plusOperatorWithAnyOtherType.js @@ -60,9 +60,17 @@ var ResultIsNumber19 = +(undefined + undefined); // + operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: function (s) { }, y: function (s1) { } }; +var obj1 = { + x: function (s) { + }, + y: function (s1) { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/plusOperatorWithBooleanType.js b/tests/baselines/reference/plusOperatorWithBooleanType.js index 5af1a8fb903..81c62222805 100644 --- a/tests/baselines/reference/plusOperatorWithBooleanType.js +++ b/tests/baselines/reference/plusOperatorWithBooleanType.js @@ -38,11 +38,15 @@ var ResultIsNumber7 = +A.foo(); //// [plusOperatorWithBooleanType.js] // + operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -54,7 +58,10 @@ var objA = new A(); var ResultIsNumber1 = +BOOLEAN; // boolean type literal var ResultIsNumber2 = +true; -var ResultIsNumber3 = +{ x: true, y: false }; +var ResultIsNumber3 = +{ + x: true, + y: false +}; // boolean type expressions var ResultIsNumber4 = +objA.a; var ResultIsNumber5 = +M.n; diff --git a/tests/baselines/reference/plusOperatorWithNumberType.js b/tests/baselines/reference/plusOperatorWithNumberType.js index a0adaa5dec2..a42147e0a30 100644 --- a/tests/baselines/reference/plusOperatorWithNumberType.js +++ b/tests/baselines/reference/plusOperatorWithNumberType.js @@ -44,12 +44,19 @@ var ResultIsNumber11 = +(NUMBER + NUMBER); //// [plusOperatorWithNumberType.js] // + operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -62,8 +69,16 @@ var ResultIsNumber1 = +NUMBER; var ResultIsNumber2 = +NUMBER1; // number type literal var ResultIsNumber3 = +1; -var ResultIsNumber4 = +{ x: 1, y: 2 }; -var ResultIsNumber5 = +{ x: 1, y: function (n) { return n; } }; +var ResultIsNumber4 = +{ + x: 1, + y: 2 +}; +var ResultIsNumber5 = +{ + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsNumber6 = +objA.a; var ResultIsNumber7 = +M.n; diff --git a/tests/baselines/reference/plusOperatorWithStringType.js b/tests/baselines/reference/plusOperatorWithStringType.js index ed2c60111b3..b725f62adbe 100644 --- a/tests/baselines/reference/plusOperatorWithStringType.js +++ b/tests/baselines/reference/plusOperatorWithStringType.js @@ -43,12 +43,19 @@ var ResultIsNumber12 = +STRING.charAt(0); //// [plusOperatorWithStringType.js] // + operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -61,8 +68,16 @@ var ResultIsNumber1 = +STRING; var ResultIsNumber2 = +STRING1; // string type literal var ResultIsNumber3 = +""; -var ResultIsNumber4 = +{ x: "", y: "" }; -var ResultIsNumber5 = +{ x: "", y: function (s) { return s; } }; +var ResultIsNumber4 = +{ + x: "", + y: "" +}; +var ResultIsNumber5 = +{ + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsNumber6 = +objA.a; var ResultIsNumber7 = +M.n; diff --git a/tests/baselines/reference/primitiveConstraints1.js b/tests/baselines/reference/primitiveConstraints1.js index 9ee39d74e80..7d697e57dfa 100644 --- a/tests/baselines/reference/primitiveConstraints1.js +++ b/tests/baselines/reference/primitiveConstraints1.js @@ -7,7 +7,9 @@ foo2(1, 'hm'); // error //// [primitiveConstraints1.js] -function foo1(t, u) { } +function foo1(t, u) { +} foo1('hm', 1); // no error -function foo2(t, u) { } +function foo2(t, u) { +} foo2(1, 'hm'); // error diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index bf3f1a17105..18ade7ca775 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -48,7 +48,9 @@ var N; n = N; // should not work, as 'number' has a different brand N = n; // should work var o = {}; -var f = function (x) { return x.length; }; +var f = function (x) { + return x.length; +}; var r2 = /./g; var n2 = 34; var s = "yo"; @@ -57,7 +59,8 @@ var n3 = 5 || {}; var baz = (function () { function baz() { } - baz.prototype.bar = function () { }; + baz.prototype.bar = function () { + }; return baz; })(); var foo = (function (_super) { @@ -65,6 +68,8 @@ var foo = (function (_super) { function foo() { _super.apply(this, arguments); } - foo.prototype.bar = function () { return undefined; }; + foo.prototype.bar = function () { + return undefined; + }; return foo; })(baz); diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.js b/tests/baselines/reference/primtiveTypesAreIdentical.js index 19bdadb4cee..00a77fac917 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.js +++ b/tests/baselines/reference/primtiveTypesAreIdentical.js @@ -33,14 +33,21 @@ function foo7(x: any) { } //// [primtiveTypesAreIdentical.js] // primitive types are identical to themselves so these overloads will all cause errors -function foo1(x) { } -function foo2(x) { } -function foo3(x) { } -function foo4(x) { } -function foo5(x) { } +function foo1(x) { +} +function foo2(x) { +} +function foo3(x) { +} +function foo4(x) { +} +function foo5(x) { +} var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function foo6(x) { } -function foo7(x) { } +function foo6(x) { +} +function foo7(x) { +} diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js index 116b255a921..e754d49280c 100644 --- a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.js @@ -37,20 +37,34 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { return this.foo; }; + C.prototype.foo = function () { + return this.foo; + }; Object.defineProperty(C, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.foo = function () { return this.foo; }; - C.bar = function () { this.foo(); }; + C.foo = function () { + return this.foo; + }; + C.bar = function () { + this.foo(); + }; return C; })(); // added level of function nesting @@ -60,40 +74,54 @@ var C2 = (function () { Object.defineProperty(C2.prototype, "y", { get: function () { var _this = this; - (function () { return _this.x; }); + (function () { + return _this.x; + }); return null; }, set: function (x) { var _this = this; - (function () { _this.y = _this.x; }); + (function () { + _this.y = _this.x; + }); }, enumerable: true, configurable: true }); C2.prototype.foo = function () { var _this = this; - (function () { return _this.foo; }); + (function () { + return _this.foo; + }); }; Object.defineProperty(C2, "y", { get: function () { var _this = this; - (function () { return _this.x; }); + (function () { + return _this.x; + }); return null; }, set: function (x) { var _this = this; - (function () { _this.y = _this.x; }); + (function () { + _this.y = _this.x; + }); }, enumerable: true, configurable: true }); C2.foo = function () { var _this = this; - (function () { return _this.foo; }); + (function () { + return _this.foo; + }); }; C2.bar = function () { var _this = this; - (function () { return _this.foo(); }); + (function () { + return _this.foo(); + }); }; return C2; })(); diff --git a/tests/baselines/reference/privateInstanceVisibility.js b/tests/baselines/reference/privateInstanceVisibility.js index b730a763e1e..e1ccb287515 100644 --- a/tests/baselines/reference/privateInstanceVisibility.js +++ b/tests/baselines/reference/privateInstanceVisibility.js @@ -57,7 +57,9 @@ var Test; var C = (function () { function C() { } - C.prototype.getX = function () { return this.x; }; + C.prototype.getX = function () { + return this.x; + }; C.prototype.clone = function (other) { this.x = other.x; }; diff --git a/tests/baselines/reference/privateStaticMemberAccessibility.js b/tests/baselines/reference/privateStaticMemberAccessibility.js index fdcb2663299..dd022d8646a 100644 --- a/tests/baselines/reference/privateStaticMemberAccessibility.js +++ b/tests/baselines/reference/privateStaticMemberAccessibility.js @@ -24,7 +24,9 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { _super.apply(this, arguments); - this.bing = function () { return Base.foo; }; // error + this.bing = function () { + return Base.foo; + }; // error } Derived.bar = Base.foo; // error return Derived; diff --git a/tests/baselines/reference/privateVisibility.js b/tests/baselines/reference/privateVisibility.js index d70d7b4756f..80e0bf51a1b 100644 --- a/tests/baselines/reference/privateVisibility.js +++ b/tests/baselines/reference/privateVisibility.js @@ -32,8 +32,11 @@ var Foo = (function () { this.pubProp = 0; this.privProp = 0; } - Foo.prototype.pubMeth = function () { this.privMeth(); }; - Foo.prototype.privMeth = function () { }; + Foo.prototype.pubMeth = function () { + this.privMeth(); + }; + Foo.prototype.privMeth = function () { + }; return Foo; })(); var f = new Foo(); diff --git a/tests/baselines/reference/privateVisibles.js b/tests/baselines/reference/privateVisibles.js index b2cb673c681..c9206964f80 100644 --- a/tests/baselines/reference/privateVisibles.js +++ b/tests/baselines/reference/privateVisibles.js @@ -15,6 +15,8 @@ var Foo = (function () { this.pvar = 0; var n = this.pvar; } - Foo.prototype.meth = function () { var q = this.pvar; }; + Foo.prototype.meth = function () { + var q = this.pvar; + }; return Foo; })(); diff --git a/tests/baselines/reference/project/baseline/amd/decl.js b/tests/baselines/reference/project/baseline/amd/decl.js index ed53ca816db..96eaed7142c 100644 --- a/tests/baselines/reference/project/baseline/amd/decl.js +++ b/tests/baselines/reference/project/baseline/amd/decl.js @@ -1,7 +1,10 @@ define(["require", "exports"], function (require, exports) { ; function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } exports.point = point; }); diff --git a/tests/baselines/reference/project/baseline/node/decl.js b/tests/baselines/reference/project/baseline/node/decl.js index eb0c46dd93e..50cca2c0f42 100644 --- a/tests/baselines/reference/project/baseline/node/decl.js +++ b/tests/baselines/reference/project/baseline/node/decl.js @@ -1,5 +1,8 @@ ; function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } exports.point = point; diff --git a/tests/baselines/reference/project/baseline2/amd/decl.js b/tests/baselines/reference/project/baseline2/amd/decl.js index ed53ca816db..96eaed7142c 100644 --- a/tests/baselines/reference/project/baseline2/amd/decl.js +++ b/tests/baselines/reference/project/baseline2/amd/decl.js @@ -1,7 +1,10 @@ define(["require", "exports"], function (require, exports) { ; function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } exports.point = point; }); diff --git a/tests/baselines/reference/project/baseline2/amd/dont_emit.js b/tests/baselines/reference/project/baseline2/amd/dont_emit.js index d3e9e871c2d..6b45d747c1c 100644 --- a/tests/baselines/reference/project/baseline2/amd/dont_emit.js +++ b/tests/baselines/reference/project/baseline2/amd/dont_emit.js @@ -1,3 +1,6 @@ define(["require", "exports"], function (require, exports) { - var p = { x: 10, y: 20 }; + var p = { + x: 10, + y: 20 + }; }); diff --git a/tests/baselines/reference/project/baseline2/node/decl.js b/tests/baselines/reference/project/baseline2/node/decl.js index eb0c46dd93e..50cca2c0f42 100644 --- a/tests/baselines/reference/project/baseline2/node/decl.js +++ b/tests/baselines/reference/project/baseline2/node/decl.js @@ -1,5 +1,8 @@ ; function point(x, y) { - return { x: x, y: y }; + return { + x: x, + y: y + }; } exports.point = point; diff --git a/tests/baselines/reference/project/baseline2/node/dont_emit.js b/tests/baselines/reference/project/baseline2/node/dont_emit.js index b6239b1295d..4322b9c60b6 100644 --- a/tests/baselines/reference/project/baseline2/node/dont_emit.js +++ b/tests/baselines/reference/project/baseline2/node/dont_emit.js @@ -1 +1,4 @@ -var p = { x: 10, y: 20 }; +var p = { + x: 10, + y: 20 +}; diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js b/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js index 6ffe8c53445..5351258111e 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { - function hello() { } + function hello() { + } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js b/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js index 6ffe8c53445..5351258111e 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { - function hello() { } + function hello() { + } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js b/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js index 6ffe8c53445..5351258111e 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js @@ -1,4 +1,5 @@ define(["require", "exports"], function (require, exports) { - function hello() { } + function hello() { + } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js b/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js index 58114de3a4d..3bc8930ed53 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js @@ -1,2 +1,3 @@ -function hello() { } +function hello() { +} exports.hello = hello; diff --git a/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js b/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js index 58114de3a4d..3bc8930ed53 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js @@ -1,2 +1,3 @@ -function hello() { } +function hello() { +} exports.hello = hello; diff --git a/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js b/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js index 58114de3a4d..3bc8930ed53 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js @@ -1,2 +1,3 @@ -function hello() { } +function hello() { +} exports.hello = hello; diff --git a/tests/baselines/reference/project/prologueEmit/amd/out.js b/tests/baselines/reference/project/prologueEmit/amd/out.js index b19a07f6490..f311ea7ba24 100644 --- a/tests/baselines/reference/project/prologueEmit/amd/out.js +++ b/tests/baselines/reference/project/prologueEmit/amd/out.js @@ -1,6 +1,8 @@ var _this = this; // Add a lambda to ensure global 'this' capture is triggered -(function () { return _this.window; }); +(function () { + return _this.window; +}); var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/project/prologueEmit/node/out.js b/tests/baselines/reference/project/prologueEmit/node/out.js index b19a07f6490..f311ea7ba24 100644 --- a/tests/baselines/reference/project/prologueEmit/node/out.js +++ b/tests/baselines/reference/project/prologueEmit/node/out.js @@ -1,6 +1,8 @@ var _this = this; // Add a lambda to ensure global 'this' capture is triggered -(function () { return _this.window; }); +(function () { + return _this.window; +}); var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js index 115b5fff25f..649db9a606d 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js @@ -3,7 +3,8 @@ var test; var ClassA = (function () { function ClassA() { } - ClassA.prototype.method = function () { }; + ClassA.prototype.method = function () { + }; return ClassA; })(); test.ClassA = ClassA; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js index 115b5fff25f..649db9a606d 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js @@ -3,7 +3,8 @@ var test; var ClassA = (function () { function ClassA() { } - ClassA.prototype.method = function () { }; + ClassA.prototype.method = function () { + }; return ClassA; })(); test.ClassA = ClassA; diff --git a/tests/baselines/reference/promiseChaining.js b/tests/baselines/reference/promiseChaining.js index ce15e2d44c1..acf6b715175 100644 --- a/tests/baselines/reference/promiseChaining.js +++ b/tests/baselines/reference/promiseChaining.js @@ -19,7 +19,13 @@ var Chain = (function () { Chain.prototype.then = function (cb) { var result = cb(this.value); // should get a fresh type parameter which each then call - var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*string*/.then(function (x) { return x.length; }); // No error + var z = this.then(function (x) { + return result; + }) /*S*/.then(function (x) { + return "abc"; + }) /*string*/.then(function (x) { + return x.length; + }); // No error return new Chain(result); }; return Chain; diff --git a/tests/baselines/reference/promiseChaining1.js b/tests/baselines/reference/promiseChaining1.js index 001f1ffc1a6..54e5064809e 100644 --- a/tests/baselines/reference/promiseChaining1.js +++ b/tests/baselines/reference/promiseChaining1.js @@ -19,7 +19,13 @@ var Chain2 = (function () { Chain2.prototype.then = function (cb) { var result = cb(this.value); // should get a fresh type parameter which each then call - var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*Function*/.then(function (x) { return x.length; }); // Should error on "abc" because it is not a Function + var z = this.then(function (x) { + return result; + }) /*S*/.then(function (x) { + return "abc"; + }) /*Function*/.then(function (x) { + return x.length; + }); // Should error on "abc" because it is not a Function return new Chain2(result); }; return Chain2; diff --git a/tests/baselines/reference/promiseChaining2.js b/tests/baselines/reference/promiseChaining2.js index ed03ab2c97a..88b601aad82 100644 --- a/tests/baselines/reference/promiseChaining2.js +++ b/tests/baselines/reference/promiseChaining2.js @@ -19,7 +19,13 @@ var Chain2 = (function () { Chain2.prototype.then = function (cb) { var result = cb(this.value); // should get a fresh type parameter which each then call - var z = this.then(function (x) { return result; }).then(function (x) { return "abc"; }).then(function (x) { return x.length; }); + var z = this.then(function (x) { + return result; + }).then(function (x) { + return "abc"; + }).then(function (x) { + return x.length; + }); return new Chain2(result); }; return Chain2; diff --git a/tests/baselines/reference/promisePermutations.js b/tests/baselines/reference/promisePermutations.js index e59e49d6f8c..83b1f251e61 100644 --- a/tests/baselines/reference/promisePermutations.js +++ b/tests/baselines/reference/promisePermutations.js @@ -251,13 +251,17 @@ var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var r10 = testFunction10(function (x) { return x; }); +var r10 = testFunction10(function (x) { + return x; +}); var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // ok var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var s10 = testFunction10P(function (x) { return x; }); +var s10 = testFunction10P(function (x) { + return x; +}); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok @@ -271,9 +275,13 @@ var s11; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error -var r12 = testFunction12(function (x) { return x; }); +var r12 = testFunction12(function (x) { + return x; +}); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok -var s12 = testFunction12(function (x) { return x; }); +var s12 = testFunction12(function (x) { + return x; +}); var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promisePermutations2.js b/tests/baselines/reference/promisePermutations2.js index a7b5d8cf835..9a321e03667 100644 --- a/tests/baselines/reference/promisePermutations2.js +++ b/tests/baselines/reference/promisePermutations2.js @@ -251,13 +251,17 @@ var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var r10 = testFunction10(function (x) { return x; }); +var r10 = testFunction10(function (x) { + return x; +}); var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var s10 = testFunction10P(function (x) { return x; }); +var s10 = testFunction10P(function (x) { + return x; +}); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok @@ -271,9 +275,13 @@ var s11; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // ok -var r12 = testFunction12(function (x) { return x; }); +var r12 = testFunction12(function (x) { + return x; +}); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok -var s12 = testFunction12(function (x) { return x; }); +var s12 = testFunction12(function (x) { + return x; +}); var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promisePermutations3.js b/tests/baselines/reference/promisePermutations3.js index eb9c882b971..cbee4093a65 100644 --- a/tests/baselines/reference/promisePermutations3.js +++ b/tests/baselines/reference/promisePermutations3.js @@ -251,13 +251,17 @@ var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var r10 = testFunction10(function (x) { return x; }); +var r10 = testFunction10(function (x) { + return x; +}); var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok -var s10 = testFunction10P(function (x) { return x; }); +var s10 = testFunction10P(function (x) { + return x; +}); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok @@ -271,9 +275,13 @@ var s11; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error -var r12 = testFunction12(function (x) { return x; }); +var r12 = testFunction12(function (x) { + return x; +}); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok -var s12 = testFunction12(function (x) { return x; }); +var s12 = testFunction12(function (x) { + return x; +}); var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promiseTypeInference.js b/tests/baselines/reference/promiseTypeInference.js index 6faf131438a..8124c4b03a8 100644 --- a/tests/baselines/reference/promiseTypeInference.js +++ b/tests/baselines/reference/promiseTypeInference.js @@ -12,4 +12,6 @@ var $$x = load("something").then(s => convert(s)); //// [promiseTypeInference.js] -var $$x = load("something").then(function (s) { return convert(s); }); +var $$x = load("something").then(function (s) { + return convert(s); +}); diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index 735c8d3908f..f47b850a954 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -176,15 +176,28 @@ var Compass; Compass[Compass["East"] = 2] = "East"; Compass[Compass["West"] = 3] = "West"; })(Compass || (Compass = {})); -var numIndex = { 3: 'three', 'three': 'three' }; -var strIndex = { 'N': 0 /* North */, 'E': 2 /* East */ }; +var numIndex = { + 3: 'three', + 'three': 'three' +}; +var strIndex = { + 'N': 0 /* North */, + 'E': 2 /* East */ +}; var bothIndex; -function noIndex() { } +function noIndex() { +} var obj = { 10: 'ten', x: 'hello', y: 32, - z: { n: 'world', m: 15, o: function () { return false; } }, + z: { + n: 'world', + m: 15, + o: function () { + return false; + } + }, 'literal property': 100 }; var anyVar = {}; diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js index 88baee7752e..81cdcec5434 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints2.js @@ -92,7 +92,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js index 941adc7ab43..eb3770bc0b3 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints3.js @@ -67,7 +67,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js index fe3c9433796..3a88ec832f7 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints5.js @@ -54,7 +54,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/propertyAndAccessorWithSameName.js b/tests/baselines/reference/propertyAndAccessorWithSameName.js index f8978ac4d18..f466483cede 100644 --- a/tests/baselines/reference/propertyAndAccessorWithSameName.js +++ b/tests/baselines/reference/propertyAndAccessorWithSameName.js @@ -36,7 +36,8 @@ var D = (function () { function D() { } Object.defineProperty(D.prototype, "x", { - set: function (v) { } // error + set: function (v) { + } // error , enumerable: true, configurable: true @@ -50,7 +51,8 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/propertyAndFunctionWithSameName.js b/tests/baselines/reference/propertyAndFunctionWithSameName.js index eb0b437fd5c..ec5f1903e8a 100644 --- a/tests/baselines/reference/propertyAndFunctionWithSameName.js +++ b/tests/baselines/reference/propertyAndFunctionWithSameName.js @@ -23,6 +23,7 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.x = function (v) { }; // error + D.prototype.x = function (v) { + }; // error return D; })(); diff --git a/tests/baselines/reference/propertyOrdering.js b/tests/baselines/reference/propertyOrdering.js index f0f4644a983..1dc930f93a1 100644 --- a/tests/baselines/reference/propertyOrdering.js +++ b/tests/baselines/reference/propertyOrdering.js @@ -31,7 +31,9 @@ var Foo = (function () { Foo.prototype.foo = function () { return this._store.length; // shouldn't be an error }; - Foo.prototype.bar = function () { return this.store; }; // should be an error + Foo.prototype.bar = function () { + return this.store; + }; // should be an error return Foo; })(); var Bar = (function () { diff --git a/tests/baselines/reference/propertyWrappedInTry.js b/tests/baselines/reference/propertyWrappedInTry.js index e7f8a28d688..459e35f91ae 100644 --- a/tests/baselines/reference/propertyWrappedInTry.js +++ b/tests/baselines/reference/propertyWrappedInTry.js @@ -28,7 +28,8 @@ var Foo = (function () { try { bar = someInitThatMightFail(); } -catch (e) { } +catch (e) { +} baz(); { return this.bar; // doesn't get rewritten to Foo.bar. diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js index 19ec9f50d27..63c6929e8b7 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinClass.js @@ -37,20 +37,34 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { return this.foo; }; + C.prototype.foo = function () { + return this.foo; + }; Object.defineProperty(C, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.foo = function () { return this.foo; }; - C.bar = function () { this.foo(); }; + C.foo = function () { + return this.foo; + }; + C.bar = function () { + this.foo(); + }; return C; })(); // added level of function nesting @@ -60,40 +74,54 @@ var C2 = (function () { Object.defineProperty(C2.prototype, "y", { get: function () { var _this = this; - (function () { return _this.x; }); + (function () { + return _this.x; + }); return null; }, set: function (x) { var _this = this; - (function () { _this.y = _this.x; }); + (function () { + _this.y = _this.x; + }); }, enumerable: true, configurable: true }); C2.prototype.foo = function () { var _this = this; - (function () { return _this.foo; }); + (function () { + return _this.foo; + }); }; Object.defineProperty(C2, "y", { get: function () { var _this = this; - (function () { return _this.x; }); + (function () { + return _this.x; + }); return null; }, set: function (x) { var _this = this; - (function () { _this.y = _this.x; }); + (function () { + _this.y = _this.x; + }); }, enumerable: true, configurable: true }); C2.foo = function () { var _this = this; - (function () { return _this.foo; }); + (function () { + return _this.foo; + }); }; C2.bar = function () { var _this = this; - (function () { return _this.foo(); }); + (function () { + return _this.foo(); + }); }; return C2; })(); diff --git a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js index 28a1da5ffec..381d10f43ea 100644 --- a/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js +++ b/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.js @@ -38,20 +38,36 @@ var C = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(C.prototype, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.prototype.foo = function () { return this.x; }; - C.prototype.bar = function () { return this.foo(); }; + C.prototype.foo = function () { + return this.x; + }; + C.prototype.bar = function () { + return this.foo(); + }; Object.defineProperty(C, "y", { - get: function () { return this.x; }, - set: function (x) { this.y = this.x; }, + get: function () { + return this.x; + }, + set: function (x) { + this.y = this.x; + }, enumerable: true, configurable: true }); - C.foo = function () { return this.x; }; - C.bar = function () { this.foo(); }; + C.foo = function () { + return this.x; + }; + C.bar = function () { + this.foo(); + }; return C; })(B); diff --git a/tests/baselines/reference/prototypes.js b/tests/baselines/reference/prototypes.js index 4d7ddc4a4d5..4ecdafb3dc4 100644 --- a/tests/baselines/reference/prototypes.js +++ b/tests/baselines/reference/prototypes.js @@ -7,5 +7,6 @@ f.prototype; //// [prototypes.js] Object.prototype; // ok new Object().prototype; // error -function f() { } +function f() { +} f.prototype; diff --git a/tests/baselines/reference/qualifiedModuleLocals.js b/tests/baselines/reference/qualifiedModuleLocals.js index b7ba5b70e81..2909be7639d 100644 --- a/tests/baselines/reference/qualifiedModuleLocals.js +++ b/tests/baselines/reference/qualifiedModuleLocals.js @@ -13,8 +13,11 @@ A.a(); //// [qualifiedModuleLocals.js] var A; (function (A) { - function b() { } - function a() { A.b(); } + function b() { + } + function a() { + A.b(); + } A.a = a; // A.b should be an unresolved symbol error })(A || (A = {})); A.a(); diff --git a/tests/baselines/reference/quotedAccessorName1.js b/tests/baselines/reference/quotedAccessorName1.js index 69e0fdb2c8e..93fd5b8dd6b 100644 --- a/tests/baselines/reference/quotedAccessorName1.js +++ b/tests/baselines/reference/quotedAccessorName1.js @@ -8,7 +8,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "foo", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/quotedAccessorName2.js b/tests/baselines/reference/quotedAccessorName2.js index 5d2d4861550..43041a29bf4 100644 --- a/tests/baselines/reference/quotedAccessorName2.js +++ b/tests/baselines/reference/quotedAccessorName2.js @@ -8,7 +8,9 @@ var C = (function () { function C() { } Object.defineProperty(C, "foo", { - get: function () { return 0; }, + get: function () { + return 0; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/quotedFunctionName1.js b/tests/baselines/reference/quotedFunctionName1.js index 69f4f2cfaa3..28d75186474 100644 --- a/tests/baselines/reference/quotedFunctionName1.js +++ b/tests/baselines/reference/quotedFunctionName1.js @@ -7,6 +7,7 @@ class Test1 { var Test1 = (function () { function Test1() { } - Test1.prototype["prop1"] = function () { }; + Test1.prototype["prop1"] = function () { + }; return Test1; })(); diff --git a/tests/baselines/reference/quotedFunctionName2.js b/tests/baselines/reference/quotedFunctionName2.js index 3173ec29f13..46d8d9bae9d 100644 --- a/tests/baselines/reference/quotedFunctionName2.js +++ b/tests/baselines/reference/quotedFunctionName2.js @@ -7,6 +7,7 @@ class Test1 { var Test1 = (function () { function Test1() { } - Test1["prop1"] = function () { }; + Test1["prop1"] = function () { + }; return Test1; })(); diff --git a/tests/baselines/reference/quotedPropertyName3.js b/tests/baselines/reference/quotedPropertyName3.js index 4191418e42a..8e6342e1ba3 100644 --- a/tests/baselines/reference/quotedPropertyName3.js +++ b/tests/baselines/reference/quotedPropertyName3.js @@ -13,7 +13,9 @@ var Test = (function () { } Test.prototype.foo = function () { var _this = this; - var x = function () { return _this["prop1"]; }; + var x = function () { + return _this["prop1"]; + }; var y = x(); }; return Test; diff --git a/tests/baselines/reference/rectype.js b/tests/baselines/reference/rectype.js index 15c5d9861f4..ed303b6b26e 100644 --- a/tests/baselines/reference/rectype.js +++ b/tests/baselines/reference/rectype.js @@ -16,7 +16,9 @@ module M { //// [rectype.js] var M; (function (M) { - function f(p) { return f; } + function f(p) { + return f; + } M.f = f; ; var i; diff --git a/tests/baselines/reference/recur1.js b/tests/baselines/reference/recur1.js index 37a8b6eb3f2..3dd0e14ad97 100644 --- a/tests/baselines/reference/recur1.js +++ b/tests/baselines/reference/recur1.js @@ -9,6 +9,8 @@ cobalt.pitch = function() {} //// [recur1.js] var salt = new salt.pepper(); -salt.pepper = function () { }; +salt.pepper = function () { +}; var cobalt = new cobalt.pitch(); -cobalt.pitch = function () { }; +cobalt.pitch = function () { +}; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index c475f604b14..69a71a4f79c 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -16,7 +16,8 @@ var __extends = this.__extends || function (d, b) { var C1 = (function () { function C1() { } - C1.prototype.func = function (param) { }; + C1.prototype.func = function (param) { + }; return C1; })(); var C2 = (function (_super) { diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js b/tests/baselines/reference/recursiveClassReferenceTest.js index 4b115d3e722..f565f8f23d0 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js +++ b/tests/baselines/reference/recursiveClassReferenceTest.js @@ -122,7 +122,9 @@ var Sample; var StartFindAction = (function () { function StartFindAction() { } - StartFindAction.prototype.getId = function () { return "yo"; }; + StartFindAction.prototype.getId = function () { + return "yo"; + }; StartFindAction.prototype.run = function (Thing) { return true; }; @@ -146,9 +148,11 @@ var Sample; // scenario 1 codeThing.addWidget("addWidget", this); } - FindWidget.prototype.gar = function (runner) { if (true) { - return runner(this); - } }; + FindWidget.prototype.gar = function (runner) { + if (true) { + return runner(this); + } + }; FindWidget.prototype.getDomNode = function () { return domNode; }; @@ -163,7 +167,9 @@ var Sample; var AbstractMode = (function () { function AbstractMode() { } - AbstractMode.prototype.getInitialState = function () { return null; }; + AbstractMode.prototype.getInitialState = function () { + return null; + }; return AbstractMode; })(); var Sample; @@ -184,7 +190,9 @@ var Sample; State.prototype.equals = function (other) { return this === other; }; - State.prototype.getMode = function () { return mode; }; + State.prototype.getMode = function () { + return mode; + }; return State; })(); PlainText.State = State; diff --git a/tests/baselines/reference/recursiveClassReferenceTest.js.map b/tests/baselines/reference/recursiveClassReferenceTest.js.map index f9314fb2f6e..d77875f10e4 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.js.map +++ b/tests/baselines/reference/recursiveClassReferenceTest.js.map @@ -1,2 +1,2 @@ //// [recursiveClassReferenceTest.js.map] -{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":["Sample","Sample.Actions","Sample.Actions.Thing","Sample.Actions.Thing.Find","Sample.Actions.Thing.Find.StartFindAction","Sample.Actions.Thing.Find.StartFindAction.constructor","Sample.Actions.Thing.Find.StartFindAction.getId","Sample.Actions.Thing.Find.StartFindAction.run","Sample.Thing","Sample.Thing.Widgets","Sample.Thing.Widgets.FindWidget","Sample.Thing.Widgets.FindWidget.constructor","Sample.Thing.Widgets.FindWidget.gar","Sample.Thing.Widgets.FindWidget.getDomNode","Sample.Thing.Widgets.FindWidget.destroy","AbstractMode","AbstractMode.constructor","AbstractMode.getInitialState","Sample.Thing.Languages","Sample.Thing.Languages.PlainText","Sample.Thing.Languages.PlainText.State","Sample.Thing.Languages.PlainText.State.constructor","Sample.Thing.Languages.PlainText.State.clone","Sample.Thing.Languages.PlainText.State.equals","Sample.Thing.Languages.PlainText.State.getMode","Sample.Thing.Languages.PlainText.Mode","Sample.Thing.Languages.PlainText.Mode.constructor","Sample.Thing.Languages.PlainText.Mode.getInitialState"],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAACA,IAAAA,OAAOA,CAUpBA;IAVaA,WAAAA,OAAOA;QAACC,IAAAA,KAAKA,CAU1BA;QAVqBA,WAAAA,QAAKA;YAACC,IAAAA,IAAIA,CAU/BA;YAV2BA,WAAAA,IAAIA,EAACA,CAACA;gBACjCC;oBAAAC;oBAQAC,CAACA;oBANOD,+BAAKA,GAAZA,cAAiBE,MAAMA,CAACA,IAAIA,CAACA,CAACA,CAACA;oBAExBF,6BAAGA,GAAVA,UAAWA,KAA6BA;wBAEvCG,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBACFH,sBAACA;gBAADA,CAACA,AARDD,IAQCA;gBARYA,oBAAeA,kBAQ3BA,CAAAA;YACFA,CAACA,EAV2BD,IAAIA,GAAJA,aAAIA,KAAJA,aAAIA,QAU/BA;QAADA,CAACA,EAVqBD,KAAKA,GAALA,aAAKA,KAALA,aAAKA,QAU1BA;IAADA,CAACA,EAVaD,OAAOA,GAAPA,cAAOA,KAAPA,cAAOA,QAUpBA;AAADA,CAACA,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAACA,IAAAA,KAAKA,CAoBlBA;IApBaA,WAAAA,KAAKA;QAACQ,IAAAA,OAAOA,CAoB1BA;QApBmBA,WAAAA,OAAOA,EAACA,CAACA;YAC5BC;gBAKCC,oBAAoBA,SAAkCA;oBAAlCC,cAASA,GAATA,SAASA,CAAyBA;oBAD9CA,YAAOA,GAAOA,IAAIA,CAACA;oBAGvBA,AADAA,aAAaA;oBACbA,SAASA,CAACA,SAASA,CAACA,WAAWA,EAAEA,IAAIA,CAACA,CAACA;gBAC3CA,CAACA;gBANMD,wBAAGA,GAAVA,UAAWA,MAAyCA,IAAIE,EAAEA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA;oBAAAA,MAAMA,CAACA,MAAMA,CAACA,IAAIA,CAACA,CAACA;gBAAAA,CAACA,CAAAA,CAACA;gBAQlFF,+BAAUA,GAAjBA;oBACCG,MAAMA,CAACA,OAAOA,CAACA;gBAChBA,CAACA;gBAEMH,4BAAOA,GAAdA;gBAEAI,CAACA;gBAEFJ,iBAACA;YAADA,CAACA,AAlBDD,IAkBCA;YAlBYA,kBAAUA,aAkBtBA,CAAAA;QACFA,CAACA,EApBmBD,OAAOA,GAAPA,aAAOA,KAAPA,aAAOA,QAoB1BA;IAADA,CAACA,EApBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAoBlBA;AAADA,CAACA,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAAe;IAAuFC,CAACA;IAA3CD,sCAAeA,GAAtBA,cAAmCE,MAAMA,CAACA,IAAIA,CAACA,CAAAA,CAACA;IAACF,mBAACA;AAADA,CAACA,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAACf,IAAAA,KAAKA,CAwBlBA;IAxBaA,WAAAA,KAAKA;QAACQ,IAAAA,SAASA,CAwB5BA;QAxBmBA,WAAAA,SAASA;YAACU,IAAAA,SAASA,CAwBtCA;YAxB6BA,WAAAA,SAASA,EAACA,CAACA;gBAExCC;oBACOC,eAAoBA,IAAWA;wBAAXC,SAAIA,GAAJA,IAAIA,CAAOA;oBAAIA,CAACA;oBACnCD,qBAAKA,GAAZA;wBACCE,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBAEMF,sBAAMA,GAAbA,UAAcA,KAAYA;wBACzBG,MAAMA,CAACA,IAAIA,KAAKA,KAAKA,CAACA;oBACvBA,CAACA;oBAEMH,uBAAOA,GAAdA,cAA0BI,MAAMA,CAACA,IAAIA,CAACA,CAACA,CAACA;oBACzCJ,YAACA;gBAADA,CAACA,AAXDD,IAWCA;gBAXYA,eAAKA,QAWjBA,CAAAA;gBAEDA;oBAA0BM,wBAAYA;oBAAtCA;wBAA0BC,8BAAYA;oBAQtCA,CAACA;oBANAD,aAAaA;oBACNA,8BAAeA,GAAtBA;wBACCE,MAAMA,CAACA,IAAIA,KAAKA,CAACA,IAAIA,CAACA,CAACA;oBACxBA,CAACA;oBAGFF,WAACA;gBAADA,CAACA,AARDN,EAA0BA,YAAYA,EAQrCA;gBARYA,cAAIA,OAQhBA,CAAAA;YACFA,CAACA,EAxB6BD,SAASA,GAATA,mBAASA,KAATA,mBAASA,QAwBtCA;QAADA,CAACA,EAxBmBV,SAASA,GAATA,eAASA,KAATA,eAASA,QAwB5BA;IAADA,CAACA,EAxBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAwBlBA;AAADA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file +{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":["Sample","Sample.Actions","Sample.Actions.Thing","Sample.Actions.Thing.Find","Sample.Actions.Thing.Find.StartFindAction","Sample.Actions.Thing.Find.StartFindAction.constructor","Sample.Actions.Thing.Find.StartFindAction.getId","Sample.Actions.Thing.Find.StartFindAction.run","Sample.Thing","Sample.Thing.Widgets","Sample.Thing.Widgets.FindWidget","Sample.Thing.Widgets.FindWidget.constructor","Sample.Thing.Widgets.FindWidget.gar","Sample.Thing.Widgets.FindWidget.getDomNode","Sample.Thing.Widgets.FindWidget.destroy","AbstractMode","AbstractMode.constructor","AbstractMode.getInitialState","Sample.Thing.Languages","Sample.Thing.Languages.PlainText","Sample.Thing.Languages.PlainText.State","Sample.Thing.Languages.PlainText.State.constructor","Sample.Thing.Languages.PlainText.State.clone","Sample.Thing.Languages.PlainText.State.equals","Sample.Thing.Languages.PlainText.State.getMode","Sample.Thing.Languages.PlainText.Mode","Sample.Thing.Languages.PlainText.Mode.constructor","Sample.Thing.Languages.PlainText.Mode.getInitialState"],"mappings":"AAAA,iEAAiE;AACjE,0EAA0E;;;;;;;AA8B1E,IAAO,MAAM,CAUZ;AAVD,WAAO,MAAM;IAACA,IAAAA,OAAOA,CAUpBA;IAVaA,WAAAA,OAAOA;QAACC,IAAAA,KAAKA,CAU1BA;QAVqBA,WAAAA,QAAKA;YAACC,IAAAA,IAAIA,CAU/BA;YAV2BA,WAAAA,IAAIA,EAACA,CAACA;gBACjCC;oBAAAC;oBAQAC,CAACA;oBANOD,+BAAKA,GAAZA;wBAAiBE,MAAMA,CAACA,IAAIA,CAACA;oBAACA,CAACA;oBAExBF,6BAAGA,GAAVA,UAAWA,KAA6BA;wBAEvCG,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBACFH,sBAACA;gBAADA,CAACA,AARDD,IAQCA;gBARYA,oBAAeA,kBAQ3BA,CAAAA;YACFA,CAACA,EAV2BD,IAAIA,GAAJA,aAAIA,KAAJA,aAAIA,QAU/BA;QAADA,CAACA,EAVqBD,KAAKA,GAALA,aAAKA,KAALA,aAAKA,QAU1BA;IAADA,CAACA,EAVaD,OAAOA,GAAPA,cAAOA,KAAPA,cAAOA,QAUpBA;AAADA,CAACA,EAVM,MAAM,KAAN,MAAM,QAUZ;AAED,IAAO,MAAM,CAoBZ;AApBD,WAAO,MAAM;IAACA,IAAAA,KAAKA,CAoBlBA;IApBaA,WAAAA,KAAKA;QAACQ,IAAAA,OAAOA,CAoB1BA;QApBmBA,WAAAA,OAAOA,EAACA,CAACA;YAC5BC;gBAKCC,oBAAoBA,SAAkCA;oBAAlCC,cAASA,GAATA,SAASA,CAAyBA;oBAD9CA,YAAOA,GAAOA,IAAIA,CAACA;oBAGvBA,AADAA,aAAaA;oBACbA,SAASA,CAACA,SAASA,CAACA,WAAWA,EAAEA,IAAIA,CAACA,CAACA;gBAC3CA,CAACA;gBANMD,wBAAGA,GAAVA,UAAWA,MAAyCA;oBAAIE,EAAEA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA;wBAAAA,MAAMA,CAACA,MAAMA,CAACA,IAAIA,CAACA,CAACA;oBAAAA,CAACA;gBAAAA,CAACA;gBAQlFF,+BAAUA,GAAjBA;oBACCG,MAAMA,CAACA,OAAOA,CAACA;gBAChBA,CAACA;gBAEMH,4BAAOA,GAAdA;gBAEAI,CAACA;gBAEFJ,iBAACA;YAADA,CAACA,AAlBDD,IAkBCA;YAlBYA,kBAAUA,aAkBtBA,CAAAA;QACFA,CAACA,EApBmBD,OAAOA,GAAPA,aAAOA,KAAPA,aAAOA,QAoB1BA;IAADA,CAACA,EApBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAoBlBA;AAADA,CAACA,EApBM,MAAM,KAAN,MAAM,QAoBZ;AAGD;IAAAe;IAAuFC,CAACA;IAA3CD,sCAAeA,GAAtBA;QAAmCE,MAAMA,CAACA,IAAIA,CAACA;IAAAA,CAACA;IAACF,mBAACA;AAADA,CAACA,AAAxF,IAAwF;AASxF,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM;IAACf,IAAAA,KAAKA,CAwBlBA;IAxBaA,WAAAA,KAAKA;QAACQ,IAAAA,SAASA,CAwB5BA;QAxBmBA,WAAAA,SAASA;YAACU,IAAAA,SAASA,CAwBtCA;YAxB6BA,WAAAA,SAASA,EAACA,CAACA;gBAExCC;oBACOC,eAAoBA,IAAWA;wBAAXC,SAAIA,GAAJA,IAAIA,CAAOA;oBAAIA,CAACA;oBACnCD,qBAAKA,GAAZA;wBACCE,MAAMA,CAACA,IAAIA,CAACA;oBACbA,CAACA;oBAEMF,sBAAMA,GAAbA,UAAcA,KAAYA;wBACzBG,MAAMA,CAACA,IAAIA,KAAKA,KAAKA,CAACA;oBACvBA,CAACA;oBAEMH,uBAAOA,GAAdA;wBAA0BI,MAAMA,CAACA,IAAIA,CAACA;oBAACA,CAACA;oBACzCJ,YAACA;gBAADA,CAACA,AAXDD,IAWCA;gBAXYA,eAAKA,QAWjBA,CAAAA;gBAEDA;oBAA0BM,wBAAYA;oBAAtCA;wBAA0BC,8BAAYA;oBAQtCA,CAACA;oBANAD,aAAaA;oBACNA,8BAAeA,GAAtBA;wBACCE,MAAMA,CAACA,IAAIA,KAAKA,CAACA,IAAIA,CAACA,CAACA;oBACxBA,CAACA;oBAGFF,WAACA;gBAADA,CAACA,AARDN,EAA0BA,YAAYA,EAQrCA;gBARYA,cAAIA,OAQhBA,CAAAA;YACFA,CAACA,EAxB6BD,SAASA,GAATA,mBAASA,KAATA,mBAASA,QAwBtCA;QAADA,CAACA,EAxBmBV,SAASA,GAATA,eAASA,KAATA,eAASA,QAwB5BA;IAADA,CAACA,EAxBaR,KAAKA,GAALA,YAAKA,KAALA,YAAKA,QAwBlBA;AAADA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ"} \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt index 1aa9ad4342d..47bb3f2d18a 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.sourcemap.txt @@ -229,7 +229,7 @@ sourceFile:recursiveClassReferenceTest.ts >>> } 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->export class StartFindAction implements Sample.Thing.IAction { > > public getId() { return "yo"; } @@ -243,56 +243,61 @@ sourceFile:recursiveClassReferenceTest.ts 1->Emitted(19, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) 2 >Emitted(19, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.constructor) --- ->>> StartFindAction.prototype.getId = function () { return "yo"; }; +>>> StartFindAction.prototype.getId = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^ -8 > ^ -9 > ^ -10> ^ 1-> 2 > getId 3 > -4 > public getId() { -5 > return -6 > -7 > "yo" -8 > ; -9 > -10> } 1->Emitted(20, 21) Source(35, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) 2 >Emitted(20, 52) Source(35, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) 3 >Emitted(20, 55) Source(35, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -4 >Emitted(20, 69) Source(35, 20) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -5 >Emitted(20, 75) Source(35, 26) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -6 >Emitted(20, 76) Source(35, 27) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -7 >Emitted(20, 80) Source(35, 31) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -8 >Emitted(20, 81) Source(35, 32) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -9 >Emitted(20, 82) Source(35, 33) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) -10>Emitted(20, 83) Source(35, 34) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +--- +>>> return "yo"; +1 >^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +1 >public getId() { +2 > return +3 > +4 > "yo" +5 > ; +1 >Emitted(21, 25) Source(35, 20) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +2 >Emitted(21, 31) Source(35, 26) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +3 >Emitted(21, 32) Source(35, 27) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +4 >Emitted(21, 36) Source(35, 31) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +5 >Emitted(21, 37) Source(35, 32) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 > } +1 >Emitted(22, 21) Source(35, 33) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) +2 >Emitted(22, 22) Source(35, 34) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.getId) --- >>> StartFindAction.prototype.run = function (Thing) { -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ 4 > ^^^^^^^^^^ 5 > ^^^^^ -1 > +1-> > > public 2 > run 3 > 4 > public run( 5 > Thing:Sample.Thing.ICodeThing -1 >Emitted(21, 21) Source(37, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(21, 50) Source(37, 13) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(21, 53) Source(37, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -4 >Emitted(21, 63) Source(37, 14) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -5 >Emitted(21, 68) Source(37, 43) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(23, 21) Source(37, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(23, 50) Source(37, 13) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +3 >Emitted(23, 53) Source(37, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +4 >Emitted(23, 63) Source(37, 14) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +5 >Emitted(23, 68) Source(37, 43) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> return true; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -307,11 +312,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > true 5 > ; -1 >Emitted(22, 25) Source(39, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -2 >Emitted(22, 31) Source(39, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -3 >Emitted(22, 32) Source(39, 11) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -4 >Emitted(22, 36) Source(39, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -5 >Emitted(22, 37) Source(39, 16) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +1 >Emitted(24, 25) Source(39, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +2 >Emitted(24, 31) Source(39, 10) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +3 >Emitted(24, 32) Source(39, 11) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +4 >Emitted(24, 36) Source(39, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +5 >Emitted(24, 37) Source(39, 16) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -320,8 +325,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(23, 21) Source(40, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) -2 >Emitted(23, 22) Source(40, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +1 >Emitted(25, 21) Source(40, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) +2 >Emitted(25, 22) Source(40, 4) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction.run) --- >>> return StartFindAction; 1->^^^^^^^^^^^^^^^^^^^^ @@ -329,8 +334,8 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > 2 > } -1->Emitted(24, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(24, 43) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +1->Emitted(26, 21) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(26, 43) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -350,10 +355,10 @@ sourceFile:recursiveClassReferenceTest.ts > return true; > } > } -1 >Emitted(25, 17) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -2 >Emitted(25, 18) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) -3 >Emitted(25, 18) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) -4 >Emitted(25, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +1 >Emitted(27, 17) Source(41, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +2 >Emitted(27, 18) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find.StartFindAction) +3 >Emitted(27, 18) Source(33, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) +4 >Emitted(27, 22) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- >>> Find.StartFindAction = StartFindAction; 1->^^^^^^^^^^^^^^^^ @@ -373,10 +378,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > } 4 > -1->Emitted(26, 17) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) -2 >Emitted(26, 37) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) -3 >Emitted(26, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) -4 >Emitted(26, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +1->Emitted(28, 17) Source(33, 15) + SourceIndex(0) name (Sample.Actions.Thing.Find) +2 >Emitted(28, 37) Source(33, 30) + SourceIndex(0) name (Sample.Actions.Thing.Find) +3 >Emitted(28, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) +4 >Emitted(28, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find) --- >>> })(Find = _Thing_1.Find || (_Thing_1.Find = {})); 1->^^^^^^^^^^^^ @@ -408,15 +413,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(27, 13) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing.Find) -2 >Emitted(27, 14) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) -3 >Emitted(27, 16) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -4 >Emitted(27, 20) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -5 >Emitted(27, 23) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -6 >Emitted(27, 36) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -7 >Emitted(27, 41) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) -8 >Emitted(27, 54) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) -9 >Emitted(27, 62) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +1->Emitted(29, 13) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing.Find) +2 >Emitted(29, 14) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find) +3 >Emitted(29, 16) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +4 >Emitted(29, 20) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +5 >Emitted(29, 23) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +6 >Emitted(29, 36) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +7 >Emitted(29, 41) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing) +8 >Emitted(29, 54) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing) +9 >Emitted(29, 62) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) --- >>> })(Thing = Actions.Thing || (Actions.Thing = {})); 1 >^^^^^^^^ @@ -448,15 +453,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(28, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) -2 >Emitted(28, 10) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) -3 >Emitted(28, 12) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -4 >Emitted(28, 17) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -5 >Emitted(28, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -6 >Emitted(28, 33) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -7 >Emitted(28, 38) Source(32, 23) + SourceIndex(0) name (Sample.Actions) -8 >Emitted(28, 51) Source(32, 28) + SourceIndex(0) name (Sample.Actions) -9 >Emitted(28, 59) Source(42, 2) + SourceIndex(0) name (Sample.Actions) +1 >Emitted(30, 9) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing) +2 >Emitted(30, 10) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing) +3 >Emitted(30, 12) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +4 >Emitted(30, 17) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +5 >Emitted(30, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +6 >Emitted(30, 33) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +7 >Emitted(30, 38) Source(32, 23) + SourceIndex(0) name (Sample.Actions) +8 >Emitted(30, 51) Source(32, 28) + SourceIndex(0) name (Sample.Actions) +9 >Emitted(30, 59) Source(42, 2) + SourceIndex(0) name (Sample.Actions) --- >>> })(Actions = Sample.Actions || (Sample.Actions = {})); 1->^^^^ @@ -487,15 +492,15 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1->Emitted(29, 5) Source(42, 1) + SourceIndex(0) name (Sample.Actions) -2 >Emitted(29, 6) Source(42, 2) + SourceIndex(0) name (Sample.Actions) -3 >Emitted(29, 8) Source(32, 15) + SourceIndex(0) name (Sample) -4 >Emitted(29, 15) Source(32, 22) + SourceIndex(0) name (Sample) -5 >Emitted(29, 18) Source(32, 15) + SourceIndex(0) name (Sample) -6 >Emitted(29, 32) Source(32, 22) + SourceIndex(0) name (Sample) -7 >Emitted(29, 37) Source(32, 15) + SourceIndex(0) name (Sample) -8 >Emitted(29, 51) Source(32, 22) + SourceIndex(0) name (Sample) -9 >Emitted(29, 59) Source(42, 2) + SourceIndex(0) name (Sample) +1->Emitted(31, 5) Source(42, 1) + SourceIndex(0) name (Sample.Actions) +2 >Emitted(31, 6) Source(42, 2) + SourceIndex(0) name (Sample.Actions) +3 >Emitted(31, 8) Source(32, 15) + SourceIndex(0) name (Sample) +4 >Emitted(31, 15) Source(32, 22) + SourceIndex(0) name (Sample) +5 >Emitted(31, 18) Source(32, 15) + SourceIndex(0) name (Sample) +6 >Emitted(31, 32) Source(32, 22) + SourceIndex(0) name (Sample) +7 >Emitted(31, 37) Source(32, 15) + SourceIndex(0) name (Sample) +8 >Emitted(31, 51) Source(32, 22) + SourceIndex(0) name (Sample) +9 >Emitted(31, 59) Source(42, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > @@ -522,13 +527,13 @@ sourceFile:recursiveClassReferenceTest.ts > } > } > } -1 >Emitted(30, 1) Source(42, 1) + SourceIndex(0) name (Sample) -2 >Emitted(30, 2) Source(42, 2) + SourceIndex(0) name (Sample) -3 >Emitted(30, 4) Source(32, 8) + SourceIndex(0) -4 >Emitted(30, 10) Source(32, 14) + SourceIndex(0) -5 >Emitted(30, 15) Source(32, 8) + SourceIndex(0) -6 >Emitted(30, 21) Source(32, 14) + SourceIndex(0) -7 >Emitted(30, 29) Source(42, 2) + SourceIndex(0) +1 >Emitted(32, 1) Source(42, 1) + SourceIndex(0) name (Sample) +2 >Emitted(32, 2) Source(42, 2) + SourceIndex(0) name (Sample) +3 >Emitted(32, 4) Source(32, 8) + SourceIndex(0) +4 >Emitted(32, 10) Source(32, 14) + SourceIndex(0) +5 >Emitted(32, 15) Source(32, 8) + SourceIndex(0) +6 >Emitted(32, 21) Source(32, 14) + SourceIndex(0) +7 >Emitted(32, 29) Source(42, 2) + SourceIndex(0) --- >>>var Sample; 1 > @@ -562,10 +567,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(31, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(31, 5) Source(44, 8) + SourceIndex(0) -3 >Emitted(31, 11) Source(44, 14) + SourceIndex(0) -4 >Emitted(31, 12) Source(64, 2) + SourceIndex(0) +1 >Emitted(33, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(33, 5) Source(44, 8) + SourceIndex(0) +3 >Emitted(33, 11) Source(44, 14) + SourceIndex(0) +4 >Emitted(33, 12) Source(64, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -574,9 +579,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >module 3 > Sample -1->Emitted(32, 1) Source(44, 1) + SourceIndex(0) -2 >Emitted(32, 12) Source(44, 8) + SourceIndex(0) -3 >Emitted(32, 18) Source(44, 14) + SourceIndex(0) +1->Emitted(34, 1) Source(44, 1) + SourceIndex(0) +2 >Emitted(34, 12) Source(44, 8) + SourceIndex(0) +3 >Emitted(34, 18) Source(44, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -608,10 +613,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(33, 5) Source(44, 15) + SourceIndex(0) name (Sample) -2 >Emitted(33, 9) Source(44, 15) + SourceIndex(0) name (Sample) -3 >Emitted(33, 14) Source(44, 20) + SourceIndex(0) name (Sample) -4 >Emitted(33, 15) Source(64, 2) + SourceIndex(0) name (Sample) +1 >Emitted(35, 5) Source(44, 15) + SourceIndex(0) name (Sample) +2 >Emitted(35, 9) Source(44, 15) + SourceIndex(0) name (Sample) +3 >Emitted(35, 14) Source(44, 20) + SourceIndex(0) name (Sample) +4 >Emitted(35, 15) Source(64, 2) + SourceIndex(0) name (Sample) --- >>> (function (Thing) { 1->^^^^ @@ -621,9 +626,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(34, 5) Source(44, 15) + SourceIndex(0) name (Sample) -2 >Emitted(34, 16) Source(44, 15) + SourceIndex(0) name (Sample) -3 >Emitted(34, 21) Source(44, 20) + SourceIndex(0) name (Sample) +1->Emitted(36, 5) Source(44, 15) + SourceIndex(0) name (Sample) +2 >Emitted(36, 16) Source(44, 15) + SourceIndex(0) name (Sample) +3 >Emitted(36, 21) Source(44, 20) + SourceIndex(0) name (Sample) --- >>> var Widgets; 1->^^^^^^^^ @@ -655,10 +660,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(35, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(35, 13) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(35, 20) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(35, 21) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(37, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(37, 13) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(37, 20) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(37, 21) Source(64, 2) + SourceIndex(0) name (Sample.Thing) --- >>> (function (Widgets) { 1->^^^^^^^^ @@ -672,18 +677,18 @@ sourceFile:recursiveClassReferenceTest.ts 3 > Widgets 4 > 5 > { -1->Emitted(36, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(36, 20) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(36, 27) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(36, 29) Source(44, 29) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(36, 30) Source(44, 30) + SourceIndex(0) name (Sample.Thing) +1->Emitted(38, 9) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(38, 20) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(38, 27) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(38, 29) Source(44, 29) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(38, 30) Source(44, 30) + SourceIndex(0) name (Sample.Thing) --- >>> var FindWidget = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(37, 13) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +1->Emitted(39, 13) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) --- >>> function FindWidget(codeThing) { 1->^^^^^^^^^^^^^^^^ @@ -698,9 +703,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > codeThing: Sample.Thing.ICodeThing -1->Emitted(38, 17) Source(50, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(38, 37) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(38, 46) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(40, 17) Source(50, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(40, 37) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(40, 46) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> this.codeThing = codeThing; 1->^^^^^^^^^^^^^^^^^^^^ @@ -713,11 +718,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > codeThing 5 > : Sample.Thing.ICodeThing -1->Emitted(39, 21) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(39, 35) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(39, 38) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(39, 47) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(39, 48) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1->Emitted(41, 21) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(41, 35) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(41, 38) Source(50, 23) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(41, 47) Source(50, 32) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(41, 48) Source(50, 57) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> this.domNode = null; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -730,11 +735,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > :any = 4 > null 5 > ; -1 >Emitted(40, 21) Source(49, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(40, 33) Source(49, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(40, 36) Source(49, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(40, 40) Source(49, 29) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(40, 41) Source(49, 30) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(42, 21) Source(49, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(42, 33) Source(49, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(42, 36) Source(49, 25) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(42, 40) Source(49, 29) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(42, 41) Source(49, 30) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> // scenario 1 1 >^^^^^^^^^^^^^^^^^^^^ @@ -747,9 +752,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > 3 > // scenario 1 -1 >Emitted(41, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(41, 21) Source(51, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(41, 34) Source(51, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(43, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(43, 21) Source(51, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(43, 34) Source(51, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> codeThing.addWidget("addWidget", this); 1->^^^^^^^^^^^^^^^^^^^^ @@ -773,108 +778,113 @@ sourceFile:recursiveClassReferenceTest.ts 8 > this 9 > ) 10> ; -1->Emitted(42, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(42, 30) Source(52, 16) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -3 >Emitted(42, 31) Source(52, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -4 >Emitted(42, 40) Source(52, 26) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -5 >Emitted(42, 41) Source(52, 27) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -6 >Emitted(42, 52) Source(52, 38) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -7 >Emitted(42, 54) Source(52, 40) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -8 >Emitted(42, 58) Source(52, 44) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -9 >Emitted(42, 59) Source(52, 45) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -10>Emitted(42, 60) Source(52, 46) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1->Emitted(44, 21) Source(52, 7) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(44, 30) Source(52, 16) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +3 >Emitted(44, 31) Source(52, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +4 >Emitted(44, 40) Source(52, 26) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +5 >Emitted(44, 41) Source(52, 27) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +6 >Emitted(44, 52) Source(52, 38) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +7 >Emitted(44, 54) Source(52, 40) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +8 >Emitted(44, 58) Source(52, 44) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +9 >Emitted(44, 59) Source(52, 45) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +10>Emitted(44, 60) Source(52, 46) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } -1 >Emitted(43, 17) Source(53, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) -2 >Emitted(43, 18) Source(53, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +1 >Emitted(45, 17) Source(53, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) +2 >Emitted(45, 18) Source(53, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.constructor) --- ->>> FindWidget.prototype.gar = function (runner) { if (true) { +>>> FindWidget.prototype.gar = function (runner) { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ 4 > ^^^^^^^^^^ 5 > ^^^^^^ -6 > ^^^^ -7 > ^^ -8 > ^ -9 > ^ -10> ^^^^ -11> ^ -12> ^ -13> ^ 1-> 2 > gar 3 > 4 > public gar( 5 > runner:(widget:Sample.Thing.IWidget)=>any -6 > ) { -7 > if -8 > -9 > ( -10> true -11> ) -12> -13> { -1->Emitted(44, 17) Source(47, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(44, 41) Source(47, 13) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(44, 44) Source(47, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -4 >Emitted(44, 54) Source(47, 14) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -5 >Emitted(44, 60) Source(47, 55) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -6 >Emitted(44, 64) Source(47, 59) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -7 >Emitted(44, 66) Source(47, 61) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -8 >Emitted(44, 67) Source(47, 62) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -9 >Emitted(44, 68) Source(47, 63) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -10>Emitted(44, 72) Source(47, 67) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -11>Emitted(44, 73) Source(47, 68) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -12>Emitted(44, 74) Source(47, 69) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -13>Emitted(44, 75) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1->Emitted(46, 17) Source(47, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(46, 41) Source(47, 13) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(46, 44) Source(47, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +4 >Emitted(46, 54) Source(47, 14) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +5 >Emitted(46, 60) Source(47, 55) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- ->>> return runner(this); +>>> if (true) { 1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^^^^^^ -3 > ^ -4 > ^^^^^^ -5 > ^ -6 > ^^^^ -7 > ^ -8 > ^ -1 > -2 > return -3 > -4 > runner -5 > ( -6 > this -7 > ) -8 > ; -1 >Emitted(45, 21) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(45, 27) Source(47, 76) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -3 >Emitted(45, 28) Source(47, 77) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -4 >Emitted(45, 34) Source(47, 83) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -5 >Emitted(45, 35) Source(47, 84) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -6 >Emitted(45, 39) Source(47, 88) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -7 >Emitted(45, 40) Source(47, 89) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -8 >Emitted(45, 41) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 > ^^ +3 > ^ +4 > ^ +5 > ^^^^ +6 > ^ +7 > ^ +8 > ^ +9 > ^^^^^^^^^^^^^^-> +1 >) { +2 > if +3 > +4 > ( +5 > true +6 > ) +7 > +8 > { +1 >Emitted(47, 21) Source(47, 59) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(47, 23) Source(47, 61) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +3 >Emitted(47, 24) Source(47, 62) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +4 >Emitted(47, 25) Source(47, 63) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +5 >Emitted(47, 29) Source(47, 67) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +6 >Emitted(47, 30) Source(47, 68) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +7 >Emitted(47, 31) Source(47, 69) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +8 >Emitted(47, 32) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) --- ->>> } }; +>>> return runner(this); +1->^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^^^^ +7 > ^ +8 > ^ +1-> +2 > return +3 > +4 > runner +5 > ( +6 > this +7 > ) +8 > ; +1->Emitted(48, 25) Source(47, 70) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(48, 31) Source(47, 76) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +3 >Emitted(48, 32) Source(47, 77) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +4 >Emitted(48, 38) Source(47, 83) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +5 >Emitted(48, 39) Source(47, 84) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +6 >Emitted(48, 43) Source(47, 88) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +7 >Emitted(48, 44) Source(47, 89) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +8 >Emitted(48, 45) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +--- +>>> } +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +1 > +2 > } +1 >Emitted(49, 21) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(49, 22) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +--- +>>> }; 1 >^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 > } -3 > -4 > } -1 >Emitted(46, 17) Source(47, 90) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -2 >Emitted(46, 18) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -3 >Emitted(46, 19) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) -4 >Emitted(46, 20) Source(47, 92) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +1 >Emitted(50, 17) Source(47, 91) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) +2 >Emitted(50, 18) Source(47, 92) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.gar) --- >>> FindWidget.prototype.getDomNode = function () { 1->^^^^^^^^^^^^^^^^ @@ -891,9 +901,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getDomNode 3 > -1->Emitted(47, 17) Source(55, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(47, 48) Source(55, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(47, 51) Source(55, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(51, 17) Source(55, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(51, 48) Source(55, 20) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(51, 51) Source(55, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> return domNode; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -907,11 +917,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > domNode 5 > ; -1 >Emitted(48, 21) Source(56, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -2 >Emitted(48, 27) Source(56, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -3 >Emitted(48, 28) Source(56, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -4 >Emitted(48, 35) Source(56, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -5 >Emitted(48, 36) Source(56, 19) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +1 >Emitted(52, 21) Source(56, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +2 >Emitted(52, 27) Source(56, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +3 >Emitted(52, 28) Source(56, 11) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +4 >Emitted(52, 35) Source(56, 18) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +5 >Emitted(52, 36) Source(56, 19) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -920,8 +930,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(49, 17) Source(57, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) -2 >Emitted(49, 18) Source(57, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +1 >Emitted(53, 17) Source(57, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) +2 >Emitted(53, 18) Source(57, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.getDomNode) --- >>> FindWidget.prototype.destroy = function () { 1->^^^^^^^^^^^^^^^^ @@ -932,9 +942,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > destroy 3 > -1->Emitted(50, 17) Source(59, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(50, 45) Source(59, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(50, 48) Source(59, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(54, 17) Source(59, 10) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(54, 45) Source(59, 17) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(54, 48) Source(59, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> }; 1 >^^^^^^^^^^^^^^^^ @@ -944,8 +954,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(51, 17) Source(61, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) -2 >Emitted(51, 18) Source(61, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) +1 >Emitted(55, 17) Source(61, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) +2 >Emitted(55, 18) Source(61, 4) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget.destroy) --- >>> return FindWidget; 1->^^^^^^^^^^^^^^^^ @@ -954,8 +964,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(52, 17) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(52, 34) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +1->Emitted(56, 17) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(56, 34) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -985,10 +995,10 @@ sourceFile:recursiveClassReferenceTest.ts > } > > } -1 >Emitted(53, 13) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -2 >Emitted(53, 14) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) -3 >Emitted(53, 14) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -4 >Emitted(53, 18) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +1 >Emitted(57, 13) Source(63, 2) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +2 >Emitted(57, 14) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets.FindWidget) +3 >Emitted(57, 14) Source(45, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +4 >Emitted(57, 18) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) --- >>> Widgets.FindWidget = FindWidget; 1->^^^^^^^^^^^^ @@ -1018,10 +1028,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(54, 13) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(54, 31) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(54, 44) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) -4 >Emitted(54, 45) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +1->Emitted(58, 13) Source(45, 15) + SourceIndex(0) name (Sample.Thing.Widgets) +2 >Emitted(58, 31) Source(45, 25) + SourceIndex(0) name (Sample.Thing.Widgets) +3 >Emitted(58, 44) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) +4 >Emitted(58, 45) Source(63, 3) + SourceIndex(0) name (Sample.Thing.Widgets) --- >>> })(Widgets = Thing.Widgets || (Thing.Widgets = {})); 1->^^^^^^^^ @@ -1063,15 +1073,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(55, 9) Source(64, 1) + SourceIndex(0) name (Sample.Thing.Widgets) -2 >Emitted(55, 10) Source(64, 2) + SourceIndex(0) name (Sample.Thing.Widgets) -3 >Emitted(55, 12) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(55, 19) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(55, 22) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(55, 35) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -7 >Emitted(55, 40) Source(44, 21) + SourceIndex(0) name (Sample.Thing) -8 >Emitted(55, 53) Source(44, 28) + SourceIndex(0) name (Sample.Thing) -9 >Emitted(55, 61) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(59, 9) Source(64, 1) + SourceIndex(0) name (Sample.Thing.Widgets) +2 >Emitted(59, 10) Source(64, 2) + SourceIndex(0) name (Sample.Thing.Widgets) +3 >Emitted(59, 12) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(59, 19) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(59, 22) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +6 >Emitted(59, 35) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +7 >Emitted(59, 40) Source(44, 21) + SourceIndex(0) name (Sample.Thing) +8 >Emitted(59, 53) Source(44, 28) + SourceIndex(0) name (Sample.Thing) +9 >Emitted(59, 61) Source(64, 2) + SourceIndex(0) name (Sample.Thing) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -1112,15 +1122,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(56, 5) Source(64, 1) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(56, 6) Source(64, 2) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(56, 8) Source(44, 15) + SourceIndex(0) name (Sample) -4 >Emitted(56, 13) Source(44, 20) + SourceIndex(0) name (Sample) -5 >Emitted(56, 16) Source(44, 15) + SourceIndex(0) name (Sample) -6 >Emitted(56, 28) Source(44, 20) + SourceIndex(0) name (Sample) -7 >Emitted(56, 33) Source(44, 15) + SourceIndex(0) name (Sample) -8 >Emitted(56, 45) Source(44, 20) + SourceIndex(0) name (Sample) -9 >Emitted(56, 53) Source(64, 2) + SourceIndex(0) name (Sample) +1 >Emitted(60, 5) Source(64, 1) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(60, 6) Source(64, 2) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(60, 8) Source(44, 15) + SourceIndex(0) name (Sample) +4 >Emitted(60, 13) Source(44, 20) + SourceIndex(0) name (Sample) +5 >Emitted(60, 16) Source(44, 15) + SourceIndex(0) name (Sample) +6 >Emitted(60, 28) Source(44, 20) + SourceIndex(0) name (Sample) +7 >Emitted(60, 33) Source(44, 15) + SourceIndex(0) name (Sample) +8 >Emitted(60, 45) Source(44, 20) + SourceIndex(0) name (Sample) +9 >Emitted(60, 53) Source(64, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > @@ -1158,13 +1168,13 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(57, 1) Source(64, 1) + SourceIndex(0) name (Sample) -2 >Emitted(57, 2) Source(64, 2) + SourceIndex(0) name (Sample) -3 >Emitted(57, 4) Source(44, 8) + SourceIndex(0) -4 >Emitted(57, 10) Source(44, 14) + SourceIndex(0) -5 >Emitted(57, 15) Source(44, 8) + SourceIndex(0) -6 >Emitted(57, 21) Source(44, 14) + SourceIndex(0) -7 >Emitted(57, 29) Source(64, 2) + SourceIndex(0) +1 >Emitted(61, 1) Source(64, 1) + SourceIndex(0) name (Sample) +2 >Emitted(61, 2) Source(64, 2) + SourceIndex(0) name (Sample) +3 >Emitted(61, 4) Source(44, 8) + SourceIndex(0) +4 >Emitted(61, 10) Source(44, 14) + SourceIndex(0) +5 >Emitted(61, 15) Source(44, 8) + SourceIndex(0) +6 >Emitted(61, 21) Source(44, 14) + SourceIndex(0) +7 >Emitted(61, 29) Source(64, 2) + SourceIndex(0) --- >>>var AbstractMode = (function () { 1-> @@ -1173,62 +1183,67 @@ sourceFile:recursiveClassReferenceTest.ts > >interface IMode { getInitialState(): IState;} > -1->Emitted(58, 1) Source(67, 1) + SourceIndex(0) +1->Emitted(62, 1) Source(67, 1) + SourceIndex(0) --- >>> function AbstractMode() { 1->^^^^ 2 > ^^-> 1-> -1->Emitted(59, 5) Source(67, 1) + SourceIndex(0) name (AbstractMode) +1->Emitted(63, 5) Source(67, 1) + SourceIndex(0) name (AbstractMode) --- >>> } 1->^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->class AbstractMode implements IMode { public getInitialState(): IState { return null;} 2 > } -1->Emitted(60, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode.constructor) -2 >Emitted(60, 6) Source(67, 89) + SourceIndex(0) name (AbstractMode.constructor) +1->Emitted(64, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode.constructor) +2 >Emitted(64, 6) Source(67, 89) + SourceIndex(0) name (AbstractMode.constructor) --- ->>> AbstractMode.prototype.getInitialState = function () { return null; }; +>>> AbstractMode.prototype.getInitialState = function () { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^ -8 > ^ -9 > ^ -10> ^ 1-> 2 > getInitialState 3 > -4 > public getInitialState(): IState { -5 > return -6 > -7 > null -8 > ; -9 > -10> } -1->Emitted(61, 5) Source(67, 46) + SourceIndex(0) name (AbstractMode) -2 >Emitted(61, 43) Source(67, 61) + SourceIndex(0) name (AbstractMode) -3 >Emitted(61, 46) Source(67, 39) + SourceIndex(0) name (AbstractMode) -4 >Emitted(61, 60) Source(67, 74) + SourceIndex(0) name (AbstractMode.getInitialState) -5 >Emitted(61, 66) Source(67, 80) + SourceIndex(0) name (AbstractMode.getInitialState) -6 >Emitted(61, 67) Source(67, 81) + SourceIndex(0) name (AbstractMode.getInitialState) -7 >Emitted(61, 71) Source(67, 85) + SourceIndex(0) name (AbstractMode.getInitialState) -8 >Emitted(61, 72) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) -9 >Emitted(61, 73) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) -10>Emitted(61, 74) Source(67, 87) + SourceIndex(0) name (AbstractMode.getInitialState) +1->Emitted(65, 5) Source(67, 46) + SourceIndex(0) name (AbstractMode) +2 >Emitted(65, 43) Source(67, 61) + SourceIndex(0) name (AbstractMode) +3 >Emitted(65, 46) Source(67, 39) + SourceIndex(0) name (AbstractMode) +--- +>>> return null; +1 >^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +1 >public getInitialState(): IState { +2 > return +3 > +4 > null +5 > ; +1 >Emitted(66, 9) Source(67, 74) + SourceIndex(0) name (AbstractMode.getInitialState) +2 >Emitted(66, 15) Source(67, 80) + SourceIndex(0) name (AbstractMode.getInitialState) +3 >Emitted(66, 16) Source(67, 81) + SourceIndex(0) name (AbstractMode.getInitialState) +4 >Emitted(66, 20) Source(67, 85) + SourceIndex(0) name (AbstractMode.getInitialState) +5 >Emitted(66, 21) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) +--- +>>> }; +1 >^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^-> +1 > +2 > } +1 >Emitted(67, 5) Source(67, 86) + SourceIndex(0) name (AbstractMode.getInitialState) +2 >Emitted(67, 6) Source(67, 87) + SourceIndex(0) name (AbstractMode.getInitialState) --- >>> return AbstractMode; -1 >^^^^ +1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^ -1 > +1-> 2 > } -1 >Emitted(62, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode) -2 >Emitted(62, 24) Source(67, 89) + SourceIndex(0) name (AbstractMode) +1->Emitted(68, 5) Source(67, 88) + SourceIndex(0) name (AbstractMode) +2 >Emitted(68, 24) Source(67, 89) + SourceIndex(0) name (AbstractMode) --- >>>})(); 1 > @@ -1240,10 +1255,10 @@ sourceFile:recursiveClassReferenceTest.ts 2 >} 3 > 4 > class AbstractMode implements IMode { public getInitialState(): IState { return null;} } -1 >Emitted(63, 1) Source(67, 88) + SourceIndex(0) name (AbstractMode) -2 >Emitted(63, 2) Source(67, 89) + SourceIndex(0) name (AbstractMode) -3 >Emitted(63, 2) Source(67, 1) + SourceIndex(0) -4 >Emitted(63, 6) Source(67, 89) + SourceIndex(0) +1 >Emitted(69, 1) Source(67, 88) + SourceIndex(0) name (AbstractMode) +2 >Emitted(69, 2) Source(67, 89) + SourceIndex(0) name (AbstractMode) +3 >Emitted(69, 2) Source(67, 1) + SourceIndex(0) +4 >Emitted(69, 6) Source(67, 89) + SourceIndex(0) --- >>>var Sample; 1-> @@ -1288,10 +1303,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(64, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(64, 5) Source(76, 8) + SourceIndex(0) -3 >Emitted(64, 11) Source(76, 14) + SourceIndex(0) -4 >Emitted(64, 12) Source(100, 2) + SourceIndex(0) +1->Emitted(70, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(70, 5) Source(76, 8) + SourceIndex(0) +3 >Emitted(70, 11) Source(76, 14) + SourceIndex(0) +4 >Emitted(70, 12) Source(100, 2) + SourceIndex(0) --- >>>(function (Sample) { 1-> @@ -1300,9 +1315,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 >module 3 > Sample -1->Emitted(65, 1) Source(76, 1) + SourceIndex(0) -2 >Emitted(65, 12) Source(76, 8) + SourceIndex(0) -3 >Emitted(65, 18) Source(76, 14) + SourceIndex(0) +1->Emitted(71, 1) Source(76, 1) + SourceIndex(0) +2 >Emitted(71, 12) Source(76, 8) + SourceIndex(0) +3 >Emitted(71, 18) Source(76, 14) + SourceIndex(0) --- >>> var Thing; 1 >^^^^ @@ -1338,10 +1353,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(66, 5) Source(76, 15) + SourceIndex(0) name (Sample) -2 >Emitted(66, 9) Source(76, 15) + SourceIndex(0) name (Sample) -3 >Emitted(66, 14) Source(76, 20) + SourceIndex(0) name (Sample) -4 >Emitted(66, 15) Source(100, 2) + SourceIndex(0) name (Sample) +1 >Emitted(72, 5) Source(76, 15) + SourceIndex(0) name (Sample) +2 >Emitted(72, 9) Source(76, 15) + SourceIndex(0) name (Sample) +3 >Emitted(72, 14) Source(76, 20) + SourceIndex(0) name (Sample) +4 >Emitted(72, 15) Source(100, 2) + SourceIndex(0) name (Sample) --- >>> (function (Thing) { 1->^^^^ @@ -1351,9 +1366,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Thing -1->Emitted(67, 5) Source(76, 15) + SourceIndex(0) name (Sample) -2 >Emitted(67, 16) Source(76, 15) + SourceIndex(0) name (Sample) -3 >Emitted(67, 21) Source(76, 20) + SourceIndex(0) name (Sample) +1->Emitted(73, 5) Source(76, 15) + SourceIndex(0) name (Sample) +2 >Emitted(73, 16) Source(76, 15) + SourceIndex(0) name (Sample) +3 >Emitted(73, 21) Source(76, 20) + SourceIndex(0) name (Sample) --- >>> var Languages; 1->^^^^^^^^ @@ -1389,10 +1404,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(68, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(68, 13) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(68, 22) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(68, 23) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +1->Emitted(74, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(74, 13) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(74, 22) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(74, 23) Source(100, 2) + SourceIndex(0) name (Sample.Thing) --- >>> (function (Languages) { 1->^^^^^^^^ @@ -1401,9 +1416,9 @@ sourceFile:recursiveClassReferenceTest.ts 1-> 2 > 3 > Languages -1->Emitted(69, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(69, 20) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(69, 29) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +1->Emitted(75, 9) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(75, 20) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(75, 29) Source(76, 30) + SourceIndex(0) name (Sample.Thing) --- >>> var PlainText; 1 >^^^^^^^^^^^^ @@ -1439,10 +1454,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(70, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(70, 17) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(70, 26) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(70, 27) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +1 >Emitted(76, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(76, 17) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(76, 26) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(76, 27) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) --- >>> (function (PlainText) { 1->^^^^^^^^^^^^ @@ -1456,11 +1471,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > PlainText 4 > 5 > { -1->Emitted(71, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(71, 24) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(71, 33) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(71, 35) Source(76, 41) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(71, 36) Source(76, 42) + SourceIndex(0) name (Sample.Thing.Languages) +1->Emitted(77, 13) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(77, 24) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(77, 33) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(77, 35) Source(76, 41) + SourceIndex(0) name (Sample.Thing.Languages) +5 >Emitted(77, 36) Source(76, 42) + SourceIndex(0) name (Sample.Thing.Languages) --- >>> var State = (function () { 1->^^^^^^^^^^^^^^^^ @@ -1468,7 +1483,7 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > > -1->Emitted(72, 17) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(78, 17) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> function State(mode) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1479,9 +1494,9 @@ sourceFile:recursiveClassReferenceTest.ts > 2 > constructor(private 3 > mode: IMode -1->Emitted(73, 21) Source(79, 9) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(73, 36) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(73, 40) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(79, 21) Source(79, 9) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(79, 36) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(79, 40) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> this.mode = mode; 1->^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1494,11 +1509,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > mode 5 > : IMode -1->Emitted(74, 25) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -2 >Emitted(74, 34) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -3 >Emitted(74, 37) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -4 >Emitted(74, 41) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -5 >Emitted(74, 42) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +1->Emitted(80, 25) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +2 >Emitted(80, 34) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +3 >Emitted(80, 37) Source(79, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +4 >Emitted(80, 41) Source(79, 33) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +5 >Emitted(80, 42) Source(79, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1506,8 +1521,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(75, 21) Source(79, 44) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) -2 >Emitted(75, 22) Source(79, 45) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +1 >Emitted(81, 21) Source(79, 44) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) +2 >Emitted(81, 22) Source(79, 45) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.constructor) --- >>> State.prototype.clone = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1517,9 +1532,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > clone 3 > -1->Emitted(76, 21) Source(80, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(76, 42) Source(80, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(76, 45) Source(80, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(82, 21) Source(80, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(82, 42) Source(80, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(82, 45) Source(80, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> return this; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1533,11 +1548,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > this 5 > ; -1 >Emitted(77, 25) Source(81, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -2 >Emitted(77, 31) Source(81, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -3 >Emitted(77, 32) Source(81, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -4 >Emitted(77, 36) Source(81, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -5 >Emitted(77, 37) Source(81, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +1 >Emitted(83, 25) Source(81, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +2 >Emitted(83, 31) Source(81, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +3 >Emitted(83, 32) Source(81, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +4 >Emitted(83, 36) Source(81, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +5 >Emitted(83, 37) Source(81, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1546,8 +1561,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(78, 21) Source(82, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) -2 >Emitted(78, 22) Source(82, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +1 >Emitted(84, 21) Source(82, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) +2 >Emitted(84, 22) Source(82, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.clone) --- >>> State.prototype.equals = function (other) { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1562,11 +1577,11 @@ sourceFile:recursiveClassReferenceTest.ts 3 > 4 > public equals( 5 > other:IState -1->Emitted(79, 21) Source(84, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(79, 43) Source(84, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(79, 46) Source(84, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(79, 56) Source(84, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -5 >Emitted(79, 61) Source(84, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(85, 21) Source(84, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(85, 43) Source(84, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(85, 46) Source(84, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +4 >Emitted(85, 56) Source(84, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +5 >Emitted(85, 61) Source(84, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> return this === other; 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1584,66 +1599,71 @@ sourceFile:recursiveClassReferenceTest.ts 5 > === 6 > other 7 > ; -1 >Emitted(80, 25) Source(85, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -2 >Emitted(80, 31) Source(85, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -3 >Emitted(80, 32) Source(85, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -4 >Emitted(80, 36) Source(85, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -5 >Emitted(80, 41) Source(85, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -6 >Emitted(80, 46) Source(85, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -7 >Emitted(80, 47) Source(85, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +1 >Emitted(86, 25) Source(85, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +2 >Emitted(86, 31) Source(85, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +3 >Emitted(86, 32) Source(85, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +4 >Emitted(86, 36) Source(85, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +5 >Emitted(86, 41) Source(85, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +6 >Emitted(86, 46) Source(85, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +7 >Emitted(86, 47) Source(85, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > 2 > } -1 >Emitted(81, 21) Source(86, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) -2 >Emitted(81, 22) Source(86, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +1 >Emitted(87, 21) Source(86, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) +2 >Emitted(87, 22) Source(86, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.equals) --- ->>> State.prototype.getMode = function () { return mode; }; +>>> State.prototype.getMode = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^ -8 > ^ -9 > ^ -10> ^ 1-> > > public 2 > getMode 3 > -4 > public getMode(): IMode { -5 > return -6 > -7 > mode -8 > ; -9 > -10> } -1->Emitted(82, 21) Source(88, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(82, 44) Source(88, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(82, 47) Source(88, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -4 >Emitted(82, 61) Source(88, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -5 >Emitted(82, 67) Source(88, 35) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -6 >Emitted(82, 68) Source(88, 36) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -7 >Emitted(82, 72) Source(88, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -8 >Emitted(82, 73) Source(88, 41) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -9 >Emitted(82, 74) Source(88, 42) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) -10>Emitted(82, 75) Source(88, 43) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +1->Emitted(88, 21) Source(88, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(88, 44) Source(88, 17) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(88, 47) Source(88, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +--- +>>> return mode; +1 >^^^^^^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +1 >public getMode(): IMode { +2 > return +3 > +4 > mode +5 > ; +1 >Emitted(89, 25) Source(88, 29) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +2 >Emitted(89, 31) Source(88, 35) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +3 >Emitted(89, 32) Source(88, 36) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +4 >Emitted(89, 36) Source(88, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +5 >Emitted(89, 37) Source(88, 41) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^-> +1 > +2 > } +1 >Emitted(90, 21) Source(88, 42) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) +2 >Emitted(90, 22) Source(88, 43) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State.getMode) --- >>> return State; -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^ -1 > +1-> > 2 > } -1 >Emitted(83, 21) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(83, 33) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +1->Emitted(91, 21) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(91, 33) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -1666,10 +1686,10 @@ sourceFile:recursiveClassReferenceTest.ts > > public getMode(): IMode { return mode; } > } -1 >Emitted(84, 17) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -2 >Emitted(84, 18) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) -3 >Emitted(84, 18) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(84, 22) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1 >Emitted(92, 17) Source(89, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +2 >Emitted(92, 18) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.State) +3 >Emitted(92, 18) Source(78, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(92, 22) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> PlainText.State = State; 1->^^^^^^^^^^^^^^^^ @@ -1692,10 +1712,10 @@ sourceFile:recursiveClassReferenceTest.ts > public getMode(): IMode { return mode; } > } 4 > -1->Emitted(85, 17) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(85, 32) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(85, 40) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(85, 41) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(93, 17) Source(78, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(93, 32) Source(78, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(93, 40) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(93, 41) Source(89, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> var Mode = (function (_super) { 1->^^^^^^^^^^^^^^^^ @@ -1703,29 +1723,29 @@ sourceFile:recursiveClassReferenceTest.ts 1-> > > -1->Emitted(86, 17) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(94, 17) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> __extends(Mode, _super); 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode -1->Emitted(87, 21) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(87, 45) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(95, 21) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(95, 45) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> function Mode() { 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(88, 21) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1 >Emitted(96, 21) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> _super.apply(this, arguments); 1->^^^^^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1->export class Mode extends 2 > AbstractMode -1->Emitted(89, 25) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) -2 >Emitted(89, 55) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +1->Emitted(97, 25) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +2 >Emitted(97, 55) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1741,8 +1761,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1 >Emitted(90, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) -2 >Emitted(90, 22) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +1 >Emitted(98, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) +2 >Emitted(98, 22) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.constructor) --- >>> // scenario 2 1->^^^^^^^^^^^^^^^^^^^^ @@ -1750,8 +1770,8 @@ sourceFile:recursiveClassReferenceTest.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > // scenario 2 -1->Emitted(91, 21) Source(93, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(91, 34) Source(93, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(99, 21) Source(93, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(99, 34) Source(93, 16) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> Mode.prototype.getInitialState = function () { 1->^^^^^^^^^^^^^^^^^^^^ @@ -1761,9 +1781,9 @@ sourceFile:recursiveClassReferenceTest.ts > public 2 > getInitialState 3 > -1->Emitted(92, 21) Source(94, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(92, 51) Source(94, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(92, 54) Source(94, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(100, 21) Source(94, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(100, 51) Source(94, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +3 >Emitted(100, 54) Source(94, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> return new State(self); 1 >^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1785,15 +1805,15 @@ sourceFile:recursiveClassReferenceTest.ts 7 > self 8 > ) 9 > ; -1 >Emitted(93, 25) Source(95, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -2 >Emitted(93, 31) Source(95, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -3 >Emitted(93, 32) Source(95, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -4 >Emitted(93, 36) Source(95, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -5 >Emitted(93, 41) Source(95, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -6 >Emitted(93, 42) Source(95, 21) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -7 >Emitted(93, 46) Source(95, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -8 >Emitted(93, 47) Source(95, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -9 >Emitted(93, 48) Source(95, 27) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +1 >Emitted(101, 25) Source(95, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +2 >Emitted(101, 31) Source(95, 10) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +3 >Emitted(101, 32) Source(95, 11) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +4 >Emitted(101, 36) Source(95, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +5 >Emitted(101, 41) Source(95, 20) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +6 >Emitted(101, 42) Source(95, 21) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +7 >Emitted(101, 46) Source(95, 25) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +8 >Emitted(101, 47) Source(95, 26) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +9 >Emitted(101, 48) Source(95, 27) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) --- >>> }; 1 >^^^^^^^^^^^^^^^^^^^^ @@ -1802,8 +1822,8 @@ sourceFile:recursiveClassReferenceTest.ts 1 > > 2 > } -1 >Emitted(94, 21) Source(96, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) -2 >Emitted(94, 22) Source(96, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +1 >Emitted(102, 21) Source(96, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) +2 >Emitted(102, 22) Source(96, 4) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode.getInitialState) --- >>> return Mode; 1->^^^^^^^^^^^^^^^^^^^^ @@ -1814,8 +1834,8 @@ sourceFile:recursiveClassReferenceTest.ts > > 2 > } -1->Emitted(95, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(95, 32) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +1->Emitted(103, 21) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(103, 32) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) --- >>> })(AbstractMode); 1->^^^^^^^^^^^^^^^^ @@ -1839,12 +1859,12 @@ sourceFile:recursiveClassReferenceTest.ts > > > } -1->Emitted(96, 17) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -2 >Emitted(96, 18) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) -3 >Emitted(96, 18) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(96, 20) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -5 >Emitted(96, 32) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -6 >Emitted(96, 34) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(104, 17) Source(99, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +2 >Emitted(104, 18) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText.Mode) +3 >Emitted(104, 18) Source(91, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(104, 20) Source(91, 28) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +5 >Emitted(104, 32) Source(91, 40) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +6 >Emitted(104, 34) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> PlainText.Mode = Mode; 1->^^^^^^^^^^^^^^^^ @@ -1864,10 +1884,10 @@ sourceFile:recursiveClassReferenceTest.ts > > } 4 > -1->Emitted(97, 17) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(97, 31) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(97, 38) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -4 >Emitted(97, 39) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +1->Emitted(105, 17) Source(91, 15) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(105, 31) Source(91, 19) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(105, 38) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +4 >Emitted(105, 39) Source(99, 3) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) --- >>> })(PlainText = Languages.PlainText || (Languages.PlainText = {})); 1->^^^^^^^^^^^^ @@ -1913,15 +1933,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1->Emitted(98, 13) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -2 >Emitted(98, 14) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) -3 >Emitted(98, 16) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -4 >Emitted(98, 25) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -5 >Emitted(98, 28) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -6 >Emitted(98, 47) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -7 >Emitted(98, 52) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) -8 >Emitted(98, 71) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) -9 >Emitted(98, 79) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +1->Emitted(106, 13) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +2 >Emitted(106, 14) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages.PlainText) +3 >Emitted(106, 16) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +4 >Emitted(106, 25) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +5 >Emitted(106, 28) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +6 >Emitted(106, 47) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +7 >Emitted(106, 52) Source(76, 31) + SourceIndex(0) name (Sample.Thing.Languages) +8 >Emitted(106, 71) Source(76, 40) + SourceIndex(0) name (Sample.Thing.Languages) +9 >Emitted(106, 79) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) --- >>> })(Languages = Thing.Languages || (Thing.Languages = {})); 1 >^^^^^^^^ @@ -1966,15 +1986,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(99, 9) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages) -2 >Emitted(99, 10) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) -3 >Emitted(99, 12) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -4 >Emitted(99, 21) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -5 >Emitted(99, 24) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -6 >Emitted(99, 39) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -7 >Emitted(99, 44) Source(76, 21) + SourceIndex(0) name (Sample.Thing) -8 >Emitted(99, 59) Source(76, 30) + SourceIndex(0) name (Sample.Thing) -9 >Emitted(99, 67) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +1 >Emitted(107, 9) Source(100, 1) + SourceIndex(0) name (Sample.Thing.Languages) +2 >Emitted(107, 10) Source(100, 2) + SourceIndex(0) name (Sample.Thing.Languages) +3 >Emitted(107, 12) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +4 >Emitted(107, 21) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +5 >Emitted(107, 24) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +6 >Emitted(107, 39) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +7 >Emitted(107, 44) Source(76, 21) + SourceIndex(0) name (Sample.Thing) +8 >Emitted(107, 59) Source(76, 30) + SourceIndex(0) name (Sample.Thing) +9 >Emitted(107, 67) Source(100, 2) + SourceIndex(0) name (Sample.Thing) --- >>> })(Thing = Sample.Thing || (Sample.Thing = {})); 1 >^^^^ @@ -2019,15 +2039,15 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(100, 5) Source(100, 1) + SourceIndex(0) name (Sample.Thing) -2 >Emitted(100, 6) Source(100, 2) + SourceIndex(0) name (Sample.Thing) -3 >Emitted(100, 8) Source(76, 15) + SourceIndex(0) name (Sample) -4 >Emitted(100, 13) Source(76, 20) + SourceIndex(0) name (Sample) -5 >Emitted(100, 16) Source(76, 15) + SourceIndex(0) name (Sample) -6 >Emitted(100, 28) Source(76, 20) + SourceIndex(0) name (Sample) -7 >Emitted(100, 33) Source(76, 15) + SourceIndex(0) name (Sample) -8 >Emitted(100, 45) Source(76, 20) + SourceIndex(0) name (Sample) -9 >Emitted(100, 53) Source(100, 2) + SourceIndex(0) name (Sample) +1 >Emitted(108, 5) Source(100, 1) + SourceIndex(0) name (Sample.Thing) +2 >Emitted(108, 6) Source(100, 2) + SourceIndex(0) name (Sample.Thing) +3 >Emitted(108, 8) Source(76, 15) + SourceIndex(0) name (Sample) +4 >Emitted(108, 13) Source(76, 20) + SourceIndex(0) name (Sample) +5 >Emitted(108, 16) Source(76, 15) + SourceIndex(0) name (Sample) +6 >Emitted(108, 28) Source(76, 20) + SourceIndex(0) name (Sample) +7 >Emitted(108, 33) Source(76, 15) + SourceIndex(0) name (Sample) +8 >Emitted(108, 45) Source(76, 20) + SourceIndex(0) name (Sample) +9 >Emitted(108, 53) Source(100, 2) + SourceIndex(0) name (Sample) --- >>>})(Sample || (Sample = {})); 1 > @@ -2069,12 +2089,12 @@ sourceFile:recursiveClassReferenceTest.ts > > } > } -1 >Emitted(101, 1) Source(100, 1) + SourceIndex(0) name (Sample) -2 >Emitted(101, 2) Source(100, 2) + SourceIndex(0) name (Sample) -3 >Emitted(101, 4) Source(76, 8) + SourceIndex(0) -4 >Emitted(101, 10) Source(76, 14) + SourceIndex(0) -5 >Emitted(101, 15) Source(76, 8) + SourceIndex(0) -6 >Emitted(101, 21) Source(76, 14) + SourceIndex(0) -7 >Emitted(101, 29) Source(100, 2) + SourceIndex(0) +1 >Emitted(109, 1) Source(100, 1) + SourceIndex(0) name (Sample) +2 >Emitted(109, 2) Source(100, 2) + SourceIndex(0) name (Sample) +3 >Emitted(109, 4) Source(76, 8) + SourceIndex(0) +4 >Emitted(109, 10) Source(76, 14) + SourceIndex(0) +5 >Emitted(109, 15) Source(76, 8) + SourceIndex(0) +6 >Emitted(109, 21) Source(76, 14) + SourceIndex(0) +7 >Emitted(109, 29) Source(100, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=recursiveClassReferenceTest.js.map \ No newline at end of file diff --git a/tests/baselines/reference/recursiveFunctionTypes.js b/tests/baselines/reference/recursiveFunctionTypes.js index 040c323066d..6f10ef99080 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.js +++ b/tests/baselines/reference/recursiveFunctionTypes.js @@ -45,27 +45,39 @@ f7(""); // ok (function takes an any param) f7(); // ok //// [recursiveFunctionTypes.js] -function fn() { return 1; } +function fn() { + return 1; +} var x = fn; // error var y = fn; // ok var f; var g; -function f1(d) { } -function f2() { } -function g2() { } -function f3() { return f3; } +function f1(d) { +} +function f2() { +} +function g2() { +} +function f3() { + return f3; +} var a = f3; // error var C = (function () { function C() { } - C.g = function (t) { }; + C.g = function (t) { + }; return C; })(); C.g(3); // error var f4; f4 = 3; // error -function f5() { return f5; } -function f6(a) { return f6; } +function f5() { + return f5; +} +function f6(a) { + return f6; +} f6("", 3); // error (arity mismatch) f6(""); // ok (function takes an any param) f6(); // ok diff --git a/tests/baselines/reference/recursiveFunctionTypes1.js b/tests/baselines/reference/recursiveFunctionTypes1.js index c4c255d5e44..2f2d072cb6b 100644 --- a/tests/baselines/reference/recursiveFunctionTypes1.js +++ b/tests/baselines/reference/recursiveFunctionTypes1.js @@ -7,6 +7,7 @@ class C { var C = (function () { function C() { } - C.g = function (t) { }; + C.g = function (t) { + }; return C; })(); diff --git a/tests/baselines/reference/recursiveGetterAccess.js b/tests/baselines/reference/recursiveGetterAccess.js index 1dea2e02d3a..cf042c2c1a0 100644 --- a/tests/baselines/reference/recursiveGetterAccess.js +++ b/tests/baselines/reference/recursiveGetterAccess.js @@ -10,7 +10,9 @@ var MyClass = (function () { function MyClass() { } Object.defineProperty(MyClass.prototype, "testProp", { - get: function () { return this.testProp; }, + get: function () { + return this.testProp; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/recursiveIdenticalOverloadResolution.js b/tests/baselines/reference/recursiveIdenticalOverloadResolution.js index 3c53c2b2a0a..e1ea203ac5b 100644 --- a/tests/baselines/reference/recursiveIdenticalOverloadResolution.js +++ b/tests/baselines/reference/recursiveIdenticalOverloadResolution.js @@ -20,7 +20,9 @@ module M { //// [recursiveIdenticalOverloadResolution.js] var M; (function (M) { - function f(p) { return f; } + function f(p) { + return f; + } ; var i; f(i); diff --git a/tests/baselines/reference/recursiveInference1.js b/tests/baselines/reference/recursiveInference1.js index 3a26ead542d..839e13130f2 100644 --- a/tests/baselines/reference/recursiveInference1.js +++ b/tests/baselines/reference/recursiveInference1.js @@ -3,5 +3,7 @@ function fib(x:number) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); } var result = fib(5); //// [recursiveInference1.js] -function fib(x) { return x <= 1 ? x : fib(x - 1) + fib(x - 2); } +function fib(x) { + return x <= 1 ? x : fib(x - 1) + fib(x - 2); +} var result = fib(5); diff --git a/tests/baselines/reference/recursiveInferenceBug.js b/tests/baselines/reference/recursiveInferenceBug.js index 5b4d4f0c0a1..cffa96415dc 100644 --- a/tests/baselines/reference/recursiveInferenceBug.js +++ b/tests/baselines/reference/recursiveInferenceBug.js @@ -17,6 +17,9 @@ function f(x) { return x; } var zz = { - g: function () { }, - get f() { return "abc"; } + g: function () { + }, + get f() { + return "abc"; + } }; diff --git a/tests/baselines/reference/recursiveInheritance3.js b/tests/baselines/reference/recursiveInheritance3.js index bc9fb6cb4f9..710b691fa94 100644 --- a/tests/baselines/reference/recursiveInheritance3.js +++ b/tests/baselines/reference/recursiveInheritance3.js @@ -13,6 +13,8 @@ var C = (function () { function C() { this.x = 1; } - C.prototype.foo = function (x) { return x; }; + C.prototype.foo = function (x) { + return x; + }; return C; })(); diff --git a/tests/baselines/reference/recursiveInitializer.js b/tests/baselines/reference/recursiveInitializer.js index 82abf2b50af..2b33e873cb1 100644 --- a/tests/baselines/reference/recursiveInitializer.js +++ b/tests/baselines/reference/recursiveInitializer.js @@ -35,4 +35,6 @@ var b2 = !!b2; var b3 = !b3 || b3; // expected boolean here. actually 'any' var b4 = (!b4) && b4; // expected boolean here. actually 'any' // (x:string) => any -var f = function (x) { return f(x); }; +var f = function (x) { + return f(x); +}; diff --git a/tests/baselines/reference/recursiveObjectLiteral.js b/tests/baselines/reference/recursiveObjectLiteral.js index 70de48d2499..80c512a8280 100644 --- a/tests/baselines/reference/recursiveObjectLiteral.js +++ b/tests/baselines/reference/recursiveObjectLiteral.js @@ -2,4 +2,6 @@ var a = { f: a }; //// [recursiveObjectLiteral.js] -var a = { f: a }; +var a = { + f: a +}; diff --git a/tests/baselines/reference/recursiveProperties.js b/tests/baselines/reference/recursiveProperties.js index 84d9ebcd27c..63644484956 100644 --- a/tests/baselines/reference/recursiveProperties.js +++ b/tests/baselines/reference/recursiveProperties.js @@ -12,7 +12,9 @@ var A = (function () { function A() { } Object.defineProperty(A.prototype, "testProp", { - get: function () { return this.testProp; }, + get: function () { + return this.testProp; + }, enumerable: true, configurable: true }); @@ -22,7 +24,9 @@ var B = (function () { function B() { } Object.defineProperty(B.prototype, "testProp", { - set: function (value) { this.testProp = value; }, + set: function (value) { + this.testProp = value; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/recursiveReturns.js b/tests/baselines/reference/recursiveReturns.js index 18c9ed4dd7c..d01825f8cbf 100644 --- a/tests/baselines/reference/recursiveReturns.js +++ b/tests/baselines/reference/recursiveReturns.js @@ -20,7 +20,9 @@ function R1() { R1(); return; } -function R2() { R2(); } +function R2() { + R2(); +} function R3(n) { if (n == 0) { } diff --git a/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js b/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js index 0cef9be47ab..b056e90e909 100644 --- a/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js +++ b/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js @@ -59,9 +59,13 @@ function foo(x) { function foo2(x) { } function other() { - function foo3(x) { } - function foo4(x) { } - function foo5(x) { return null; } + function foo3(x) { + } + function foo4(x) { + } + function foo5(x) { + return null; + } var list; var myList; var r = foo5(list); diff --git a/tests/baselines/reference/redefineArray.js b/tests/baselines/reference/redefineArray.js index 080d2b1a2d2..93494232436 100644 --- a/tests/baselines/reference/redefineArray.js +++ b/tests/baselines/reference/redefineArray.js @@ -2,4 +2,6 @@ Array = function (n:number, s:string) {return n;}; //// [redefineArray.js] -Array = function (n, s) { return n; }; +Array = function (n, s) { + return n; +}; diff --git a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js index 24f0e7f1bcb..608090e8722 100644 --- a/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js +++ b/tests/baselines/reference/resolvingClassDeclarationWhenInBaseTypeResolution.js @@ -1036,31 +1036,41 @@ var rionegrensis; caniventer.prototype.salomonseni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; caniventer.prototype.uchidai = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; caniventer.prototype.raffrayana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; caniventer.prototype.Uranium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; caniventer.prototype.nayaur = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return caniventer; @@ -1074,31 +1084,41 @@ var rionegrensis; veraecrucis.prototype.naso = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; veraecrucis.prototype.vancouverensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; veraecrucis.prototype.africana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; veraecrucis.prototype.palliolata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; veraecrucis.prototype.nivicola = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return veraecrucis; @@ -1119,31 +1139,41 @@ var julianae; nudicaudus.prototype.brandtii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nudicaudus.prototype.maxwellii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nudicaudus.prototype.endoi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nudicaudus.prototype.venezuelae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nudicaudus.prototype.zamicrus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return nudicaudus; @@ -1155,43 +1185,57 @@ var julianae; galapagoensis.prototype.isabellae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.rueppellii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.peregusna = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.gliroides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.banakrisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.rozendaali = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; galapagoensis.prototype.stuhlmanni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return galapagoensis; @@ -1203,43 +1247,57 @@ var julianae; albidens.prototype.mattheyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.Astatine = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.vincenti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.hirta = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.virginianus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.macrophyllum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; albidens.prototype.porcellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return albidens; @@ -1253,79 +1311,105 @@ var julianae; oralis.prototype.cepapi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.porteri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.bindi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.puda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.mindorensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.ignitus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.rufus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.monax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.unalascensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.wuchihensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.leucippe = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.ordii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oralis.prototype.eisentrauti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return oralis; @@ -1339,43 +1423,57 @@ var julianae; sumatrana.prototype.wolffsohni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.geata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.awashensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.sturdeei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.pachyurus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.lyelli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sumatrana.prototype.neohibernicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return sumatrana; @@ -1387,67 +1485,89 @@ var julianae; gerbillus.prototype.pundti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.tristrami = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.swarthi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.horsfieldii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.diazi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.rennelli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.maulinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.muscina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.pelengensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.abramus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gerbillus.prototype.reevesi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return gerbillus; @@ -1459,73 +1579,97 @@ var julianae; acariensis.prototype.levicula = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.minous = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.cinereiventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.longicaudatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.baeodon = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.soricoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.datae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.spixii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.anakuma = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.kihaulei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.gymnura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; acariensis.prototype.olchonensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return acariensis; @@ -1539,19 +1683,25 @@ var julianae; durangae.prototype.Californium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; durangae.prototype.Flerovium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; durangae.prototype.phrudus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return durangae; @@ -1566,13 +1716,17 @@ var ruatanica; hector.prototype.humulis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; hector.prototype.eurycerus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return hector; @@ -1587,19 +1741,25 @@ var Lanthanum; suillus.prototype.spilosoma = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; suillus.prototype.tumbalensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; suillus.prototype.anatolicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return suillus; @@ -1613,61 +1773,81 @@ var Lanthanum; nitidus.prototype.granatensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.negligens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.lewisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.arge = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.dominicensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.taurus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.tonganus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.silvatica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.midas = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; nitidus.prototype.bicornis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return nitidus; @@ -1681,49 +1861,65 @@ var Lanthanum; megalonyx.prototype.phillipsii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.melanogaster = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.elaphus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.elater = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.ourebi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.caraccioli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.parva = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megalonyx.prototype.albipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return megalonyx; @@ -1735,85 +1931,113 @@ var Lanthanum; jugularis.prototype.torrei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.revoili = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.macrobullatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.compactus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.talpinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.stramineus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.dartmouthi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.ogilbyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.incomtus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.surdaster = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.melanorhinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.picticaudata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.pomona = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; jugularis.prototype.ileile = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return jugularis; @@ -1830,85 +2054,113 @@ var rendalli; zuluensis.prototype.telfairi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.keyensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.occasius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.damarensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.Neptunium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.griseoflavus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.thar = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.alborufus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.fusicaudus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.gordonorum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.ruber = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.desmarestianus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.lutillus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; zuluensis.prototype.salocco = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return zuluensis; @@ -1920,61 +2172,81 @@ var rendalli; moojeni.prototype.floweri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.montosa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.miletus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.heaneyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.marchei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.budini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.maggietaylorae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.poliocephalus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.zibethicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; moojeni.prototype.biacensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return moojeni; @@ -1988,19 +2260,25 @@ var rendalli; crenulata.prototype.salvanius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; crenulata.prototype.maritimus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; crenulata.prototype.edax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return crenulata; @@ -2015,49 +2293,65 @@ var trivirgatus; tumidifrons.prototype.nivalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.vestitus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.aequatorius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.scherman = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.improvisum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.cervinipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.audax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; tumidifrons.prototype.vallinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return tumidifrons; @@ -2071,43 +2365,57 @@ var trivirgatus; mixtus.prototype.ochrogaster = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.bryophilus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.liechtensteini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.crawfordi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.hypsibia = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.matacus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mixtus.prototype.demidoff = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return mixtus; @@ -2119,13 +2427,17 @@ var trivirgatus; lotor.prototype.balensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lotor.prototype.pullata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return lotor; @@ -2137,43 +2449,57 @@ var trivirgatus; falconeri.prototype.cabrali = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.gouldi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.fuscicollis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.martiensseni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.gaoligongensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.shawi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; falconeri.prototype.gmelini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return falconeri; @@ -2185,85 +2511,113 @@ var trivirgatus; oconnelli.prototype.youngsoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.terrestris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.chrysopus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.fuscomurina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.hellwaldii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.aenea = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.perrini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.entellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.krebsii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.cephalotes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.molossinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.luisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.ceylonicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oconnelli.prototype.ralli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return oconnelli; @@ -2278,25 +2632,33 @@ var quasiater; bobrinskoi.prototype.crassicaudatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; bobrinskoi.prototype.mulatta = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; bobrinskoi.prototype.ansorgei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; bobrinskoi.prototype.Copper = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return bobrinskoi; @@ -2313,25 +2675,33 @@ var ruatanica; americanus.prototype.nasoloi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; americanus.prototype.mystacalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; americanus.prototype.fardoulisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; americanus.prototype.tumidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return americanus; @@ -2348,79 +2718,105 @@ var lavali; wilsoni.prototype.setiger = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.lorentzii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.antisensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.blossevillii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.bontanus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.caligata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.franqueti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.roberti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.degelidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.amoenus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.kob = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.csorbai = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wilsoni.prototype.dorsata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return wilsoni; @@ -2440,79 +2836,105 @@ var lavali; otion.prototype.bonaerensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.dussumieri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.osvaldoreigi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.grevyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.hirtula = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.cristatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.darlingtoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.fontanierii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.umbrosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.chiriquinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.orarius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.ilaeus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; otion.prototype.musschenbroekii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return otion; @@ -2524,73 +2946,97 @@ var lavali; xanthognathus.prototype.nanulus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.albigena = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.onca = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.gunnii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.apeco = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.variegates = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.goudotii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.pohlei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.ineptus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.euryotis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.maurisca = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; xanthognathus.prototype.coyhaiquensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return xanthognathus; @@ -2604,49 +3050,65 @@ var lavali; thaeleri.prototype.coromandra = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.parvipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.sponsorius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.vates = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.roosmalenorum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.rubicola = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.ikonnikovi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thaeleri.prototype.paramicrus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return thaeleri; @@ -2660,13 +3122,17 @@ var lavali; lepturus.prototype.ferrumequinum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lepturus.prototype.aequalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return lepturus; @@ -2683,55 +3149,73 @@ var dogramacii; robustulus.prototype.fossor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.humboldti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.mexicana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.martini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.beatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.leporina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.pearsonii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.keaysi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; robustulus.prototype.hindei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return robustulus; @@ -2743,7 +3227,9 @@ var dogramacii; koepckeae.prototype.culturatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return koepckeae; @@ -2755,79 +3241,105 @@ var dogramacii; kaiseri.prototype.bedfordiae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.paramorum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.rubidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.juninensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.marginata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.Meitnerium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.pinetorum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.hoolock = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.poeyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.Thulium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.patrius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.quadraticauda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; kaiseri.prototype.ater = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return kaiseri; @@ -2839,49 +3351,65 @@ var dogramacii; aurata.prototype.grunniens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.howensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.karlkoopmani = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.mirapitanga = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.ophiodon = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.landeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.sonomae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; aurata.prototype.erythromos = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return aurata; @@ -2898,85 +3426,113 @@ var lutreolus; schlegeli.prototype.mittendorfi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.blicki = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.culionensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.scrofa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.fernandoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.Tin = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.marmorata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.tavaratra = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.peregrina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.frontalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.cuniculus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.magdalenae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.andamanensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; schlegeli.prototype.dispar = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return schlegeli; @@ -2991,67 +3547,89 @@ var argurus; dauricus.prototype.chinensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.duodecimcostatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.foxi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.macleayii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.darienensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.hardwickii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.albifrons = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.jacobitus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.guentheri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.mahomet = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dauricus.prototype.misionensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return dauricus; @@ -3066,49 +3644,65 @@ var nigra; dolichurus.prototype.solomonis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.alfredi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.morrisi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.lekaguli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.dimissus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.phaeotis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.ustus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; dolichurus.prototype.sagei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return dolichurus; @@ -3125,37 +3719,49 @@ var panglima; amphibius.prototype.bottegi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.jerdoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.camtschatica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.spadix = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.luismanueli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amphibius.prototype.aceramarcae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return amphibius; @@ -3169,19 +3775,25 @@ var panglima; fundatus.prototype.crassulus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fundatus.prototype.flamarioni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fundatus.prototype.mirabilis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return fundatus; @@ -3195,31 +3807,41 @@ var panglima; abidi.prototype.greyii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; abidi.prototype.macedonicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; abidi.prototype.galili = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; abidi.prototype.thierryi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; abidi.prototype.ega = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return abidi; @@ -3234,43 +3856,57 @@ var quasiater; carolinensis.prototype.concinna = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.aeneus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.aloysiisabaudiae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.tenellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.andium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.persephone = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; carolinensis.prototype.patrizii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return carolinensis; @@ -3287,73 +3923,97 @@ var minutus; himalayana.prototype.simoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.lobata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.rusticus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.latona = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.famulus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.flaviceps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.paradoxolophus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.Osmium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.vulgaris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.betsileoensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.vespuccii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; himalayana.prototype.olympus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return himalayana; @@ -3370,49 +4030,65 @@ var caurinus; mahaganus.prototype.martiniquensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.devius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.masalai = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.kathleenae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.simulus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.nigrovittatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.senegalensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; mahaganus.prototype.acticola = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return mahaganus; @@ -3427,7 +4103,9 @@ var macrorhinos; marmosurus.prototype.tansaniana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return marmosurus; @@ -3444,7 +4122,9 @@ var howi; angulatus.prototype.pennatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return angulatus; @@ -3468,49 +4148,65 @@ var nigra; thalia.prototype.dichotomus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.arnuxii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.verheyeni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.dauuricus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.tristriatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.lasiura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.gangetica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; thalia.prototype.brucei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return thalia; @@ -3527,7 +4223,9 @@ var sagitta; walkeri.prototype.maracajuensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return walkeri; @@ -3544,7 +4242,9 @@ var minutus; inez.prototype.vexillaris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return inez; @@ -3572,55 +4272,73 @@ var panamensis; linulus.prototype.goslingi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.taki = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.fumosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.rufinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.lami = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.regina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.nanilla = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.enganus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; linulus.prototype.gomantongensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return linulus; @@ -3635,79 +4353,105 @@ var nigra; gracilis.prototype.weddellii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.echinothrix = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.garridoi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.rouxii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.aurita = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.geoffrensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.theresa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.melanocarpus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.dubiaquercus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.pectoralis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.apoensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.grisescens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gracilis.prototype.ramirohitra = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return gracilis; @@ -3724,79 +4468,105 @@ var samarensis; pelurus.prototype.Palladium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.castanea = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.chamek = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.nigriceps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.lunatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.madurae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.chinchilla = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.eliasi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.proditor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.gambianus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.petteri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.nusatenggara = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pelurus.prototype.olitor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return pelurus; @@ -3810,85 +4580,113 @@ var samarensis; fuscus.prototype.planifrons = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.badia = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.prymnolopha = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.natalensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.hunteri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.sapiens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.macrocercus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.nimbae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.suricatta = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.jagorii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.beecrofti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.imaizumii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.colocolo = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; fuscus.prototype.wolfi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return fuscus; @@ -3900,25 +4698,33 @@ var samarensis; pallidus.prototype.oblativa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pallidus.prototype.watersi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pallidus.prototype.glacialis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pallidus.prototype.viaria = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return pallidus; @@ -3930,31 +4736,41 @@ var samarensis; cahirinus.prototype.alashanicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cahirinus.prototype.flaviventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cahirinus.prototype.bottai = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cahirinus.prototype.pinetis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cahirinus.prototype.saussurei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return cahirinus; @@ -3971,31 +4787,41 @@ var sagitta; leptoceros.prototype.victus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; leptoceros.prototype.hoplomyoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; leptoceros.prototype.gratiosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; leptoceros.prototype.rex = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; leptoceros.prototype.bolami = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return leptoceros; @@ -4012,7 +4838,9 @@ var daubentonii; nigricans.prototype.woosnami = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return nigricans; @@ -4038,19 +4866,25 @@ var argurus; pygmaea.prototype.pajeros = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pygmaea.prototype.capucinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; pygmaea.prototype.cuvieri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return pygmaea; @@ -4067,43 +4901,57 @@ var chrysaeolus; sarasinorum.prototype.belzebul = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.hinpoon = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.kandti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.cynosuros = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.Germanium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.Ununoctium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sarasinorum.prototype.princeps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return sarasinorum; @@ -4118,43 +4966,57 @@ var argurus; wetmorei.prototype.leucoptera = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.ochraventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.tephromelas = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.cracens = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.jamaicensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.gymnocaudus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wetmorei.prototype.mayori = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return wetmorei; @@ -4171,49 +5033,65 @@ var argurus; oreas.prototype.salamonis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.paniscus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.fagani = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.papuanus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.timidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.nghetinhensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.barbei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; oreas.prototype.univittatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return oreas; @@ -4228,73 +5106,97 @@ var daubentonii; arboreus.prototype.capreolus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.moreni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.hypoleucos = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.paedulcus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.pucheranii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.stella = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.brasiliensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.brevicaudata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.vitticollis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.huangensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.cameroni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; arboreus.prototype.tianshanica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return arboreus; @@ -4309,79 +5211,105 @@ var patas; uralensis.prototype.cartilagonodus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.pyrrhinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.insulans = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.nigricauda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.muricauda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.albicaudus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.fallax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.attenuata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.megalura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.neblina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.citellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.tanezumi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; uralensis.prototype.albiventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return uralensis; @@ -4398,13 +5326,17 @@ var provocax; melanoleuca.prototype.Neodymium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanoleuca.prototype.baeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return melanoleuca; @@ -4419,13 +5351,17 @@ var sagitta; sicarius.prototype.Chlorine = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sicarius.prototype.simulator = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return sicarius; @@ -4442,85 +5378,113 @@ var howi; marcanoi.prototype.formosae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.dudui = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.leander = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.martinsi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.beatrix = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.griseoventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.zerda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.yucatanicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.nigrita = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.jouvenetae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.indefessus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.vuquangensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.Zirconium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; marcanoi.prototype.hyaena = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return marcanoi; @@ -4535,73 +5499,97 @@ var argurus; gilbertii.prototype.nasutus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.poecilops = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.sondaicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.auriventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.cherriei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.lindberghi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.pipistrellus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.paranus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.dubosti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.opossum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.oreopolus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; gilbertii.prototype.amurensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return gilbertii; @@ -4625,79 +5613,105 @@ var lutreolus; punicus.prototype.strandi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.lar = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.erica = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.trichura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.lemniscatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.aspalax = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.marshalli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.Zinc = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.monochromos = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.purinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.ischyrus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.tenuis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; punicus.prototype.Helium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return punicus; @@ -4712,37 +5726,49 @@ var macrorhinos; daphaenodon.prototype.bredanensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.othus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.hammondi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.aureocollaris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.flavipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; daphaenodon.prototype.callosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return daphaenodon; @@ -4757,73 +5783,97 @@ var sagitta; cinereus.prototype.zunigae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.microps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.guaporensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.tonkeana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.montensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.sphinx = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.glis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.dorsalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.fimbriatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.sara = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.epimelas = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cinereus.prototype.pittieri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return cinereus; @@ -4855,61 +5905,81 @@ var gabriellae; amicus.prototype.pirrensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.phaeura = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.voratus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.satarae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.hooperi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.perrensi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.ridei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.audeberti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.Lutetium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; amicus.prototype.atrox = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return amicus; @@ -4921,7 +5991,9 @@ var gabriellae; echinatus.prototype.tenuipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return echinatus; @@ -4936,37 +6008,49 @@ var imperfecta; lasiurus.prototype.marisae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.fulvus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.paranaensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.didactylus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.schreibersii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; lasiurus.prototype.orii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return lasiurus; @@ -4978,67 +6062,89 @@ var imperfecta; subspinosus.prototype.monticularis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.Gadolinium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.oasicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.paterculus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.punctata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.invictus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.stangeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.siskiyou = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.welwitschii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.Polonium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; subspinosus.prototype.harpia = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return subspinosus; @@ -5052,19 +6158,25 @@ var imperfecta; ciliolabrum.prototype.leschenaultii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; ciliolabrum.prototype.ludia = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; ciliolabrum.prototype.sinicus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return ciliolabrum; @@ -5079,25 +6191,33 @@ var quasiater; wattsi.prototype.lagotis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wattsi.prototype.hussoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wattsi.prototype.bilarni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; wattsi.prototype.cabrerae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return wattsi; @@ -5114,55 +6234,73 @@ var petrophilus; sodyi.prototype.saundersiae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.imberbis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.cansdalei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.Lawrencium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.catta = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.breviceps = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.transitionalis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.heptneri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; sodyi.prototype.bairdii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return sodyi; @@ -5179,49 +6317,65 @@ var caurinus; megaphyllus.prototype.montana = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.amatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.bucculentus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.lepida = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.graecus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.forsteri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.perotensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; megaphyllus.prototype.cirrhosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return megaphyllus; @@ -5236,19 +6390,25 @@ var minutus; portoricensis.prototype.relictus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; portoricensis.prototype.aequatorianus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; portoricensis.prototype.rhinogradoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return portoricensis; @@ -5263,79 +6423,105 @@ var lutreolus; foina.prototype.tarfayensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.Promethium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.salinae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.kerri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.scotti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.camerunensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.affinis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.siebersi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.maquassiensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.layardi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.bishopi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.apodemoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; foina.prototype.argentiventer = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return foina; @@ -5352,61 +6538,81 @@ var lutreolus; cor.prototype.antinorii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.voi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.mussoi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.truncatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.achates = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.praedatrix = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.mzabi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.xanthinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.tapoatafa = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; cor.prototype.castroviejoi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return cor; @@ -5421,13 +6627,17 @@ var howi; coludo.prototype.bernhardi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; coludo.prototype.isseli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return coludo; @@ -5444,13 +6654,17 @@ var argurus; germaini.prototype.sharpei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; germaini.prototype.palmarum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return germaini; @@ -5465,67 +6679,89 @@ var sagitta; stolzmanni.prototype.riparius = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.dhofarensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.tricolor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.gardneri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.walleri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.talpoides = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.pallipes = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.lagurus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.hipposideros = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.griselda = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; stolzmanni.prototype.florium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return stolzmanni; @@ -5542,79 +6778,105 @@ var dammermani; melanops.prototype.blarina = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.harwoodi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.ashaninka = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.wiedii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.godmani = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.condorensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.xerophila = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.laminatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.archeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.hidalgo = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.unicolor = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.philippii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; melanops.prototype.bocagei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return melanops; @@ -5631,49 +6893,65 @@ var argurus; peninsulae.prototype.aitkeni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.novaeangliae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.olallae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.anselli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.timminsi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.sordidus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.telfordi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; peninsulae.prototype.cavernarum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return peninsulae; @@ -5688,79 +6966,105 @@ var argurus; netscheri.prototype.gravis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.ruschii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.tricuspidatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.fernandezi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.colletti = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.microbullatus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.eburneae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.tatei = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.millardi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.pruinosus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.delator = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.nyikae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; netscheri.prototype.ruemmleri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return netscheri; @@ -5777,79 +7081,105 @@ var ruatanica; Praseodymium.prototype.clara = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.spectabilis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.kamensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.ruddi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.bartelsii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.yerbabuenae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.davidi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.pilirostris = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.catherinae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.frontata = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.Terbium = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.thomensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; Praseodymium.prototype.soricinus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return Praseodymium; @@ -5866,7 +7196,9 @@ var caurinus; johorensis.prototype.maini = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return johorensis; @@ -5881,7 +7213,9 @@ var argurus; luctuosa.prototype.loriae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return luctuosa; @@ -5896,49 +7230,65 @@ var panamensis; setulosus.prototype.duthieae = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.guereza = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.buselaphus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.nuttalli = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.pelii = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.tunneyi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.lamula = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; setulosus.prototype.vampyrus = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return setulosus; @@ -5953,31 +7303,41 @@ var petrophilus; rosalia.prototype.palmeri = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; rosalia.prototype.baeops = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; rosalia.prototype.ozensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; rosalia.prototype.creaghi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; rosalia.prototype.montivaga = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return rosalia; @@ -5994,37 +7354,49 @@ var caurinus; psilurus.prototype.socialis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.lundi = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.araeum = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.calamianensis = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.petersoni = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; psilurus.prototype.nitela = function () { var _this = this; var x; - (function () { var y = _this; }); + (function () { + var y = _this; + }); return x; }; return psilurus; diff --git a/tests/baselines/reference/restArgAssignmentCompat.js b/tests/baselines/reference/restArgAssignmentCompat.js index 3f8749f332d..a640560c051 100644 --- a/tests/baselines/reference/restArgAssignmentCompat.js +++ b/tests/baselines/reference/restArgAssignmentCompat.js @@ -15,9 +15,14 @@ function f() { for (var _i = 0; _i < arguments.length; _i++) { x[_i - 0] = arguments[_i]; } - x.forEach(function (n, i) { return void ('item ' + i + ' = ' + n); }); + x.forEach(function (n, i) { + return void ('item ' + i + ' = ' + n); + }); +} +function g(x, y) { } -function g(x, y) { } var n = g; n = f; -n([4], 'foo'); +n([ + 4 +], 'foo'); diff --git a/tests/baselines/reference/restElementMustBeLast.js b/tests/baselines/reference/restElementMustBeLast.js index 337cb6de6f6..2e11ce91de8 100644 --- a/tests/baselines/reference/restElementMustBeLast.js +++ b/tests/baselines/reference/restElementMustBeLast.js @@ -4,6 +4,14 @@ var [...a, x] = [1, 2, 3]; // Error, rest must be last element //// [restElementMustBeLast.js] -var _a = [1, 2, 3], x = _a[1]; // Error, rest must be last element -_b = [1, 2, 3], x = _b[1]; // Error, rest must be last element +var _a = [ + 1, + 2, + 3 +], x = _a[1]; // Error, rest must be last element +_b = [ + 1, + 2, + 3 +], x = _b[1]; // Error, rest must be last element var _b; diff --git a/tests/baselines/reference/restParameterNotLast.js b/tests/baselines/reference/restParameterNotLast.js index 4ca416a47ec..791d83849a1 100644 --- a/tests/baselines/reference/restParameterNotLast.js +++ b/tests/baselines/reference/restParameterNotLast.js @@ -2,4 +2,5 @@ function f(...x, y) { } //// [restParameterNotLast.js] -function f(x, y) { } +function f(x, y) { +} diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 0096c4d65b6..30ce79bc369 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -77,39 +77,47 @@ var A = (function () { function A() { return; } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); var B = (function () { function B() { return 1; // error } - B.prototype.foo = function () { }; + B.prototype.foo = function () { + }; return B; })(); var C = (function () { function C() { return this; } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); var D = (function () { function D() { return "test"; // error } - D.prototype.foo = function () { }; + D.prototype.foo = function () { + }; return D; })(); var E = (function () { function E() { - return { foo: 1 }; + return { + foo: 1 + }; } return E; })(); var F = (function () { function F() { - return { foo: 1 }; //error + return { + foo: 1 + }; //error } return F; })(); @@ -117,8 +125,10 @@ var G = (function () { function G() { this.test = 2; } - G.prototype.test1 = function () { }; - G.prototype.foo = function () { }; + G.prototype.test1 = function () { + }; + G.prototype.foo = function () { + }; return G; })(); var H = (function (_super) { diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index 77b6ae1f774..b968998e4d6 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -32,18 +32,35 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // all the following should be valid -function fn1() { return 1; } -function fn2() { return ''; } -function fn3() { return undefined; } -function fn4() { return; } -function fn5() { return true; } -function fn6() { return new Date(12); } -function fn7() { return null; } -function fn8() { return; } // OK, eq. to 'return undefined' +function fn1() { + return 1; +} +function fn2() { + return ''; +} +function fn3() { + return undefined; +} +function fn4() { + return; +} +function fn5() { + return true; +} +function fn6() { + return new Date(12); +} +function fn7() { + return null; +} +function fn8() { + return; +} // OK, eq. to 'return undefined' var C = (function () { function C() { } - C.prototype.dispose = function () { }; + C.prototype.dispose = function () { + }; return C; })(); var D = (function (_super) { @@ -53,7 +70,17 @@ var D = (function (_super) { } return D; })(C); -function fn10() { return { id: 12 }; } -function fn11() { return new C(); } -function fn12() { return new D(); } -function fn13() { return null; } +function fn10() { + return { + id: 12 + }; +} +function fn11() { + return new C(); +} +function fn12() { + return new D(); +} +function fn13() { + return null; +} diff --git a/tests/baselines/reference/returnTypeParameter.js b/tests/baselines/reference/returnTypeParameter.js index d5f46cba776..58667207055 100644 --- a/tests/baselines/reference/returnTypeParameter.js +++ b/tests/baselines/reference/returnTypeParameter.js @@ -3,5 +3,8 @@ function f(a: T): T { } // error, no return statement function f2(a: T): T { return T; } // bug was that this satisfied the return statement requirement //// [returnTypeParameter.js] -function f(a) { } // error, no return statement -function f2(a) { return T; } // bug was that this satisfied the return statement requirement +function f(a) { +} // error, no return statement +function f2(a) { + return T; +} // bug was that this satisfied the return statement requirement diff --git a/tests/baselines/reference/returnTypeParameterWithModules.js b/tests/baselines/reference/returnTypeParameterWithModules.js index 4790fe1341b..2dc8da604f9 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.js +++ b/tests/baselines/reference/returnTypeParameterWithModules.js @@ -18,7 +18,12 @@ module M2 { var M1; (function (M1) { function reduce(ar, f, e) { - return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); + return Array.prototype.reduce.apply(ar, e ? [ + f, + e + ] : [ + f + ]); } M1.reduce = reduce; ; @@ -33,7 +38,9 @@ var M2; M2.compose = compose; ; function compose2(g, f) { - return function (x) { return g(f(x)); }; + return function (x) { + return g(f(x)); + }; } M2.compose2 = compose2; ; diff --git a/tests/baselines/reference/returnTypeTypeArguments.js b/tests/baselines/reference/returnTypeTypeArguments.js index b374cb1c581..5be549d2f34 100644 --- a/tests/baselines/reference/returnTypeTypeArguments.js +++ b/tests/baselines/reference/returnTypeTypeArguments.js @@ -92,31 +92,65 @@ var Three = (function () { } return Three; })(); -function A1() { return null; } -function A2() { return null; } -function A3() { return null; } -function B1() { return null; } -function B2() { return null; } -function B3() { return null; } +function A1() { + return null; +} +function A2() { + return null; +} +function A3() { + return null; +} +function B1() { + return null; +} +function B2() { + return null; +} +function B3() { + return null; +} var C = (function () { function C() { } - C.prototype.A1 = function () { return null; }; - C.prototype.A2 = function () { return null; }; - C.prototype.A3 = function () { return null; }; - C.prototype.B1 = function () { return null; }; - C.prototype.B2 = function () { return null; }; - C.prototype.B3 = function () { return null; }; + C.prototype.A1 = function () { + return null; + }; + C.prototype.A2 = function () { + return null; + }; + C.prototype.A3 = function () { + return null; + }; + C.prototype.B1 = function () { + return null; + }; + C.prototype.B2 = function () { + return null; + }; + C.prototype.B3 = function () { + return null; + }; return C; })(); var D = (function () { function D() { } - D.prototype.A2 = function () { return null; }; - D.prototype.A3 = function () { return null; }; - D.prototype.B1 = function () { return null; }; - D.prototype.B2 = function () { return null; }; - D.prototype.B3 = function () { return null; }; + D.prototype.A2 = function () { + return null; + }; + D.prototype.A3 = function () { + return null; + }; + D.prototype.B1 = function () { + return null; + }; + D.prototype.B2 = function () { + return null; + }; + D.prototype.B3 = function () { + return null; + }; return D; })(); var Y = (function () { diff --git a/tests/baselines/reference/reverseInferenceInContextualInstantiation.js b/tests/baselines/reference/reverseInferenceInContextualInstantiation.js index f9c3242e1ea..7108029ac54 100644 --- a/tests/baselines/reference/reverseInferenceInContextualInstantiation.js +++ b/tests/baselines/reference/reverseInferenceInContextualInstantiation.js @@ -5,6 +5,8 @@ x.sort(compare); // Error, but shouldn't be //// [reverseInferenceInContextualInstantiation.js] -function compare(a, b) { return 0; } +function compare(a, b) { + return 0; +} var x; x.sort(compare); // Error, but shouldn't be diff --git a/tests/baselines/reference/scannertest1.js b/tests/baselines/reference/scannertest1.js index b96c965a79e..dc003e95a8f 100644 --- a/tests/baselines/reference/scannertest1.js +++ b/tests/baselines/reference/scannertest1.js @@ -33,17 +33,11 @@ var CharacterInfo = (function () { return c >= CharacterCodes._0 && c <= CharacterCodes._9; }; CharacterInfo.isHexDigit = function (c) { - return isDecimalDigit(c) || - (c >= CharacterCodes.A && c <= CharacterCodes.F) || - (c >= CharacterCodes.a && c <= CharacterCodes.f); + return isDecimalDigit(c) || (c >= CharacterCodes.A && c <= CharacterCodes.F) || (c >= CharacterCodes.a && c <= CharacterCodes.f); }; CharacterInfo.hexValue = function (c) { Debug.assert(isHexDigit(c)); - return isDecimalDigit(c) - ? (c - CharacterCodes._0) - : (c >= CharacterCodes.A && c <= CharacterCodes.F) - ? c - CharacterCodes.A + 10 - : c - CharacterCodes.a + 10; + return isDecimalDigit(c) ? (c - CharacterCodes._0) : (c >= CharacterCodes.A && c <= CharacterCodes.F) ? c - CharacterCodes.A + 10 : c - CharacterCodes.a + 10; }; return CharacterInfo; })(); diff --git a/tests/baselines/reference/scopingInCatchBlocks.js b/tests/baselines/reference/scopingInCatchBlocks.js index 3121f4e9c79..2d3ca7098b5 100644 --- a/tests/baselines/reference/scopingInCatchBlocks.js +++ b/tests/baselines/reference/scopingInCatchBlocks.js @@ -11,12 +11,17 @@ var x = ex1; // should error //// [scopingInCatchBlocks.js] -try { } +try { +} catch (ex1) { throw ex1; } -try { } -catch (ex1) { } // should not error -try { } -catch (ex1) { } // should not error +try { +} +catch (ex1) { +} // should not error +try { +} +catch (ex1) { +} // should not error var x = ex1; // should error diff --git a/tests/baselines/reference/selfInCallback.js b/tests/baselines/reference/selfInCallback.js index 25228b03187..85f16390f96 100644 --- a/tests/baselines/reference/selfInCallback.js +++ b/tests/baselines/reference/selfInCallback.js @@ -12,10 +12,14 @@ var C = (function () { function C() { this.p1 = 0; } - C.prototype.callback = function (cb) { cb(); }; + C.prototype.callback = function (cb) { + cb(); + }; C.prototype.doit = function () { var _this = this; - this.callback(function () { _this.p1 + 1; }); + this.callback(function () { + _this.p1 + 1; + }); }; return C; })(); diff --git a/tests/baselines/reference/selfInLambdas.js b/tests/baselines/reference/selfInLambdas.js index 6b09cf2e227..67006603c8e 100644 --- a/tests/baselines/reference/selfInLambdas.js +++ b/tests/baselines/reference/selfInLambdas.js @@ -53,7 +53,9 @@ var o = { var _this = this; window.onmousemove = function () { _this.counter++; - var f = function () { return _this.counter; }; + var f = function () { + return _this.counter; + }; }; } }; diff --git a/tests/baselines/reference/separate1-2.js b/tests/baselines/reference/separate1-2.js index 6ef155ca0f4..bda277467e8 100644 --- a/tests/baselines/reference/separate1-2.js +++ b/tests/baselines/reference/separate1-2.js @@ -6,6 +6,7 @@ module X { //// [separate1-2.js] var X; (function (X) { - function f() { } + function f() { + } X.f = f; })(X || (X = {})); diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 098a7914a71..3d7e3db7ef1 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -13,7 +13,8 @@ var __extends = this.__extends || function (d, b) { var base = (function () { function base() { } - base.prototype.n = function () { }; + base.prototype.n = function () { + }; return base; })(); var derived = (function (_super) { @@ -21,6 +22,7 @@ var derived = (function (_super) { function derived() { _super.apply(this, arguments); } - derived.prototype.n = function () { }; + derived.prototype.n = function () { + }; return derived; })(base); diff --git a/tests/baselines/reference/shadowedInternalModule.js b/tests/baselines/reference/shadowedInternalModule.js index 3a7c6d4d61a..90bbd023584 100644 --- a/tests/baselines/reference/shadowedInternalModule.js +++ b/tests/baselines/reference/shadowedInternalModule.js @@ -37,11 +37,17 @@ module Z { // all errors imported modules conflict with local variables var A; (function (A) { - A.Point = { x: 0, y: 0 }; + A.Point = { + x: 0, + y: 0 + }; })(A || (A = {})); var B; (function (B) { - var A = { x: 0, y: 0 }; + var A = { + x: 0, + y: 0 + }; })(B || (B = {})); var X; (function (X) { diff --git a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.js b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.js index fbf01bc167a..2cbc58ac19a 100644 --- a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.js +++ b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.js @@ -3,4 +3,10 @@ //// [simpleArrowFunctionParameterReferencedInObjectLiteral1.js] -[].map(function () { return [].map(function (p) { return ({ X: p }); }); }); +[].map(function () { + return [].map(function (p) { + return ({ + X: p + }); + }); +}); diff --git a/tests/baselines/reference/sourceMap-FileWithComments.js b/tests/baselines/reference/sourceMap-FileWithComments.js index e9755f6c048..6143ff95fb8 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.js +++ b/tests/baselines/reference/sourceMap-FileWithComments.js @@ -48,7 +48,9 @@ var Shapes; this.y = y; } // Instance member - Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; + Point.prototype.getDist = function () { + return Math.sqrt(this.x * this.x + this.y * this.y); + }; // Static member Point.origin = new Point(0, 0); return Point; diff --git a/tests/baselines/reference/sourceMap-FileWithComments.js.map b/tests/baselines/reference/sourceMap-FileWithComments.js.map index fc27b8542d0..3da9be212f5 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.js.map +++ b/tests/baselines/reference/sourceMap-FileWithComments.js.map @@ -1,2 +1,2 @@ //// [sourceMap-FileWithComments.js.map] -{"version":3,"file":"sourceMap-FileWithComments.js","sourceRoot":"","sources":["sourceMap-FileWithComments.ts"],"names":["Shapes","Shapes.Point","Shapes.Point.constructor","Shapes.Point.getDist","Shapes.foo"],"mappings":"AAOA,AADA,SAAS;AACT,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM,EAAC,CAAC;IAGXA,AADAA,QAAQA;;QAEJC,cAAcA;QACdA,eAAmBA,CAASA,EAASA,CAASA;YAA3BC,MAACA,GAADA,CAACA,CAAQA;YAASA,MAACA,GAADA,CAACA,CAAQA;QAAIA,CAACA;QAEnDD,kBAAkBA;QAClBA,uBAAOA,GAAPA,cAAYE,MAAMA,CAACA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;QAElEF,gBAAgBA;QACTA,YAAMA,GAAGA,IAAIA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;QACpCA,YAACA;IAADA,CAACA,AATDD,IASCA;IATYA,YAAKA,QASjBA,CAAAA;IAGDA,AADAA,+BAA+BA;QAC3BA,CAACA,GAAGA,EAAEA,CAACA;IAEXA;IACAI,CAACA;IADeJ,UAAGA,MAClBA,CAAAA;IAKDA,AAHAA;;MAEEA;QACEA,CAACA,GAAGA,EAAEA,CAACA;AACfA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ;AAGD,AADA,qBAAqB;IACjB,CAAC,GAAW,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,IAAI,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMap-FileWithComments.js","sourceRoot":"","sources":["sourceMap-FileWithComments.ts"],"names":["Shapes","Shapes.Point","Shapes.Point.constructor","Shapes.Point.getDist","Shapes.foo"],"mappings":"AAOA,AADA,SAAS;AACT,IAAO,MAAM,CAwBZ;AAxBD,WAAO,MAAM,EAAC,CAAC;IAGXA,AADAA,QAAQA;;QAEJC,cAAcA;QACdA,eAAmBA,CAASA,EAASA,CAASA;YAA3BC,MAACA,GAADA,CAACA,CAAQA;YAASA,MAACA,GAADA,CAACA,CAAQA;QAAIA,CAACA;QAEnDD,kBAAkBA;QAClBA,uBAAOA,GAAPA;YAAYE,MAAMA,CAACA,IAAIA,CAACA,IAAIA,CAACA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,GAAGA,IAAIA,CAACA,CAACA,CAACA,CAACA;QAACA,CAACA;QAElEF,gBAAgBA;QACTA,YAAMA,GAAGA,IAAIA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;QACpCA,YAACA;IAADA,CAACA,AATDD,IASCA;IATYA,YAAKA,QASjBA,CAAAA;IAGDA,AADAA,+BAA+BA;QAC3BA,CAACA,GAAGA,EAAEA,CAACA;IAEXA;IACAI,CAACA;IADeJ,UAAGA,MAClBA,CAAAA;IAKDA,AAHAA;;MAEEA;QACEA,CAACA,GAAGA,EAAEA,CAACA;AACfA,CAACA,EAxBM,MAAM,KAAN,MAAM,QAwBZ;AAGD,AADA,qBAAqB;IACjB,CAAC,GAAW,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvC,IAAI,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt b/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt index 8283006042a..be00cb7f263 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt +++ b/tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt @@ -176,7 +176,7 @@ sourceFile:sourceMap-FileWithComments.ts >>> // Instance member 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^-> 1-> > > @@ -184,106 +184,112 @@ sourceFile:sourceMap-FileWithComments.ts 1->Emitted(11, 9) Source(15, 9) + SourceIndex(0) name (Shapes.Point) 2 >Emitted(11, 27) Source(15, 27) + SourceIndex(0) name (Shapes.Point) --- ->>> Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); }; +>>> Point.prototype.getDist = function () { 1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^ -6 > ^ -7 > ^^^^ -8 > ^ -9 > ^^^^ -10> ^ -11> ^^^^ -12> ^ -13> ^ -14> ^^^ -15> ^^^^ -16> ^ -17> ^ -18> ^^^ -19> ^^^^ -20> ^ -21> ^ -22> ^^^ -23> ^^^^ -24> ^ -25> ^ -26> ^ -27> ^ -28> ^ -29> ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > 2 > getDist 3 > -4 > getDist() { -5 > return -6 > -7 > Math -8 > . -9 > sqrt -10> ( -11> this -12> . -13> x -14> * -15> this -16> . -17> x -18> + -19> this -20> . -21> y -22> * -23> this -24> . -25> y -26> ) -27> ; -28> -29> } 1->Emitted(12, 9) Source(16, 9) + SourceIndex(0) name (Shapes.Point) 2 >Emitted(12, 32) Source(16, 16) + SourceIndex(0) name (Shapes.Point) 3 >Emitted(12, 35) Source(16, 9) + SourceIndex(0) name (Shapes.Point) -4 >Emitted(12, 49) Source(16, 21) + SourceIndex(0) name (Shapes.Point.getDist) -5 >Emitted(12, 55) Source(16, 27) + SourceIndex(0) name (Shapes.Point.getDist) -6 >Emitted(12, 56) Source(16, 28) + SourceIndex(0) name (Shapes.Point.getDist) -7 >Emitted(12, 60) Source(16, 32) + SourceIndex(0) name (Shapes.Point.getDist) -8 >Emitted(12, 61) Source(16, 33) + SourceIndex(0) name (Shapes.Point.getDist) -9 >Emitted(12, 65) Source(16, 37) + SourceIndex(0) name (Shapes.Point.getDist) -10>Emitted(12, 66) Source(16, 38) + SourceIndex(0) name (Shapes.Point.getDist) -11>Emitted(12, 70) Source(16, 42) + SourceIndex(0) name (Shapes.Point.getDist) -12>Emitted(12, 71) Source(16, 43) + SourceIndex(0) name (Shapes.Point.getDist) -13>Emitted(12, 72) Source(16, 44) + SourceIndex(0) name (Shapes.Point.getDist) -14>Emitted(12, 75) Source(16, 47) + SourceIndex(0) name (Shapes.Point.getDist) -15>Emitted(12, 79) Source(16, 51) + SourceIndex(0) name (Shapes.Point.getDist) -16>Emitted(12, 80) Source(16, 52) + SourceIndex(0) name (Shapes.Point.getDist) -17>Emitted(12, 81) Source(16, 53) + SourceIndex(0) name (Shapes.Point.getDist) -18>Emitted(12, 84) Source(16, 56) + SourceIndex(0) name (Shapes.Point.getDist) -19>Emitted(12, 88) Source(16, 60) + SourceIndex(0) name (Shapes.Point.getDist) -20>Emitted(12, 89) Source(16, 61) + SourceIndex(0) name (Shapes.Point.getDist) -21>Emitted(12, 90) Source(16, 62) + SourceIndex(0) name (Shapes.Point.getDist) -22>Emitted(12, 93) Source(16, 65) + SourceIndex(0) name (Shapes.Point.getDist) -23>Emitted(12, 97) Source(16, 69) + SourceIndex(0) name (Shapes.Point.getDist) -24>Emitted(12, 98) Source(16, 70) + SourceIndex(0) name (Shapes.Point.getDist) -25>Emitted(12, 99) Source(16, 71) + SourceIndex(0) name (Shapes.Point.getDist) -26>Emitted(12, 100) Source(16, 72) + SourceIndex(0) name (Shapes.Point.getDist) -27>Emitted(12, 101) Source(16, 73) + SourceIndex(0) name (Shapes.Point.getDist) -28>Emitted(12, 102) Source(16, 74) + SourceIndex(0) name (Shapes.Point.getDist) -29>Emitted(12, 103) Source(16, 75) + SourceIndex(0) name (Shapes.Point.getDist) +--- +>>> return Math.sqrt(this.x * this.x + this.y * this.y); +1->^^^^^^^^^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +6 > ^^^^ +7 > ^ +8 > ^^^^ +9 > ^ +10> ^ +11> ^^^ +12> ^^^^ +13> ^ +14> ^ +15> ^^^ +16> ^^^^ +17> ^ +18> ^ +19> ^^^ +20> ^^^^ +21> ^ +22> ^ +23> ^ +24> ^ +1->getDist() { +2 > return +3 > +4 > Math +5 > . +6 > sqrt +7 > ( +8 > this +9 > . +10> x +11> * +12> this +13> . +14> x +15> + +16> this +17> . +18> y +19> * +20> this +21> . +22> y +23> ) +24> ; +1->Emitted(13, 13) Source(16, 21) + SourceIndex(0) name (Shapes.Point.getDist) +2 >Emitted(13, 19) Source(16, 27) + SourceIndex(0) name (Shapes.Point.getDist) +3 >Emitted(13, 20) Source(16, 28) + SourceIndex(0) name (Shapes.Point.getDist) +4 >Emitted(13, 24) Source(16, 32) + SourceIndex(0) name (Shapes.Point.getDist) +5 >Emitted(13, 25) Source(16, 33) + SourceIndex(0) name (Shapes.Point.getDist) +6 >Emitted(13, 29) Source(16, 37) + SourceIndex(0) name (Shapes.Point.getDist) +7 >Emitted(13, 30) Source(16, 38) + SourceIndex(0) name (Shapes.Point.getDist) +8 >Emitted(13, 34) Source(16, 42) + SourceIndex(0) name (Shapes.Point.getDist) +9 >Emitted(13, 35) Source(16, 43) + SourceIndex(0) name (Shapes.Point.getDist) +10>Emitted(13, 36) Source(16, 44) + SourceIndex(0) name (Shapes.Point.getDist) +11>Emitted(13, 39) Source(16, 47) + SourceIndex(0) name (Shapes.Point.getDist) +12>Emitted(13, 43) Source(16, 51) + SourceIndex(0) name (Shapes.Point.getDist) +13>Emitted(13, 44) Source(16, 52) + SourceIndex(0) name (Shapes.Point.getDist) +14>Emitted(13, 45) Source(16, 53) + SourceIndex(0) name (Shapes.Point.getDist) +15>Emitted(13, 48) Source(16, 56) + SourceIndex(0) name (Shapes.Point.getDist) +16>Emitted(13, 52) Source(16, 60) + SourceIndex(0) name (Shapes.Point.getDist) +17>Emitted(13, 53) Source(16, 61) + SourceIndex(0) name (Shapes.Point.getDist) +18>Emitted(13, 54) Source(16, 62) + SourceIndex(0) name (Shapes.Point.getDist) +19>Emitted(13, 57) Source(16, 65) + SourceIndex(0) name (Shapes.Point.getDist) +20>Emitted(13, 61) Source(16, 69) + SourceIndex(0) name (Shapes.Point.getDist) +21>Emitted(13, 62) Source(16, 70) + SourceIndex(0) name (Shapes.Point.getDist) +22>Emitted(13, 63) Source(16, 71) + SourceIndex(0) name (Shapes.Point.getDist) +23>Emitted(13, 64) Source(16, 72) + SourceIndex(0) name (Shapes.Point.getDist) +24>Emitted(13, 65) Source(16, 73) + SourceIndex(0) name (Shapes.Point.getDist) +--- +>>> }; +1 >^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^-> +1 > +2 > } +1 >Emitted(14, 9) Source(16, 74) + SourceIndex(0) name (Shapes.Point.getDist) +2 >Emitted(14, 10) Source(16, 75) + SourceIndex(0) name (Shapes.Point.getDist) --- >>> // Static member -1 >^^^^^^^^ +1->^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^-> -1 > +1-> > > 2 > // Static member -1 >Emitted(13, 9) Source(18, 9) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(13, 25) Source(18, 25) + SourceIndex(0) name (Shapes.Point) +1->Emitted(15, 9) Source(18, 9) + SourceIndex(0) name (Shapes.Point) +2 >Emitted(15, 25) Source(18, 25) + SourceIndex(0) name (Shapes.Point) --- >>> Point.origin = new Point(0, 0); 1->^^^^^^^^ @@ -309,17 +315,17 @@ sourceFile:sourceMap-FileWithComments.ts 9 > 0 10> ) 11> ; -1->Emitted(14, 9) Source(19, 16) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(14, 21) Source(19, 22) + SourceIndex(0) name (Shapes.Point) -3 >Emitted(14, 24) Source(19, 25) + SourceIndex(0) name (Shapes.Point) -4 >Emitted(14, 28) Source(19, 29) + SourceIndex(0) name (Shapes.Point) -5 >Emitted(14, 33) Source(19, 34) + SourceIndex(0) name (Shapes.Point) -6 >Emitted(14, 34) Source(19, 35) + SourceIndex(0) name (Shapes.Point) -7 >Emitted(14, 35) Source(19, 36) + SourceIndex(0) name (Shapes.Point) -8 >Emitted(14, 37) Source(19, 38) + SourceIndex(0) name (Shapes.Point) -9 >Emitted(14, 38) Source(19, 39) + SourceIndex(0) name (Shapes.Point) -10>Emitted(14, 39) Source(19, 40) + SourceIndex(0) name (Shapes.Point) -11>Emitted(14, 40) Source(19, 41) + SourceIndex(0) name (Shapes.Point) +1->Emitted(16, 9) Source(19, 16) + SourceIndex(0) name (Shapes.Point) +2 >Emitted(16, 21) Source(19, 22) + SourceIndex(0) name (Shapes.Point) +3 >Emitted(16, 24) Source(19, 25) + SourceIndex(0) name (Shapes.Point) +4 >Emitted(16, 28) Source(19, 29) + SourceIndex(0) name (Shapes.Point) +5 >Emitted(16, 33) Source(19, 34) + SourceIndex(0) name (Shapes.Point) +6 >Emitted(16, 34) Source(19, 35) + SourceIndex(0) name (Shapes.Point) +7 >Emitted(16, 35) Source(19, 36) + SourceIndex(0) name (Shapes.Point) +8 >Emitted(16, 37) Source(19, 38) + SourceIndex(0) name (Shapes.Point) +9 >Emitted(16, 38) Source(19, 39) + SourceIndex(0) name (Shapes.Point) +10>Emitted(16, 39) Source(19, 40) + SourceIndex(0) name (Shapes.Point) +11>Emitted(16, 40) Source(19, 41) + SourceIndex(0) name (Shapes.Point) --- >>> return Point; 1 >^^^^^^^^ @@ -327,8 +333,8 @@ sourceFile:sourceMap-FileWithComments.ts 1 > > 2 > } -1 >Emitted(15, 9) Source(20, 5) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(15, 21) Source(20, 6) + SourceIndex(0) name (Shapes.Point) +1 >Emitted(17, 9) Source(20, 5) + SourceIndex(0) name (Shapes.Point) +2 >Emitted(17, 21) Source(20, 6) + SourceIndex(0) name (Shapes.Point) --- >>> })(); 1 >^^^^ @@ -349,10 +355,10 @@ sourceFile:sourceMap-FileWithComments.ts > // Static member > static origin = new Point(0, 0); > } -1 >Emitted(16, 5) Source(20, 5) + SourceIndex(0) name (Shapes.Point) -2 >Emitted(16, 6) Source(20, 6) + SourceIndex(0) name (Shapes.Point) -3 >Emitted(16, 6) Source(11, 5) + SourceIndex(0) name (Shapes) -4 >Emitted(16, 10) Source(20, 6) + SourceIndex(0) name (Shapes) +1 >Emitted(18, 5) Source(20, 5) + SourceIndex(0) name (Shapes.Point) +2 >Emitted(18, 6) Source(20, 6) + SourceIndex(0) name (Shapes.Point) +3 >Emitted(18, 6) Source(11, 5) + SourceIndex(0) name (Shapes) +4 >Emitted(18, 10) Source(20, 6) + SourceIndex(0) name (Shapes) --- >>> Shapes.Point = Point; 1->^^^^ @@ -373,10 +379,10 @@ sourceFile:sourceMap-FileWithComments.ts > static origin = new Point(0, 0); > } 4 > -1->Emitted(17, 5) Source(11, 18) + SourceIndex(0) name (Shapes) -2 >Emitted(17, 17) Source(11, 23) + SourceIndex(0) name (Shapes) -3 >Emitted(17, 25) Source(20, 6) + SourceIndex(0) name (Shapes) -4 >Emitted(17, 26) Source(20, 6) + SourceIndex(0) name (Shapes) +1->Emitted(19, 5) Source(11, 18) + SourceIndex(0) name (Shapes) +2 >Emitted(19, 17) Source(11, 23) + SourceIndex(0) name (Shapes) +3 >Emitted(19, 25) Source(20, 6) + SourceIndex(0) name (Shapes) +4 >Emitted(19, 26) Source(20, 6) + SourceIndex(0) name (Shapes) --- >>> // Variable comment after class 1->^^^^ @@ -388,9 +394,9 @@ sourceFile:sourceMap-FileWithComments.ts > 2 > 3 > // Variable comment after class -1->Emitted(18, 5) Source(23, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(18, 5) Source(22, 5) + SourceIndex(0) name (Shapes) -3 >Emitted(18, 36) Source(22, 36) + SourceIndex(0) name (Shapes) +1->Emitted(20, 5) Source(23, 5) + SourceIndex(0) name (Shapes) +2 >Emitted(20, 5) Source(22, 5) + SourceIndex(0) name (Shapes) +3 >Emitted(20, 36) Source(22, 36) + SourceIndex(0) name (Shapes) --- >>> var a = 10; 1 >^^^^^^^^ @@ -405,11 +411,11 @@ sourceFile:sourceMap-FileWithComments.ts 3 > = 4 > 10 5 > ; -1 >Emitted(19, 9) Source(23, 9) + SourceIndex(0) name (Shapes) -2 >Emitted(19, 10) Source(23, 10) + SourceIndex(0) name (Shapes) -3 >Emitted(19, 13) Source(23, 13) + SourceIndex(0) name (Shapes) -4 >Emitted(19, 15) Source(23, 15) + SourceIndex(0) name (Shapes) -5 >Emitted(19, 16) Source(23, 16) + SourceIndex(0) name (Shapes) +1 >Emitted(21, 9) Source(23, 9) + SourceIndex(0) name (Shapes) +2 >Emitted(21, 10) Source(23, 10) + SourceIndex(0) name (Shapes) +3 >Emitted(21, 13) Source(23, 13) + SourceIndex(0) name (Shapes) +4 >Emitted(21, 15) Source(23, 15) + SourceIndex(0) name (Shapes) +5 >Emitted(21, 16) Source(23, 16) + SourceIndex(0) name (Shapes) --- >>> function foo() { 1->^^^^ @@ -417,7 +423,7 @@ sourceFile:sourceMap-FileWithComments.ts 1-> > > -1->Emitted(20, 5) Source(25, 5) + SourceIndex(0) name (Shapes) +1->Emitted(22, 5) Source(25, 5) + SourceIndex(0) name (Shapes) --- >>> } 1->^^^^ @@ -426,8 +432,8 @@ sourceFile:sourceMap-FileWithComments.ts 1->export function foo() { > 2 > } -1->Emitted(21, 5) Source(26, 5) + SourceIndex(0) name (Shapes.foo) -2 >Emitted(21, 6) Source(26, 6) + SourceIndex(0) name (Shapes.foo) +1->Emitted(23, 5) Source(26, 5) + SourceIndex(0) name (Shapes.foo) +2 >Emitted(23, 6) Source(26, 6) + SourceIndex(0) name (Shapes.foo) --- >>> Shapes.foo = foo; 1->^^^^ @@ -440,10 +446,10 @@ sourceFile:sourceMap-FileWithComments.ts 3 > () { > } 4 > -1->Emitted(22, 5) Source(25, 21) + SourceIndex(0) name (Shapes) -2 >Emitted(22, 15) Source(25, 24) + SourceIndex(0) name (Shapes) -3 >Emitted(22, 21) Source(26, 6) + SourceIndex(0) name (Shapes) -4 >Emitted(22, 22) Source(26, 6) + SourceIndex(0) name (Shapes) +1->Emitted(24, 5) Source(25, 21) + SourceIndex(0) name (Shapes) +2 >Emitted(24, 15) Source(25, 24) + SourceIndex(0) name (Shapes) +3 >Emitted(24, 21) Source(26, 6) + SourceIndex(0) name (Shapes) +4 >Emitted(24, 22) Source(26, 6) + SourceIndex(0) name (Shapes) --- >>> /** comment after function 1->^^^^ @@ -456,8 +462,8 @@ sourceFile:sourceMap-FileWithComments.ts > */ > 2 > -1->Emitted(23, 5) Source(31, 5) + SourceIndex(0) name (Shapes) -2 >Emitted(23, 5) Source(28, 5) + SourceIndex(0) name (Shapes) +1->Emitted(25, 5) Source(31, 5) + SourceIndex(0) name (Shapes) +2 >Emitted(25, 5) Source(28, 5) + SourceIndex(0) name (Shapes) --- >>> * this is another comment >>> */ @@ -466,7 +472,7 @@ sourceFile:sourceMap-FileWithComments.ts 1->/** comment after function > * this is another comment > */ -1->Emitted(25, 7) Source(30, 7) + SourceIndex(0) name (Shapes) +1->Emitted(27, 7) Source(30, 7) + SourceIndex(0) name (Shapes) --- >>> var b = 10; 1->^^^^^^^^ @@ -481,11 +487,11 @@ sourceFile:sourceMap-FileWithComments.ts 3 > = 4 > 10 5 > ; -1->Emitted(26, 9) Source(31, 9) + SourceIndex(0) name (Shapes) -2 >Emitted(26, 10) Source(31, 10) + SourceIndex(0) name (Shapes) -3 >Emitted(26, 13) Source(31, 13) + SourceIndex(0) name (Shapes) -4 >Emitted(26, 15) Source(31, 15) + SourceIndex(0) name (Shapes) -5 >Emitted(26, 16) Source(31, 16) + SourceIndex(0) name (Shapes) +1->Emitted(28, 9) Source(31, 9) + SourceIndex(0) name (Shapes) +2 >Emitted(28, 10) Source(31, 10) + SourceIndex(0) name (Shapes) +3 >Emitted(28, 13) Source(31, 13) + SourceIndex(0) name (Shapes) +4 >Emitted(28, 15) Source(31, 15) + SourceIndex(0) name (Shapes) +5 >Emitted(28, 16) Source(31, 16) + SourceIndex(0) name (Shapes) --- >>>})(Shapes || (Shapes = {})); 1-> @@ -527,13 +533,13 @@ sourceFile:sourceMap-FileWithComments.ts > */ > var b = 10; > } -1->Emitted(27, 1) Source(32, 1) + SourceIndex(0) name (Shapes) -2 >Emitted(27, 2) Source(32, 2) + SourceIndex(0) name (Shapes) -3 >Emitted(27, 4) Source(8, 8) + SourceIndex(0) -4 >Emitted(27, 10) Source(8, 14) + SourceIndex(0) -5 >Emitted(27, 15) Source(8, 8) + SourceIndex(0) -6 >Emitted(27, 21) Source(8, 14) + SourceIndex(0) -7 >Emitted(27, 29) Source(32, 2) + SourceIndex(0) +1->Emitted(29, 1) Source(32, 1) + SourceIndex(0) name (Shapes) +2 >Emitted(29, 2) Source(32, 2) + SourceIndex(0) name (Shapes) +3 >Emitted(29, 4) Source(8, 8) + SourceIndex(0) +4 >Emitted(29, 10) Source(8, 14) + SourceIndex(0) +5 >Emitted(29, 15) Source(8, 8) + SourceIndex(0) +6 >Emitted(29, 21) Source(8, 14) + SourceIndex(0) +7 >Emitted(29, 29) Source(32, 2) + SourceIndex(0) --- >>>/** Local Variable */ 1 > @@ -546,9 +552,9 @@ sourceFile:sourceMap-FileWithComments.ts > 2 > 3 >/** Local Variable */ -1 >Emitted(28, 1) Source(35, 1) + SourceIndex(0) -2 >Emitted(28, 1) Source(34, 1) + SourceIndex(0) -3 >Emitted(28, 22) Source(34, 22) + SourceIndex(0) +1 >Emitted(30, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(30, 1) Source(34, 1) + SourceIndex(0) +3 >Emitted(30, 22) Source(34, 22) + SourceIndex(0) --- >>>var p = new Shapes.Point(3, 4); 1->^^^^ @@ -578,19 +584,19 @@ sourceFile:sourceMap-FileWithComments.ts 11> 4 12> ) 13> ; -1->Emitted(29, 5) Source(35, 5) + SourceIndex(0) -2 >Emitted(29, 6) Source(35, 6) + SourceIndex(0) -3 >Emitted(29, 9) Source(35, 17) + SourceIndex(0) -4 >Emitted(29, 13) Source(35, 21) + SourceIndex(0) -5 >Emitted(29, 19) Source(35, 27) + SourceIndex(0) -6 >Emitted(29, 20) Source(35, 28) + SourceIndex(0) -7 >Emitted(29, 25) Source(35, 33) + SourceIndex(0) -8 >Emitted(29, 26) Source(35, 34) + SourceIndex(0) -9 >Emitted(29, 27) Source(35, 35) + SourceIndex(0) -10>Emitted(29, 29) Source(35, 37) + SourceIndex(0) -11>Emitted(29, 30) Source(35, 38) + SourceIndex(0) -12>Emitted(29, 31) Source(35, 39) + SourceIndex(0) -13>Emitted(29, 32) Source(35, 40) + SourceIndex(0) +1->Emitted(31, 5) Source(35, 5) + SourceIndex(0) +2 >Emitted(31, 6) Source(35, 6) + SourceIndex(0) +3 >Emitted(31, 9) Source(35, 17) + SourceIndex(0) +4 >Emitted(31, 13) Source(35, 21) + SourceIndex(0) +5 >Emitted(31, 19) Source(35, 27) + SourceIndex(0) +6 >Emitted(31, 20) Source(35, 28) + SourceIndex(0) +7 >Emitted(31, 25) Source(35, 33) + SourceIndex(0) +8 >Emitted(31, 26) Source(35, 34) + SourceIndex(0) +9 >Emitted(31, 27) Source(35, 35) + SourceIndex(0) +10>Emitted(31, 29) Source(35, 37) + SourceIndex(0) +11>Emitted(31, 30) Source(35, 38) + SourceIndex(0) +12>Emitted(31, 31) Source(35, 39) + SourceIndex(0) +13>Emitted(31, 32) Source(35, 40) + SourceIndex(0) --- >>>var dist = p.getDist(); 1 > @@ -613,14 +619,14 @@ sourceFile:sourceMap-FileWithComments.ts 7 > getDist 8 > () 9 > ; -1 >Emitted(30, 1) Source(36, 1) + SourceIndex(0) -2 >Emitted(30, 5) Source(36, 5) + SourceIndex(0) -3 >Emitted(30, 9) Source(36, 9) + SourceIndex(0) -4 >Emitted(30, 12) Source(36, 12) + SourceIndex(0) -5 >Emitted(30, 13) Source(36, 13) + SourceIndex(0) -6 >Emitted(30, 14) Source(36, 14) + SourceIndex(0) -7 >Emitted(30, 21) Source(36, 21) + SourceIndex(0) -8 >Emitted(30, 23) Source(36, 23) + SourceIndex(0) -9 >Emitted(30, 24) Source(36, 24) + SourceIndex(0) +1 >Emitted(32, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(36, 5) + SourceIndex(0) +3 >Emitted(32, 9) Source(36, 9) + SourceIndex(0) +4 >Emitted(32, 12) Source(36, 12) + SourceIndex(0) +5 >Emitted(32, 13) Source(36, 13) + SourceIndex(0) +6 >Emitted(32, 14) Source(36, 14) + SourceIndex(0) +7 >Emitted(32, 21) Source(36, 21) + SourceIndex(0) +8 >Emitted(32, 23) Source(36, 23) + SourceIndex(0) +9 >Emitted(32, 24) Source(36, 24) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMap-FileWithComments.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js index 486cdd39637..33efe0fabec 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js @@ -9,7 +9,9 @@ var Greeter = (function () { function Greeter() { var _this = this; this.a = 10; - this.returnA = function () { return _this.a; }; + this.returnA = function () { + return _this.a; + }; } return Greeter; })(); diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map index b0325217c7a..d085c2f9cc1 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map] -{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.ts"],"names":["Greeter","Greeter.constructor"],"mappings":"AAAA;IAAAA;QAAAC,iBAGCA;QAFUA,MAACA,GAAGA,EAAEA,CAACA;QACPA,YAAOA,GAAGA,cAAMA,OAAAA,KAAIA,CAACA,CAACA,EAANA,CAAMA,CAACA;IAClCA,CAACA;IAADD,cAACA;AAADA,CAACA,AAHD,IAGC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js","sourceRoot":"","sources":["sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.ts"],"names":["Greeter","Greeter.constructor"],"mappings":"AAAA;IAAAA;QAAAC,iBAGCA;QAFUA,MAACA,GAAGA,EAAEA,CAACA;QACPA,YAAOA,GAAGA;mBAAMA,KAAIA,CAACA,CAACA;QAANA,CAAMA,CAACA;IAClCA,CAACA;IAADD,cAACA;AAADA,CAACA,AAHD,IAGC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt index 555f1c096c2..ff4d526ffcd 100644 --- a/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.sourcemap.txt @@ -37,7 +37,7 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 3 > ^^^ 4 > ^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^-> 1 > 2 > a 3 > = @@ -49,41 +49,43 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 4 >Emitted(4, 20) Source(2, 18) + SourceIndex(0) name (Greeter.constructor) 5 >Emitted(4, 21) Source(2, 19) + SourceIndex(0) name (Greeter.constructor) --- ->>> this.returnA = function () { return _this.a; }; +>>> this.returnA = function () { 1->^^^^^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^^ -6 > ^^^^^ -7 > ^ -8 > ^ -9 > ^^ -10> ^ -11> ^ +4 > ^^^^^-> 1-> > public 2 > returnA 3 > = -4 > () => -5 > -6 > this -7 > . -8 > a -9 > -10> this.a -11> ; 1->Emitted(5, 9) Source(3, 12) + SourceIndex(0) name (Greeter.constructor) 2 >Emitted(5, 21) Source(3, 19) + SourceIndex(0) name (Greeter.constructor) 3 >Emitted(5, 24) Source(3, 22) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(5, 38) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(5, 45) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) -6 >Emitted(5, 50) Source(3, 32) + SourceIndex(0) name (Greeter.constructor) -7 >Emitted(5, 51) Source(3, 33) + SourceIndex(0) name (Greeter.constructor) -8 >Emitted(5, 52) Source(3, 34) + SourceIndex(0) name (Greeter.constructor) -9 >Emitted(5, 54) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) -10>Emitted(5, 55) Source(3, 34) + SourceIndex(0) name (Greeter.constructor) -11>Emitted(5, 56) Source(3, 35) + SourceIndex(0) name (Greeter.constructor) +--- +>>> return _this.a; +1->^^^^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^ +4 > ^ +1->() => +2 > this +3 > . +4 > a +1->Emitted(6, 20) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(6, 25) Source(3, 32) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(6, 26) Source(3, 33) + SourceIndex(0) name (Greeter.constructor) +4 >Emitted(6, 27) Source(3, 34) + SourceIndex(0) name (Greeter.constructor) +--- +>>> }; +1 >^^^^^^^^ +2 > ^ +3 > ^ +1 > +2 > this.a +3 > ; +1 >Emitted(7, 9) Source(3, 28) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(7, 10) Source(3, 34) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(7, 11) Source(3, 35) + SourceIndex(0) name (Greeter.constructor) --- >>> } 1 >^^^^ @@ -92,16 +94,16 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen 1 > > 2 > } -1 >Emitted(6, 5) Source(4, 1) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(6, 6) Source(4, 2) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(8, 5) Source(4, 1) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) name (Greeter.constructor) --- >>> return Greeter; 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(7, 19) Source(4, 2) + SourceIndex(0) name (Greeter) +1->Emitted(9, 5) Source(4, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(9, 19) Source(4, 2) + SourceIndex(0) name (Greeter) --- >>>})(); 1 > @@ -116,9 +118,9 @@ sourceFile:sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatemen > public a = 10; > public returnA = () => this.a; > } -1 >Emitted(8, 1) Source(4, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(8, 2) Source(4, 2) + SourceIndex(0) name (Greeter) -3 >Emitted(8, 2) Source(1, 1) + SourceIndex(0) -4 >Emitted(8, 6) Source(4, 2) + SourceIndex(0) +1 >Emitted(10, 1) Source(4, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(10, 2) Source(4, 2) + SourceIndex(0) name (Greeter) +3 >Emitted(10, 2) Source(1, 1) + SourceIndex(0) +4 >Emitted(10, 6) Source(4, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationClassWithDefaultConstructorAndCapturedThisStatement.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionExpressions.js b/tests/baselines/reference/sourceMapValidationFunctionExpressions.js index f215c5071e4..5aa2c9902ea 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionExpressions.js +++ b/tests/baselines/reference/sourceMapValidationFunctionExpressions.js @@ -14,5 +14,7 @@ var greet = function (greeting) { return greetings; }; greet("Hello"); -var incrGreetings = function () { return greetings++; }; +var incrGreetings = function () { + return greetings++; +}; //# sourceMappingURL=sourceMapValidationFunctionExpressions.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionExpressions.js.map b/tests/baselines/reference/sourceMapValidationFunctionExpressions.js.map index 0ab0bdac146..a55cd03c9ed 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionExpressions.js.map +++ b/tests/baselines/reference/sourceMapValidationFunctionExpressions.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationFunctionExpressions.js.map] -{"version":3,"file":"sourceMapValidationFunctionExpressions.js","sourceRoot":"","sources":["sourceMapValidationFunctionExpressions.ts"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,IAAI,KAAK,GAAG,UAAC,QAAgB;IACzB,SAAS,EAAE,CAAC;IACZ,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC,CAAA;AACD,KAAK,CAAC,OAAO,CAAC,CAAC;AACf,IAAI,aAAa,GAAG,cAAM,OAAA,SAAS,EAAE,EAAX,CAAW,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationFunctionExpressions.js","sourceRoot":"","sources":["sourceMapValidationFunctionExpressions.ts"],"names":[],"mappings":"AAAA,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,IAAI,KAAK,GAAG,UAAC,QAAgB;IACzB,SAAS,EAAE,CAAC;IACZ,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC,CAAA;AACD,KAAK,CAAC,OAAO,CAAC,CAAC;AACf,IAAI,aAAa,GAAG;WAAM,SAAS,EAAE;AAAX,CAAW,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionExpressions.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctionExpressions.sourcemap.txt index 722afe1f9d9..d745903dafa 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionExpressions.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctionExpressions.sourcemap.txt @@ -104,7 +104,7 @@ sourceFile:sourceMapValidationFunctionExpressions.ts 4 > ^^^^^^^ 5 > ^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^^^^^-> 1-> > 2 >greet @@ -119,41 +119,43 @@ sourceFile:sourceMapValidationFunctionExpressions.ts 5 >Emitted(6, 15) Source(6, 15) + SourceIndex(0) 6 >Emitted(6, 16) Source(6, 16) + SourceIndex(0) --- ->>>var incrGreetings = function () { return greetings++; }; +>>>var incrGreetings = function () { 1-> 2 >^^^^ 3 > ^^^^^^^^^^^^^ 4 > ^^^ -5 > ^^^^^^^^^^^^^^ -6 > ^^^^^^^ -7 > ^^^^^^^^^ -8 > ^^ -9 > ^^ -10> ^ -11> ^ -12> ^^^^^^^^^-> +5 > ^^^^-> 1-> > 2 >var 3 > incrGreetings 4 > = -5 > () => -6 > -7 > greetings -8 > ++ -9 > -10> greetings++ -11> ; 1->Emitted(7, 1) Source(7, 1) + SourceIndex(0) 2 >Emitted(7, 5) Source(7, 5) + SourceIndex(0) 3 >Emitted(7, 18) Source(7, 18) + SourceIndex(0) 4 >Emitted(7, 21) Source(7, 21) + SourceIndex(0) -5 >Emitted(7, 35) Source(7, 27) + SourceIndex(0) -6 >Emitted(7, 42) Source(7, 27) + SourceIndex(0) -7 >Emitted(7, 51) Source(7, 36) + SourceIndex(0) -8 >Emitted(7, 53) Source(7, 38) + SourceIndex(0) -9 >Emitted(7, 55) Source(7, 27) + SourceIndex(0) -10>Emitted(7, 56) Source(7, 38) + SourceIndex(0) -11>Emitted(7, 57) Source(7, 39) + SourceIndex(0) +--- +>>> return greetings++; +1->^^^^^^^^^^^ +2 > ^^^^^^^^^ +3 > ^^ +1->() => +2 > greetings +3 > ++ +1->Emitted(8, 12) Source(7, 27) + SourceIndex(0) +2 >Emitted(8, 21) Source(7, 36) + SourceIndex(0) +3 >Emitted(8, 23) Source(7, 38) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >greetings++ +3 > ; +1 >Emitted(9, 1) Source(7, 27) + SourceIndex(0) +2 >Emitted(9, 2) Source(7, 38) + SourceIndex(0) +3 >Emitted(9, 3) Source(7, 39) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationFunctionExpressions.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js index 289d29d02bd..be4c5bbf083 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js @@ -2,5 +2,8 @@ var x = { n() { } }; //// [sourceMapValidationFunctionPropertyAssignment.js] -var x = { n: function () { } }; +var x = { + n: function () { + } +}; //# sourceMappingURL=sourceMapValidationFunctionPropertyAssignment.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map index 81066a66bad..9ff69d21921 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationFunctionPropertyAssignment.js.map] -{"version":3,"file":"sourceMapValidationFunctionPropertyAssignment.js","sourceRoot":"","sources":["sourceMapValidationFunctionPropertyAssignment.ts"],"names":["n"],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAKA,CAACA,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationFunctionPropertyAssignment.js","sourceRoot":"","sources":["sourceMapValidationFunctionPropertyAssignment.ts"],"names":["n"],"mappings":"AAAA,IAAI,CAAC,GAAG;IAAE,CAAC;IAAKA,CAACA;CAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt index 52a8bfe688c..3595fcebf3c 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt @@ -8,37 +8,45 @@ sources: sourceMapValidationFunctionPropertyAssignment.ts emittedFile:tests/cases/compiler/sourceMapValidationFunctionPropertyAssignment.js sourceFile:sourceMapValidationFunctionPropertyAssignment.ts ------------------------------------------------------------------- ->>>var x = { n: function () { } }; +>>>var x = { 1 > 2 >^^^^ 3 > ^ 4 > ^^^ -5 > ^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^^^-> 1 > 2 >var 3 > x 4 > = -5 > { -6 > n -7 > () { -8 > } -9 > } -10> ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) 3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) 4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) -5 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) -6 >Emitted(1, 12) Source(1, 12) + SourceIndex(0) -7 >Emitted(1, 28) Source(1, 17) + SourceIndex(0) name (n) -8 >Emitted(1, 29) Source(1, 18) + SourceIndex(0) name (n) -9 >Emitted(1, 31) Source(1, 20) + SourceIndex(0) -10>Emitted(1, 32) Source(1, 21) + SourceIndex(0) +--- +>>> n: function () { +1->^^^^ +2 > ^ +3 > ^-> +1->{ +2 > n +1->Emitted(2, 5) Source(1, 11) + SourceIndex(0) +2 >Emitted(2, 6) Source(1, 12) + SourceIndex(0) +--- +>>> } +1->^^^^ +2 > ^ +1->() { +2 > } +1->Emitted(3, 5) Source(1, 17) + SourceIndex(0) name (n) +2 >Emitted(3, 6) Source(1, 18) + SourceIndex(0) name (n) +--- +>>>}; +1 >^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > } +2 > ; +1 >Emitted(4, 2) Source(1, 20) + SourceIndex(0) +2 >Emitted(4, 3) Source(1, 21) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationFunctionPropertyAssignment.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationStatements.js b/tests/baselines/reference/sourceMapValidationStatements.js index 8a4b565e9b0..85a4dc33889 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.js +++ b/tests/baselines/reference/sourceMapValidationStatements.js @@ -136,19 +136,22 @@ function f() { z = 10; } switch (obj.z) { - case 0: { - x++; - break; - } - case 1: { - x--; - break; - } - default: { - x *= 2; - x = 50; - break; - } + case 0: + { + x++; + break; + } + case 1: + { + x--; + break; + } + default: + { + x *= 2; + x = 50; + break; + } } while (x < 10) { x++; diff --git a/tests/baselines/reference/sourceMapValidationStatements.js.map b/tests/baselines/reference/sourceMapValidationStatements.js.map index a1ea3b1db79..63731751060 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.js.map +++ b/tests/baselines/reference/sourceMapValidationStatements.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationStatements.js.map] -{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":["f"],"mappings":"AAAA;IACIA,IAAIA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,EAAEA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QAC1BA,CAACA,IAAIA,CAACA,CAACA;QACPA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IACDA,EAAEA,CAACA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;QACTA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IAACA,IAAIA,CAACA,CAACA;QACJA,CAACA,IAAIA,EAAEA,CAACA;QACRA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,IAAIA,CAACA,GAAGA;QACJA,CAACA;QACDA,CAACA;QACDA,CAACA;KACJA,CAACA;IACFA,IAAIA,GAAGA,GAAGA;QACNA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,OAAOA;KACbA,CAACA;IACFA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACdA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACbA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;IACDA,IAAIA,CAACA;QACDA,GAAGA,CAACA,CAACA,GAAGA,MAAMA,CAACA;IACnBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;QACTA,EAAEA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;YACbA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA;QACfA,CAACA;QAACA,IAAIA,CAACA,CAACA;YACJA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA;QAClBA,CAACA;IACLA,CAACA;IACDA,IAAIA,CAACA;QACDA,MAAMA,IAAIA,KAAKA,EAAEA,CAACA;IACtBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;QACVA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;YAASA,CAACA;QACPA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,GAAGA,EAAEA,CAACA;QACRA,CAACA,GAAGA,CAACA,CAACA;QACNA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACZA,KAAKA,CAACA,EAAEA,CAACA;YACLA,CAACA,EAAEA,CAACA;YACJA,KAAKA,CAACA;QAEVA,CAACA;QACDA,KAAKA,CAACA,EAAEA,CAACA;YACLA,CAACA,EAAEA,CAACA;YACJA,KAAKA,CAACA;QAEVA,CAACA;QACDA,SAASA,CAACA;YACNA,CAACA,IAAIA,CAACA,CAACA;YACPA,CAACA,GAAGA,EAAEA,CAACA;YACPA,KAAKA,CAACA;QAEVA,CAACA;IACLA,CAACA;IACDA,OAAOA,CAACA,GAAGA,EAAEA,EAAEA,CAACA;QACZA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,GAAGA,CAACA;QACAA,CAACA,EAAEA,CAACA;IACRA,CAACA,QAAQA,CAACA,GAAGA,CAACA,EAACA;IACfA,CAACA,GAAGA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACjCA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACzBA,CAACA,KAAKA,CAACA,CAACA;IACRA,CAACA,GAAGA,CAACA,GAAGA,EAAEA,CAACA;IACXA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,MAAMA,CAACA;AACXA,CAACA;AACD,IAAI,CAAC,GAAG;IACJ,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":["f"],"mappings":"AAAA;IACIA,IAAIA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,CAACA,EAAEA,CAACA,GAAGA,EAAEA,EAAEA,CAACA,EAAEA,EAAEA,CAACA;QAC1BA,CAACA,IAAIA,CAACA,CAACA;QACPA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IACDA,EAAEA,CAACA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;QACTA,CAACA,IAAIA,CAACA,CAACA;IACXA,CAACA;IAACA,IAAIA,CAACA,CAACA;QACJA,CAACA,IAAIA,EAAEA,CAACA;QACRA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,IAAIA,CAACA,GAAGA;QACJA,CAACA;QACDA,CAACA;QACDA,CAACA;KACJA,CAACA;IACFA,IAAIA,GAAGA,GAAGA;QACNA,CAACA,EAAEA,CAACA;QACJA,CAACA,EAAEA,OAAOA;KACbA,CAACA;IACFA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,CAACA,CAACA;QACdA,GAAGA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACbA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;IACDA,IAAIA,CAACA;QACDA,GAAGA,CAACA,CAACA,GAAGA,MAAMA,CAACA;IACnBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,CAACA,CAACA,CAACA,CAACA;QACTA,EAAEA,CAACA,CAACA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA,CAACA,CAACA;YACbA,GAAGA,CAACA,CAACA,GAAGA,EAAEA,CAACA;QACfA,CAACA;QAACA,IAAIA,CAACA,CAACA;YACJA,GAAGA,CAACA,CAACA,GAAGA,KAAKA,CAACA;QAClBA,CAACA;IACLA,CAACA;IACDA,IAAIA,CAACA;QACDA,MAAMA,IAAIA,KAAKA,EAAEA,CAACA;IACtBA,CAAEA;IAAAA,KAAKA,CAACA,CAACA,EAAEA,CAACA,CAACA,CAACA;QACVA,IAAIA,CAACA,GAAGA,EAAEA,CAACA;IACfA,CAACA;YAASA,CAACA;QACPA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,GAAGA,EAAEA,CAACA;QACRA,CAACA,GAAGA,CAACA,CAACA;QACNA,CAACA,GAAGA,EAAEA,CAACA;IACXA,CAACA;IACDA,MAAMA,CAACA,CAACA,GAAGA,CAACA,CAACA,CAACA,CAACA,CAACA;QACZA,KAAKA,CAACA;YAAEA,CAACA;gBACLA,CAACA,EAAEA,CAACA;gBACJA,KAAKA,CAACA;YAEVA,CAACA;QACDA,KAAKA,CAACA;YAAEA,CAACA;gBACLA,CAACA,EAAEA,CAACA;gBACJA,KAAKA,CAACA;YAEVA,CAACA;QACDA;YAASA,CAACA;gBACNA,CAACA,IAAIA,CAACA,CAACA;gBACPA,CAACA,GAAGA,EAAEA,CAACA;gBACPA,KAAKA,CAACA;YAEVA,CAACA;IACLA,CAACA;IACDA,OAAOA,CAACA,GAAGA,EAAEA,EAAEA,CAACA;QACZA,CAACA,EAAEA,CAACA;IACRA,CAACA;IACDA,GAAGA,CAACA;QACAA,CAACA,EAAEA,CAACA;IACRA,CAACA,QAAQA,CAACA,GAAGA,CAACA,EAACA;IACfA,CAACA,GAAGA,CAACA,CAACA;IACNA,IAAIA,CAACA,GAAGA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACjCA,CAACA,CAACA,IAAIA,CAACA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,GAAGA,CAACA,CAACA;IACzBA,CAACA,KAAKA,CAACA,CAACA;IACRA,CAACA,GAAGA,CAACA,GAAGA,EAAEA,CAACA;IACXA,IAAIA,CAACA,GAAGA,CAACA,CAACA;IACVA,MAAMA,CAACA;AACXA,CAACA;AACD,IAAI,CAAC,GAAG;IACJ,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt index 2a2daed01db..789d98afe5a 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt @@ -930,191 +930,200 @@ sourceFile:sourceMapValidationStatements.ts 9 >Emitted(52, 20) Source(47, 20) + SourceIndex(0) name (f) 10>Emitted(52, 21) Source(47, 21) + SourceIndex(0) name (f) --- ->>> case 0: { +>>> case 0: 1 >^^^^^^^^ 2 > ^^^^^ 3 > ^ -4 > ^^ -5 > ^ 1 > > 2 > case 3 > 0 -4 > : -5 > { 1 >Emitted(53, 9) Source(48, 9) + SourceIndex(0) name (f) 2 >Emitted(53, 14) Source(48, 14) + SourceIndex(0) name (f) 3 >Emitted(53, 15) Source(48, 15) + SourceIndex(0) name (f) -4 >Emitted(53, 17) Source(48, 17) + SourceIndex(0) name (f) -5 >Emitted(53, 18) Source(48, 18) + SourceIndex(0) name (f) --- ->>> x++; +>>> { 1 >^^^^^^^^^^^^ 2 > ^ -3 > ^^ -4 > ^ -5 > ^^^-> -1 > - > -2 > x -3 > ++ -4 > ; -1 >Emitted(54, 13) Source(49, 13) + SourceIndex(0) name (f) -2 >Emitted(54, 14) Source(49, 14) + SourceIndex(0) name (f) -3 >Emitted(54, 16) Source(49, 16) + SourceIndex(0) name (f) -4 >Emitted(54, 17) Source(49, 17) + SourceIndex(0) name (f) +3 > ^^^^^^^^-> +1 >: +2 > { +1 >Emitted(54, 13) Source(48, 17) + SourceIndex(0) name (f) +2 >Emitted(54, 14) Source(48, 18) + SourceIndex(0) name (f) --- ->>> break; -1->^^^^^^^^^^^^ -2 > ^^^^^ -3 > ^ +>>> x++; +1->^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^^^-> 1-> > -2 > break -3 > ; -1->Emitted(55, 13) Source(50, 13) + SourceIndex(0) name (f) -2 >Emitted(55, 18) Source(50, 18) + SourceIndex(0) name (f) -3 >Emitted(55, 19) Source(50, 19) + SourceIndex(0) name (f) +2 > x +3 > ++ +4 > ; +1->Emitted(55, 17) Source(49, 13) + SourceIndex(0) name (f) +2 >Emitted(55, 18) Source(49, 14) + SourceIndex(0) name (f) +3 >Emitted(55, 20) Source(49, 16) + SourceIndex(0) name (f) +4 >Emitted(55, 21) Source(49, 17) + SourceIndex(0) name (f) --- ->>> } -1 >^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^-> +>>> break; +1->^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^ +1-> + > +2 > break +3 > ; +1->Emitted(56, 17) Source(50, 13) + SourceIndex(0) name (f) +2 >Emitted(56, 22) Source(50, 18) + SourceIndex(0) name (f) +3 >Emitted(56, 23) Source(50, 19) + SourceIndex(0) name (f) +--- +>>> } +1 >^^^^^^^^^^^^ +2 > ^ +3 > ^^^-> 1 > > > -2 > } -1 >Emitted(56, 9) Source(52, 9) + SourceIndex(0) name (f) -2 >Emitted(56, 10) Source(52, 10) + SourceIndex(0) name (f) +2 > } +1 >Emitted(57, 13) Source(52, 9) + SourceIndex(0) name (f) +2 >Emitted(57, 14) Source(52, 10) + SourceIndex(0) name (f) --- ->>> case 1: { +>>> case 1: 1->^^^^^^^^ 2 > ^^^^^ 3 > ^ -4 > ^^ -5 > ^ 1-> > 2 > case 3 > 1 -4 > : -5 > { -1->Emitted(57, 9) Source(53, 9) + SourceIndex(0) name (f) -2 >Emitted(57, 14) Source(53, 14) + SourceIndex(0) name (f) -3 >Emitted(57, 15) Source(53, 15) + SourceIndex(0) name (f) -4 >Emitted(57, 17) Source(53, 17) + SourceIndex(0) name (f) -5 >Emitted(57, 18) Source(53, 18) + SourceIndex(0) name (f) +1->Emitted(58, 9) Source(53, 9) + SourceIndex(0) name (f) +2 >Emitted(58, 14) Source(53, 14) + SourceIndex(0) name (f) +3 >Emitted(58, 15) Source(53, 15) + SourceIndex(0) name (f) --- ->>> x--; +>>> { 1 >^^^^^^^^^^^^ 2 > ^ -3 > ^^ -4 > ^ -5 > ^^^-> -1 > - > -2 > x -3 > -- -4 > ; -1 >Emitted(58, 13) Source(54, 13) + SourceIndex(0) name (f) -2 >Emitted(58, 14) Source(54, 14) + SourceIndex(0) name (f) -3 >Emitted(58, 16) Source(54, 16) + SourceIndex(0) name (f) -4 >Emitted(58, 17) Source(54, 17) + SourceIndex(0) name (f) +3 > ^^^^^^^^-> +1 >: +2 > { +1 >Emitted(59, 13) Source(53, 17) + SourceIndex(0) name (f) +2 >Emitted(59, 14) Source(53, 18) + SourceIndex(0) name (f) --- ->>> break; -1->^^^^^^^^^^^^ -2 > ^^^^^ -3 > ^ +>>> x--; +1->^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^^^-> 1-> > -2 > break -3 > ; -1->Emitted(59, 13) Source(55, 13) + SourceIndex(0) name (f) -2 >Emitted(59, 18) Source(55, 18) + SourceIndex(0) name (f) -3 >Emitted(59, 19) Source(55, 19) + SourceIndex(0) name (f) +2 > x +3 > -- +4 > ; +1->Emitted(60, 17) Source(54, 13) + SourceIndex(0) name (f) +2 >Emitted(60, 18) Source(54, 14) + SourceIndex(0) name (f) +3 >Emitted(60, 20) Source(54, 16) + SourceIndex(0) name (f) +4 >Emitted(60, 21) Source(54, 17) + SourceIndex(0) name (f) --- ->>> } -1 >^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^^-> +>>> break; +1->^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^ +1-> + > +2 > break +3 > ; +1->Emitted(61, 17) Source(55, 13) + SourceIndex(0) name (f) +2 >Emitted(61, 22) Source(55, 18) + SourceIndex(0) name (f) +3 >Emitted(61, 23) Source(55, 19) + SourceIndex(0) name (f) +--- +>>> } +1 >^^^^^^^^^^^^ +2 > ^ +3 > ^^^^-> 1 > > > -2 > } -1 >Emitted(60, 9) Source(57, 9) + SourceIndex(0) name (f) -2 >Emitted(60, 10) Source(57, 10) + SourceIndex(0) name (f) +2 > } +1 >Emitted(62, 13) Source(57, 9) + SourceIndex(0) name (f) +2 >Emitted(62, 14) Source(57, 10) + SourceIndex(0) name (f) --- ->>> default: { +>>> default: 1->^^^^^^^^ -2 > ^^^^^^^^^ -3 > ^ -4 > ^^-> +2 > ^^^^^^-> 1-> > -2 > default: -3 > { -1->Emitted(61, 9) Source(58, 9) + SourceIndex(0) name (f) -2 >Emitted(61, 18) Source(58, 18) + SourceIndex(0) name (f) -3 >Emitted(61, 19) Source(58, 19) + SourceIndex(0) name (f) +1->Emitted(63, 9) Source(58, 9) + SourceIndex(0) name (f) --- ->>> x *= 2; +>>> { 1->^^^^^^^^^^^^ 2 > ^ -3 > ^^^^ -4 > ^ -5 > ^ -6 > ^-> +3 > ^^^^^^^^^^^-> +1->default: +2 > { +1->Emitted(64, 13) Source(58, 18) + SourceIndex(0) name (f) +2 >Emitted(64, 14) Source(58, 19) + SourceIndex(0) name (f) +--- +>>> x *= 2; +1->^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^ +4 > ^ +5 > ^ +6 > ^-> 1-> > -2 > x -3 > *= -4 > 2 -5 > ; -1->Emitted(62, 13) Source(59, 13) + SourceIndex(0) name (f) -2 >Emitted(62, 14) Source(59, 14) + SourceIndex(0) name (f) -3 >Emitted(62, 18) Source(59, 18) + SourceIndex(0) name (f) -4 >Emitted(62, 19) Source(59, 19) + SourceIndex(0) name (f) -5 >Emitted(62, 20) Source(59, 20) + SourceIndex(0) name (f) +2 > x +3 > *= +4 > 2 +5 > ; +1->Emitted(65, 17) Source(59, 13) + SourceIndex(0) name (f) +2 >Emitted(65, 18) Source(59, 14) + SourceIndex(0) name (f) +3 >Emitted(65, 22) Source(59, 18) + SourceIndex(0) name (f) +4 >Emitted(65, 23) Source(59, 19) + SourceIndex(0) name (f) +5 >Emitted(65, 24) Source(59, 20) + SourceIndex(0) name (f) --- ->>> x = 50; -1->^^^^^^^^^^^^ -2 > ^ -3 > ^^^ -4 > ^^ -5 > ^ +>>> x = 50; +1->^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^ +4 > ^^ +5 > ^ 1-> > -2 > x -3 > = -4 > 50 -5 > ; -1->Emitted(63, 13) Source(60, 13) + SourceIndex(0) name (f) -2 >Emitted(63, 14) Source(60, 14) + SourceIndex(0) name (f) -3 >Emitted(63, 17) Source(60, 17) + SourceIndex(0) name (f) -4 >Emitted(63, 19) Source(60, 19) + SourceIndex(0) name (f) -5 >Emitted(63, 20) Source(60, 20) + SourceIndex(0) name (f) +2 > x +3 > = +4 > 50 +5 > ; +1->Emitted(66, 17) Source(60, 13) + SourceIndex(0) name (f) +2 >Emitted(66, 18) Source(60, 14) + SourceIndex(0) name (f) +3 >Emitted(66, 21) Source(60, 17) + SourceIndex(0) name (f) +4 >Emitted(66, 23) Source(60, 19) + SourceIndex(0) name (f) +5 >Emitted(66, 24) Source(60, 20) + SourceIndex(0) name (f) --- ->>> break; -1 >^^^^^^^^^^^^ -2 > ^^^^^ -3 > ^ +>>> break; +1 >^^^^^^^^^^^^^^^^ +2 > ^^^^^ +3 > ^ 1 > > -2 > break -3 > ; -1 >Emitted(64, 13) Source(61, 13) + SourceIndex(0) name (f) -2 >Emitted(64, 18) Source(61, 18) + SourceIndex(0) name (f) -3 >Emitted(64, 19) Source(61, 19) + SourceIndex(0) name (f) +2 > break +3 > ; +1 >Emitted(67, 17) Source(61, 13) + SourceIndex(0) name (f) +2 >Emitted(67, 22) Source(61, 18) + SourceIndex(0) name (f) +3 >Emitted(67, 23) Source(61, 19) + SourceIndex(0) name (f) --- ->>> } -1 >^^^^^^^^ -2 > ^ +>>> } +1 >^^^^^^^^^^^^ +2 > ^ 1 > > > -2 > } -1 >Emitted(65, 9) Source(63, 9) + SourceIndex(0) name (f) -2 >Emitted(65, 10) Source(63, 10) + SourceIndex(0) name (f) +2 > } +1 >Emitted(68, 13) Source(63, 9) + SourceIndex(0) name (f) +2 >Emitted(68, 14) Source(63, 10) + SourceIndex(0) name (f) --- >>> } 1 >^^^^ @@ -1123,8 +1132,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(66, 5) Source(64, 5) + SourceIndex(0) name (f) -2 >Emitted(66, 6) Source(64, 6) + SourceIndex(0) name (f) +1 >Emitted(69, 5) Source(64, 5) + SourceIndex(0) name (f) +2 >Emitted(69, 6) Source(64, 6) + SourceIndex(0) name (f) --- >>> while (x < 10) { 1->^^^^ @@ -1142,13 +1151,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > 10 6 > ) 7 > { -1->Emitted(67, 5) Source(65, 5) + SourceIndex(0) name (f) -2 >Emitted(67, 12) Source(65, 12) + SourceIndex(0) name (f) -3 >Emitted(67, 13) Source(65, 13) + SourceIndex(0) name (f) -4 >Emitted(67, 16) Source(65, 16) + SourceIndex(0) name (f) -5 >Emitted(67, 18) Source(65, 18) + SourceIndex(0) name (f) -6 >Emitted(67, 20) Source(65, 20) + SourceIndex(0) name (f) -7 >Emitted(67, 21) Source(65, 21) + SourceIndex(0) name (f) +1->Emitted(70, 5) Source(65, 5) + SourceIndex(0) name (f) +2 >Emitted(70, 12) Source(65, 12) + SourceIndex(0) name (f) +3 >Emitted(70, 13) Source(65, 13) + SourceIndex(0) name (f) +4 >Emitted(70, 16) Source(65, 16) + SourceIndex(0) name (f) +5 >Emitted(70, 18) Source(65, 18) + SourceIndex(0) name (f) +6 >Emitted(70, 20) Source(65, 20) + SourceIndex(0) name (f) +7 >Emitted(70, 21) Source(65, 21) + SourceIndex(0) name (f) --- >>> x++; 1 >^^^^^^^^ @@ -1160,10 +1169,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > x 3 > ++ 4 > ; -1 >Emitted(68, 9) Source(66, 9) + SourceIndex(0) name (f) -2 >Emitted(68, 10) Source(66, 10) + SourceIndex(0) name (f) -3 >Emitted(68, 12) Source(66, 12) + SourceIndex(0) name (f) -4 >Emitted(68, 13) Source(66, 13) + SourceIndex(0) name (f) +1 >Emitted(71, 9) Source(66, 9) + SourceIndex(0) name (f) +2 >Emitted(71, 10) Source(66, 10) + SourceIndex(0) name (f) +3 >Emitted(71, 12) Source(66, 12) + SourceIndex(0) name (f) +4 >Emitted(71, 13) Source(66, 13) + SourceIndex(0) name (f) --- >>> } 1 >^^^^ @@ -1172,8 +1181,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 > } -1 >Emitted(69, 5) Source(67, 5) + SourceIndex(0) name (f) -2 >Emitted(69, 6) Source(67, 6) + SourceIndex(0) name (f) +1 >Emitted(72, 5) Source(67, 5) + SourceIndex(0) name (f) +2 >Emitted(72, 6) Source(67, 6) + SourceIndex(0) name (f) --- >>> do { 1->^^^^ @@ -1184,9 +1193,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > do 3 > { -1->Emitted(70, 5) Source(68, 5) + SourceIndex(0) name (f) -2 >Emitted(70, 8) Source(68, 8) + SourceIndex(0) name (f) -3 >Emitted(70, 9) Source(68, 9) + SourceIndex(0) name (f) +1->Emitted(73, 5) Source(68, 5) + SourceIndex(0) name (f) +2 >Emitted(73, 8) Source(68, 8) + SourceIndex(0) name (f) +3 >Emitted(73, 9) Source(68, 9) + SourceIndex(0) name (f) --- >>> x--; 1->^^^^^^^^ @@ -1199,10 +1208,10 @@ sourceFile:sourceMapValidationStatements.ts 2 > x 3 > -- 4 > ; -1->Emitted(71, 9) Source(69, 9) + SourceIndex(0) name (f) -2 >Emitted(71, 10) Source(69, 10) + SourceIndex(0) name (f) -3 >Emitted(71, 12) Source(69, 12) + SourceIndex(0) name (f) -4 >Emitted(71, 13) Source(69, 13) + SourceIndex(0) name (f) +1->Emitted(74, 9) Source(69, 9) + SourceIndex(0) name (f) +2 >Emitted(74, 10) Source(69, 10) + SourceIndex(0) name (f) +3 >Emitted(74, 12) Source(69, 12) + SourceIndex(0) name (f) +4 >Emitted(74, 13) Source(69, 13) + SourceIndex(0) name (f) --- >>> } while (x > 4); 1->^^^^ @@ -1220,13 +1229,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > > 6 > 4 7 > ) -1->Emitted(72, 5) Source(70, 5) + SourceIndex(0) name (f) -2 >Emitted(72, 6) Source(70, 6) + SourceIndex(0) name (f) -3 >Emitted(72, 14) Source(70, 14) + SourceIndex(0) name (f) -4 >Emitted(72, 15) Source(70, 15) + SourceIndex(0) name (f) -5 >Emitted(72, 18) Source(70, 18) + SourceIndex(0) name (f) -6 >Emitted(72, 19) Source(70, 19) + SourceIndex(0) name (f) -7 >Emitted(72, 21) Source(70, 20) + SourceIndex(0) name (f) +1->Emitted(75, 5) Source(70, 5) + SourceIndex(0) name (f) +2 >Emitted(75, 6) Source(70, 6) + SourceIndex(0) name (f) +3 >Emitted(75, 14) Source(70, 14) + SourceIndex(0) name (f) +4 >Emitted(75, 15) Source(70, 15) + SourceIndex(0) name (f) +5 >Emitted(75, 18) Source(70, 18) + SourceIndex(0) name (f) +6 >Emitted(75, 19) Source(70, 19) + SourceIndex(0) name (f) +7 >Emitted(75, 21) Source(70, 20) + SourceIndex(0) name (f) --- >>> x = y; 1 >^^^^ @@ -1241,11 +1250,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > = 4 > y 5 > ; -1 >Emitted(73, 5) Source(71, 5) + SourceIndex(0) name (f) -2 >Emitted(73, 6) Source(71, 6) + SourceIndex(0) name (f) -3 >Emitted(73, 9) Source(71, 9) + SourceIndex(0) name (f) -4 >Emitted(73, 10) Source(71, 10) + SourceIndex(0) name (f) -5 >Emitted(73, 11) Source(71, 11) + SourceIndex(0) name (f) +1 >Emitted(76, 5) Source(71, 5) + SourceIndex(0) name (f) +2 >Emitted(76, 6) Source(71, 6) + SourceIndex(0) name (f) +3 >Emitted(76, 9) Source(71, 9) + SourceIndex(0) name (f) +4 >Emitted(76, 10) Source(71, 10) + SourceIndex(0) name (f) +5 >Emitted(76, 11) Source(71, 11) + SourceIndex(0) name (f) --- >>> var z = (x == 1) ? x + 1 : x - 1; 1->^^^^ @@ -1285,24 +1294,24 @@ sourceFile:sourceMapValidationStatements.ts 16> - 17> 1 18> ; -1->Emitted(74, 5) Source(72, 5) + SourceIndex(0) name (f) -2 >Emitted(74, 9) Source(72, 9) + SourceIndex(0) name (f) -3 >Emitted(74, 10) Source(72, 10) + SourceIndex(0) name (f) -4 >Emitted(74, 13) Source(72, 13) + SourceIndex(0) name (f) -5 >Emitted(74, 14) Source(72, 14) + SourceIndex(0) name (f) -6 >Emitted(74, 15) Source(72, 15) + SourceIndex(0) name (f) -7 >Emitted(74, 19) Source(72, 19) + SourceIndex(0) name (f) -8 >Emitted(74, 20) Source(72, 20) + SourceIndex(0) name (f) -9 >Emitted(74, 21) Source(72, 21) + SourceIndex(0) name (f) -10>Emitted(74, 24) Source(72, 24) + SourceIndex(0) name (f) -11>Emitted(74, 25) Source(72, 25) + SourceIndex(0) name (f) -12>Emitted(74, 28) Source(72, 28) + SourceIndex(0) name (f) -13>Emitted(74, 29) Source(72, 29) + SourceIndex(0) name (f) -14>Emitted(74, 32) Source(72, 32) + SourceIndex(0) name (f) -15>Emitted(74, 33) Source(72, 33) + SourceIndex(0) name (f) -16>Emitted(74, 36) Source(72, 36) + SourceIndex(0) name (f) -17>Emitted(74, 37) Source(72, 37) + SourceIndex(0) name (f) -18>Emitted(74, 38) Source(72, 38) + SourceIndex(0) name (f) +1->Emitted(77, 5) Source(72, 5) + SourceIndex(0) name (f) +2 >Emitted(77, 9) Source(72, 9) + SourceIndex(0) name (f) +3 >Emitted(77, 10) Source(72, 10) + SourceIndex(0) name (f) +4 >Emitted(77, 13) Source(72, 13) + SourceIndex(0) name (f) +5 >Emitted(77, 14) Source(72, 14) + SourceIndex(0) name (f) +6 >Emitted(77, 15) Source(72, 15) + SourceIndex(0) name (f) +7 >Emitted(77, 19) Source(72, 19) + SourceIndex(0) name (f) +8 >Emitted(77, 20) Source(72, 20) + SourceIndex(0) name (f) +9 >Emitted(77, 21) Source(72, 21) + SourceIndex(0) name (f) +10>Emitted(77, 24) Source(72, 24) + SourceIndex(0) name (f) +11>Emitted(77, 25) Source(72, 25) + SourceIndex(0) name (f) +12>Emitted(77, 28) Source(72, 28) + SourceIndex(0) name (f) +13>Emitted(77, 29) Source(72, 29) + SourceIndex(0) name (f) +14>Emitted(77, 32) Source(72, 32) + SourceIndex(0) name (f) +15>Emitted(77, 33) Source(72, 33) + SourceIndex(0) name (f) +16>Emitted(77, 36) Source(72, 36) + SourceIndex(0) name (f) +17>Emitted(77, 37) Source(72, 37) + SourceIndex(0) name (f) +18>Emitted(77, 38) Source(72, 38) + SourceIndex(0) name (f) --- >>> (x == 1) ? x + 1 : x - 1; 1 >^^^^ @@ -1336,21 +1345,21 @@ sourceFile:sourceMapValidationStatements.ts 13> - 14> 1 15> ; -1 >Emitted(75, 5) Source(73, 5) + SourceIndex(0) name (f) -2 >Emitted(75, 6) Source(73, 6) + SourceIndex(0) name (f) -3 >Emitted(75, 7) Source(73, 7) + SourceIndex(0) name (f) -4 >Emitted(75, 11) Source(73, 11) + SourceIndex(0) name (f) -5 >Emitted(75, 12) Source(73, 12) + SourceIndex(0) name (f) -6 >Emitted(75, 13) Source(73, 13) + SourceIndex(0) name (f) -7 >Emitted(75, 16) Source(73, 16) + SourceIndex(0) name (f) -8 >Emitted(75, 17) Source(73, 17) + SourceIndex(0) name (f) -9 >Emitted(75, 20) Source(73, 20) + SourceIndex(0) name (f) -10>Emitted(75, 21) Source(73, 21) + SourceIndex(0) name (f) -11>Emitted(75, 24) Source(73, 24) + SourceIndex(0) name (f) -12>Emitted(75, 25) Source(73, 25) + SourceIndex(0) name (f) -13>Emitted(75, 28) Source(73, 28) + SourceIndex(0) name (f) -14>Emitted(75, 29) Source(73, 29) + SourceIndex(0) name (f) -15>Emitted(75, 30) Source(73, 30) + SourceIndex(0) name (f) +1 >Emitted(78, 5) Source(73, 5) + SourceIndex(0) name (f) +2 >Emitted(78, 6) Source(73, 6) + SourceIndex(0) name (f) +3 >Emitted(78, 7) Source(73, 7) + SourceIndex(0) name (f) +4 >Emitted(78, 11) Source(73, 11) + SourceIndex(0) name (f) +5 >Emitted(78, 12) Source(73, 12) + SourceIndex(0) name (f) +6 >Emitted(78, 13) Source(73, 13) + SourceIndex(0) name (f) +7 >Emitted(78, 16) Source(73, 16) + SourceIndex(0) name (f) +8 >Emitted(78, 17) Source(73, 17) + SourceIndex(0) name (f) +9 >Emitted(78, 20) Source(73, 20) + SourceIndex(0) name (f) +10>Emitted(78, 21) Source(73, 21) + SourceIndex(0) name (f) +11>Emitted(78, 24) Source(73, 24) + SourceIndex(0) name (f) +12>Emitted(78, 25) Source(73, 25) + SourceIndex(0) name (f) +13>Emitted(78, 28) Source(73, 28) + SourceIndex(0) name (f) +14>Emitted(78, 29) Source(73, 29) + SourceIndex(0) name (f) +15>Emitted(78, 30) Source(73, 30) + SourceIndex(0) name (f) --- >>> x === 1; 1 >^^^^ @@ -1365,11 +1374,11 @@ sourceFile:sourceMapValidationStatements.ts 3 > === 4 > 1 5 > ; -1 >Emitted(76, 5) Source(74, 5) + SourceIndex(0) name (f) -2 >Emitted(76, 6) Source(74, 6) + SourceIndex(0) name (f) -3 >Emitted(76, 11) Source(74, 11) + SourceIndex(0) name (f) -4 >Emitted(76, 12) Source(74, 12) + SourceIndex(0) name (f) -5 >Emitted(76, 13) Source(74, 13) + SourceIndex(0) name (f) +1 >Emitted(79, 5) Source(74, 5) + SourceIndex(0) name (f) +2 >Emitted(79, 6) Source(74, 6) + SourceIndex(0) name (f) +3 >Emitted(79, 11) Source(74, 11) + SourceIndex(0) name (f) +4 >Emitted(79, 12) Source(74, 12) + SourceIndex(0) name (f) +5 >Emitted(79, 13) Source(74, 13) + SourceIndex(0) name (f) --- >>> x = z = 40; 1->^^^^ @@ -1387,13 +1396,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > = 6 > 40 7 > ; -1->Emitted(77, 5) Source(75, 5) + SourceIndex(0) name (f) -2 >Emitted(77, 6) Source(75, 6) + SourceIndex(0) name (f) -3 >Emitted(77, 9) Source(75, 9) + SourceIndex(0) name (f) -4 >Emitted(77, 10) Source(75, 10) + SourceIndex(0) name (f) -5 >Emitted(77, 13) Source(75, 13) + SourceIndex(0) name (f) -6 >Emitted(77, 15) Source(75, 15) + SourceIndex(0) name (f) -7 >Emitted(77, 16) Source(75, 16) + SourceIndex(0) name (f) +1->Emitted(80, 5) Source(75, 5) + SourceIndex(0) name (f) +2 >Emitted(80, 6) Source(75, 6) + SourceIndex(0) name (f) +3 >Emitted(80, 9) Source(75, 9) + SourceIndex(0) name (f) +4 >Emitted(80, 10) Source(75, 10) + SourceIndex(0) name (f) +5 >Emitted(80, 13) Source(75, 13) + SourceIndex(0) name (f) +6 >Emitted(80, 15) Source(75, 15) + SourceIndex(0) name (f) +7 >Emitted(80, 16) Source(75, 16) + SourceIndex(0) name (f) --- >>> eval("y"); 1 >^^^^ @@ -1409,12 +1418,12 @@ sourceFile:sourceMapValidationStatements.ts 4 > "y" 5 > ) 6 > ; -1 >Emitted(78, 5) Source(76, 5) + SourceIndex(0) name (f) -2 >Emitted(78, 9) Source(76, 9) + SourceIndex(0) name (f) -3 >Emitted(78, 10) Source(76, 10) + SourceIndex(0) name (f) -4 >Emitted(78, 13) Source(76, 13) + SourceIndex(0) name (f) -5 >Emitted(78, 14) Source(76, 14) + SourceIndex(0) name (f) -6 >Emitted(78, 15) Source(76, 15) + SourceIndex(0) name (f) +1 >Emitted(81, 5) Source(76, 5) + SourceIndex(0) name (f) +2 >Emitted(81, 9) Source(76, 9) + SourceIndex(0) name (f) +3 >Emitted(81, 10) Source(76, 10) + SourceIndex(0) name (f) +4 >Emitted(81, 13) Source(76, 13) + SourceIndex(0) name (f) +5 >Emitted(81, 14) Source(76, 14) + SourceIndex(0) name (f) +6 >Emitted(81, 15) Source(76, 15) + SourceIndex(0) name (f) --- >>> return; 1 >^^^^ @@ -1424,9 +1433,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 > return 3 > ; -1 >Emitted(79, 5) Source(77, 5) + SourceIndex(0) name (f) -2 >Emitted(79, 11) Source(77, 11) + SourceIndex(0) name (f) -3 >Emitted(79, 12) Source(77, 12) + SourceIndex(0) name (f) +1 >Emitted(82, 5) Source(77, 5) + SourceIndex(0) name (f) +2 >Emitted(82, 11) Source(77, 11) + SourceIndex(0) name (f) +3 >Emitted(82, 12) Source(77, 12) + SourceIndex(0) name (f) --- >>>} 1 > @@ -1435,8 +1444,8 @@ sourceFile:sourceMapValidationStatements.ts 1 > > 2 >} -1 >Emitted(80, 1) Source(78, 1) + SourceIndex(0) name (f) -2 >Emitted(80, 2) Source(78, 2) + SourceIndex(0) name (f) +1 >Emitted(83, 1) Source(78, 1) + SourceIndex(0) name (f) +2 >Emitted(83, 2) Source(78, 2) + SourceIndex(0) name (f) --- >>>var b = function () { 1-> @@ -1449,10 +1458,10 @@ sourceFile:sourceMapValidationStatements.ts 2 >var 3 > b 4 > = -1->Emitted(81, 1) Source(79, 1) + SourceIndex(0) -2 >Emitted(81, 5) Source(79, 5) + SourceIndex(0) -3 >Emitted(81, 6) Source(79, 6) + SourceIndex(0) -4 >Emitted(81, 9) Source(79, 9) + SourceIndex(0) +1->Emitted(84, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(84, 5) Source(79, 5) + SourceIndex(0) +3 >Emitted(84, 6) Source(79, 6) + SourceIndex(0) +4 >Emitted(84, 9) Source(79, 9) + SourceIndex(0) --- >>> var x = 10; 1->^^^^ @@ -1468,12 +1477,12 @@ sourceFile:sourceMapValidationStatements.ts 4 > = 5 > 10 6 > ; -1->Emitted(82, 5) Source(80, 5) + SourceIndex(0) -2 >Emitted(82, 9) Source(80, 9) + SourceIndex(0) -3 >Emitted(82, 10) Source(80, 10) + SourceIndex(0) -4 >Emitted(82, 13) Source(80, 13) + SourceIndex(0) -5 >Emitted(82, 15) Source(80, 15) + SourceIndex(0) -6 >Emitted(82, 16) Source(80, 16) + SourceIndex(0) +1->Emitted(85, 5) Source(80, 5) + SourceIndex(0) +2 >Emitted(85, 9) Source(80, 9) + SourceIndex(0) +3 >Emitted(85, 10) Source(80, 10) + SourceIndex(0) +4 >Emitted(85, 13) Source(80, 13) + SourceIndex(0) +5 >Emitted(85, 15) Source(80, 15) + SourceIndex(0) +6 >Emitted(85, 16) Source(80, 16) + SourceIndex(0) --- >>> x = x + 1; 1 >^^^^ @@ -1491,13 +1500,13 @@ sourceFile:sourceMapValidationStatements.ts 5 > + 6 > 1 7 > ; -1 >Emitted(83, 5) Source(81, 5) + SourceIndex(0) -2 >Emitted(83, 6) Source(81, 6) + SourceIndex(0) -3 >Emitted(83, 9) Source(81, 9) + SourceIndex(0) -4 >Emitted(83, 10) Source(81, 10) + SourceIndex(0) -5 >Emitted(83, 13) Source(81, 13) + SourceIndex(0) -6 >Emitted(83, 14) Source(81, 14) + SourceIndex(0) -7 >Emitted(83, 15) Source(81, 15) + SourceIndex(0) +1 >Emitted(86, 5) Source(81, 5) + SourceIndex(0) +2 >Emitted(86, 6) Source(81, 6) + SourceIndex(0) +3 >Emitted(86, 9) Source(81, 9) + SourceIndex(0) +4 >Emitted(86, 10) Source(81, 10) + SourceIndex(0) +5 >Emitted(86, 13) Source(81, 13) + SourceIndex(0) +6 >Emitted(86, 14) Source(81, 14) + SourceIndex(0) +7 >Emitted(86, 15) Source(81, 15) + SourceIndex(0) --- >>>}; 1 > @@ -1508,9 +1517,9 @@ sourceFile:sourceMapValidationStatements.ts > 2 >} 3 > ; -1 >Emitted(84, 1) Source(82, 1) + SourceIndex(0) -2 >Emitted(84, 2) Source(82, 2) + SourceIndex(0) -3 >Emitted(84, 3) Source(82, 3) + SourceIndex(0) +1 >Emitted(87, 1) Source(82, 1) + SourceIndex(0) +2 >Emitted(87, 2) Source(82, 2) + SourceIndex(0) +3 >Emitted(87, 3) Source(82, 3) + SourceIndex(0) --- >>>f(); 1-> @@ -1523,9 +1532,9 @@ sourceFile:sourceMapValidationStatements.ts 2 >f 3 > () 4 > ; -1->Emitted(85, 1) Source(83, 1) + SourceIndex(0) -2 >Emitted(85, 2) Source(83, 2) + SourceIndex(0) -3 >Emitted(85, 4) Source(83, 4) + SourceIndex(0) -4 >Emitted(85, 5) Source(83, 5) + SourceIndex(0) +1->Emitted(88, 1) Source(83, 1) + SourceIndex(0) +2 >Emitted(88, 2) Source(83, 2) + SourceIndex(0) +3 >Emitted(88, 4) Source(83, 4) + SourceIndex(0) +4 >Emitted(88, 5) Source(83, 5) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationStatements.js.map \ No newline at end of file diff --git a/tests/baselines/reference/spaceBeforeQuestionMarkInPropertyAssignment.js b/tests/baselines/reference/spaceBeforeQuestionMarkInPropertyAssignment.js index d439cc3b020..87aff29c210 100644 --- a/tests/baselines/reference/spaceBeforeQuestionMarkInPropertyAssignment.js +++ b/tests/baselines/reference/spaceBeforeQuestionMarkInPropertyAssignment.js @@ -2,4 +2,6 @@ var x = {x ?: 1} // should not crash //// [spaceBeforeQuestionMarkInPropertyAssignment.js] -var x = { x: 1 }; // should not crash +var x = { + x: 1 +}; // should not crash diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.js b/tests/baselines/reference/specializationsShouldNotAffectEachOther.js index 3116571166f..d0b84d99009 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.js +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.js @@ -23,9 +23,13 @@ var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); //// [specializationsShouldNotAffectEachOther.js] var series; function foo() { - var seriesExtent = function (series) { return null; }; + var seriesExtent = function (series) { + return null; + }; var series2; series2.map(seriesExtent); return null; } -var keyExtent2 = series.data.map(function (d) { return d; }); +var keyExtent2 = series.data.map(function (d) { + return d; +}); diff --git a/tests/baselines/reference/specializeVarArgs1.js b/tests/baselines/reference/specializeVarArgs1.js index cc09df1daa6..3eac6daa61f 100644 --- a/tests/baselines/reference/specializeVarArgs1.js +++ b/tests/baselines/reference/specializeVarArgs1.js @@ -23,6 +23,8 @@ a.push('Some Value'); //// [specializeVarArgs1.js] -function observableArray() { return null; } +function observableArray() { + return null; +} var a = observableArray(); a.push('Some Value'); diff --git a/tests/baselines/reference/specializedInheritedConstructors1.js b/tests/baselines/reference/specializedInheritedConstructors1.js index 36280f9a44e..4c30628af4f 100644 --- a/tests/baselines/reference/specializedInheritedConstructors1.js +++ b/tests/baselines/reference/specializedInheritedConstructors1.js @@ -41,7 +41,11 @@ var MyView = (function (_super) { } return MyView; })(View); -var m = { model: new Model() }; -var aView = new View({ model: new Model() }); +var m = { + model: new Model() +}; +var aView = new View({ + model: new Model() +}); var aView2 = new View(m); var myView = new MyView(m); // was error diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index f091a39677c..56bf07f6fdf 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -22,7 +22,8 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { }; + Base.prototype.foo = function () { + }; return Base; })(); var Derived1 = (function (_super) { @@ -30,7 +31,8 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { }; + Derived1.prototype.bar = function () { + }; return Derived1; })(Base); function f(tagName) { diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js index 1607f730e42..bf6c73bdf40 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.js @@ -13,5 +13,9 @@ function x3(a, cb) { cb(a); } // both are errors -x3(1, function (x) { return 1; }); -x3(1, function (x) { return 1; }); +x3(1, function (x) { + return 1; +}); +x3(1, function (x) { + return 1; +}); diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js index e5e06d48a8d..eaf0605ef17 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js @@ -69,23 +69,27 @@ var a3: { //// [specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js] // Specialized signatures must be a subtype of a non-specialized signature // All the below should be errors -function foo(x) { } +function foo(x) { +} var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo = function (x) { }; + C2.prototype.foo = function (x) { + }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo = function (x) { }; + C3.prototype.foo = function (x) { + }; return C3; })(); var a; diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js index 17a886a0784..882d0da9124 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js @@ -84,23 +84,27 @@ var a3: { //// [specializedSignatureIsSubtypeOfNonSpecializedSignature.js] // Specialized signatures must be a subtype of a non-specialized signature // All the below should not be errors -function foo(x) { } +function foo(x) { +} var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo = function (x) { }; + C2.prototype.foo = function (x) { + }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo = function (x) { }; + C3.prototype.foo = function (x) { + }; return C3; })(); var a; diff --git a/tests/baselines/reference/staticAndMemberFunctions.js b/tests/baselines/reference/staticAndMemberFunctions.js index 71f146b72f7..0d1d9e81900 100644 --- a/tests/baselines/reference/staticAndMemberFunctions.js +++ b/tests/baselines/reference/staticAndMemberFunctions.js @@ -8,7 +8,9 @@ class T { var T = (function () { function T() { } - T.x = function () { }; - T.prototype.y = function () { }; + T.x = function () { + }; + T.prototype.y = function () { + }; return T; })(); diff --git a/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js b/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js index be667ae1f3b..ccfbcc85602 100644 --- a/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js +++ b/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js @@ -11,7 +11,9 @@ class C { var C = (function () { function C() { } - C.prototype.f = function () { }; - C.f = function () { }; + C.prototype.f = function () { + }; + C.f = function () { + }; return C; })(); diff --git a/tests/baselines/reference/staticClassProps.js b/tests/baselines/reference/staticClassProps.js index aad40e29b76..3dc7dbb67d0 100644 --- a/tests/baselines/reference/staticClassProps.js +++ b/tests/baselines/reference/staticClassProps.js @@ -12,7 +12,8 @@ class C var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; C.z = 1; return C; })(); diff --git a/tests/baselines/reference/staticFactory1.js b/tests/baselines/reference/staticFactory1.js index 529cc230d73..af5780d96cf 100644 --- a/tests/baselines/reference/staticFactory1.js +++ b/tests/baselines/reference/staticFactory1.js @@ -23,7 +23,9 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { return 1; }; + Base.prototype.foo = function () { + return 1; + }; Base.create = function () { return new this(); }; @@ -34,7 +36,9 @@ var Derived = (function (_super) { function Derived() { _super.apply(this, arguments); } - Derived.prototype.foo = function () { return 2; }; + Derived.prototype.foo = function () { + return 2; + }; return Derived; })(Base); var d = Derived.create(); diff --git a/tests/baselines/reference/staticGetterAndSetter.js b/tests/baselines/reference/staticGetterAndSetter.js index 5c61af0b7cc..7c6ef26e739 100644 --- a/tests/baselines/reference/staticGetterAndSetter.js +++ b/tests/baselines/reference/staticGetterAndSetter.js @@ -10,8 +10,11 @@ var Foo = (function () { function Foo() { } Object.defineProperty(Foo, "Foo", { - get: function () { return 0; }, - set: function (n) { }, + get: function () { + return 0; + }, + set: function (n) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index a577bad3a86..dfe39119d32 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -18,7 +18,8 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function doThing(x) { } +function doThing(x) { +} var A = (function () { function A() { this.p = doThing(A); // OK diff --git a/tests/baselines/reference/staticInstanceResolution4.js b/tests/baselines/reference/staticInstanceResolution4.js index c74030d047e..6e81d67dc00 100644 --- a/tests/baselines/reference/staticInstanceResolution4.js +++ b/tests/baselines/reference/staticInstanceResolution4.js @@ -9,7 +9,8 @@ A.foo(); var A = (function () { function A() { } - A.prototype.foo = function () { }; + A.prototype.foo = function () { + }; return A; })(); A.foo(); diff --git a/tests/baselines/reference/staticInstanceResolution5.js b/tests/baselines/reference/staticInstanceResolution5.js index 843b79ec6f1..6ca976ae46a 100644 --- a/tests/baselines/reference/staticInstanceResolution5.js +++ b/tests/baselines/reference/staticInstanceResolution5.js @@ -19,7 +19,10 @@ function z(w3: WinJS) { } //// [staticInstanceResolution5_1.js] define(["require", "exports"], function (require, exports) { // these 3 should be errors - var x = function (w1) { }; - var y = function (w2) { }; - function z(w3) { } + var x = function (w1) { + }; + var y = function (w2) { + }; + function z(w3) { + } }); diff --git a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js index edd657d7da1..df0858edc08 100644 --- a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js +++ b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js @@ -17,12 +17,18 @@ var C = (function () { function C() { } C.foo = function () { - C.foo = function () { }; + C.foo = function () { + }; }; C.bar = function (x) { - C.bar = function () { }; // error - C.bar = function (x) { return x; }; // ok - C.bar = function (x) { return 1; }; // ok + C.bar = function () { + }; // error + C.bar = function (x) { + return x; + }; // ok + C.bar = function (x) { + return 1; + }; // ok return 1; }; return C; diff --git a/tests/baselines/reference/staticMemberExportAccess.js b/tests/baselines/reference/staticMemberExportAccess.js index 37799356708..5de5a76ca7a 100644 --- a/tests/baselines/reference/staticMemberExportAccess.js +++ b/tests/baselines/reference/staticMemberExportAccess.js @@ -24,7 +24,9 @@ Sammy.bar(); var Sammy = (function () { function Sammy() { } - Sammy.prototype.foo = function () { return "hi"; }; + Sammy.prototype.foo = function () { + return "hi"; + }; Sammy.bar = function () { return -1; }; diff --git a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js index 7b24a29b326..23e6fa9dd06 100644 --- a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js +++ b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js @@ -29,13 +29,15 @@ c = a; var B = (function () { function B() { } - B.prototype.name = function () { }; + B.prototype.name = function () { + }; return B; })(); var C = (function () { function C() { } - C.name = function () { }; + C.name = function () { + }; return C; })(); var a = new B(); diff --git a/tests/baselines/reference/staticMembersUsingClassTypeParameter.js b/tests/baselines/reference/staticMembersUsingClassTypeParameter.js index 0c728cdbab6..1c31ef82d91 100644 --- a/tests/baselines/reference/staticMembersUsingClassTypeParameter.js +++ b/tests/baselines/reference/staticMembersUsingClassTypeParameter.js @@ -20,18 +20,21 @@ class C3 { var C = (function () { function C() { } - C.f = function (x) { }; + C.f = function (x) { + }; return C; })(); var C2 = (function () { function C2() { } - C2.f = function (x) { }; + C2.f = function (x) { + }; return C2; })(); var C3 = (function () { function C3() { } - C3.f = function (x) { }; + C3.f = function (x) { + }; return C3; })(); diff --git a/tests/baselines/reference/staticMethodsReferencingClassTypeParameters.js b/tests/baselines/reference/staticMethodsReferencingClassTypeParameters.js index 76fa7d6249e..499e16ec581 100644 --- a/tests/baselines/reference/staticMethodsReferencingClassTypeParameters.js +++ b/tests/baselines/reference/staticMethodsReferencingClassTypeParameters.js @@ -7,6 +7,8 @@ class C { var C = (function () { function C() { } - C.s = function (p) { return p; }; + C.s = function (p) { + return p; + }; return C; })(); diff --git a/tests/baselines/reference/staticModifierAlreadySeen.js b/tests/baselines/reference/staticModifierAlreadySeen.js index d767a9b51d1..b097f3924e4 100644 --- a/tests/baselines/reference/staticModifierAlreadySeen.js +++ b/tests/baselines/reference/staticModifierAlreadySeen.js @@ -8,7 +8,8 @@ class C { var C = (function () { function C() { } - C.bar = function () { }; + C.bar = function () { + }; C.foo = 1; return C; })(); diff --git a/tests/baselines/reference/staticOffOfInstance1.js b/tests/baselines/reference/staticOffOfInstance1.js index 58cf24d0529..41b7cd895bb 100644 --- a/tests/baselines/reference/staticOffOfInstance1.js +++ b/tests/baselines/reference/staticOffOfInstance1.js @@ -13,6 +13,7 @@ var List = (function () { List.prototype.Blah = function () { this.Foo(); }; - List.Foo = function () { }; + List.Foo = function () { + }; return List; })(); diff --git a/tests/baselines/reference/staticOffOfInstance2.js b/tests/baselines/reference/staticOffOfInstance2.js index ceac77419a4..ff139859bf7 100644 --- a/tests/baselines/reference/staticOffOfInstance2.js +++ b/tests/baselines/reference/staticOffOfInstance2.js @@ -16,6 +16,7 @@ var List = (function () { this.Foo(); // no error List.Foo(); }; - List.Foo = function () { }; + List.Foo = function () { + }; return List; })(); diff --git a/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js b/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js index 50252c606f4..0308805cd7b 100644 --- a/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js +++ b/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js @@ -18,6 +18,7 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.f = function () { }; + D.prototype.f = function () { + }; return D; })(); diff --git a/tests/baselines/reference/staticPropertyNotInClassType.js b/tests/baselines/reference/staticPropertyNotInClassType.js index e9df2b2158d..22ff4276deb 100644 --- a/tests/baselines/reference/staticPropertyNotInClassType.js +++ b/tests/baselines/reference/staticPropertyNotInClassType.js @@ -47,10 +47,15 @@ var NonGeneric; this.a = a; this.b = b; } - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; Object.defineProperty(C, "x", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -73,10 +78,15 @@ var Generic; this.a = a; this.b = b; } - C.prototype.fn = function () { return this; }; + C.prototype.fn = function () { + return this; + }; Object.defineProperty(C, "x", { - get: function () { return 1; }, - set: function (v) { }, + get: function () { + return 1; + }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/staticPrototypeProperty.js b/tests/baselines/reference/staticPrototypeProperty.js index 471ec743b59..cfd81bedeec 100644 --- a/tests/baselines/reference/staticPrototypeProperty.js +++ b/tests/baselines/reference/staticPrototypeProperty.js @@ -11,7 +11,8 @@ class C2 { var C = (function () { function C() { } - C.prototype = function () { }; + C.prototype = function () { + }; return C; })(); var C2 = (function () { diff --git a/tests/baselines/reference/staticVisibility.js b/tests/baselines/reference/staticVisibility.js index 7dbf49a2baa..0da2e3dbe2c 100644 --- a/tests/baselines/reference/staticVisibility.js +++ b/tests/baselines/reference/staticVisibility.js @@ -58,9 +58,13 @@ var C2 = (function () { this.barback = ""; } Object.defineProperty(C2, "Bar", { - get: function () { return "bar"; } // ok + get: function () { + return "bar"; + } // ok , - set: function (bar) { barback = bar; } // not ok + set: function (bar) { + barback = bar; + } // not ok , enumerable: true, configurable: true diff --git a/tests/baselines/reference/statics.js b/tests/baselines/reference/statics.js index c69fa0aabd7..4da39198b21 100644 --- a/tests/baselines/reference/statics.js +++ b/tests/baselines/reference/statics.js @@ -40,7 +40,9 @@ var M; this.c1 = c1; this.c2 = c2; this.x = C.y + this.c1 + this.c2 + c3; - this.g = function (v) { return C.f(_this.x + C.y + v + _this.c1 + _this.c2 + C.pub); }; + this.g = function (v) { + return C.f(_this.x + C.y + v + _this.c1 + _this.c2 + C.pub); + }; } C.f = function (n) { return "wow: " + (n + C.y + C.pub + C.priv); diff --git a/tests/baselines/reference/staticsInAFunction.js b/tests/baselines/reference/staticsInAFunction.js index e918f4b2901..e6959b7757a 100644 --- a/tests/baselines/reference/staticsInAFunction.js +++ b/tests/baselines/reference/staticsInAFunction.js @@ -11,5 +11,6 @@ function boo() { test(); test(name, string); test(name ? : any); - { } + { + } } diff --git a/tests/baselines/reference/staticsInConstructorBodies.js b/tests/baselines/reference/staticsInConstructorBodies.js index bb91b52a18a..044f183b370 100644 --- a/tests/baselines/reference/staticsInConstructorBodies.js +++ b/tests/baselines/reference/staticsInConstructorBodies.js @@ -10,7 +10,8 @@ class C { var C = (function () { function C() { } - C.m1 = function () { }; // ERROR + C.m1 = function () { + }; // ERROR C.p1 = 0; // ERROR return C; })(); diff --git a/tests/baselines/reference/strictMode5.js b/tests/baselines/reference/strictMode5.js index 8e4021820f1..c46de926dbb 100644 --- a/tests/baselines/reference/strictMode5.js +++ b/tests/baselines/reference/strictMode5.js @@ -36,7 +36,8 @@ var A = (function () { return _this.n(); }; }; - A.prototype.n = function () { }; + A.prototype.n = function () { + }; return A; })(); function bar(x) { diff --git a/tests/baselines/reference/stringIndexerAndConstructor.js b/tests/baselines/reference/stringIndexerAndConstructor.js index db3b9b8770b..6d4cc3747c0 100644 --- a/tests/baselines/reference/stringIndexerAndConstructor.js +++ b/tests/baselines/reference/stringIndexerAndConstructor.js @@ -17,6 +17,7 @@ interface I { var C = (function () { function C() { } - C.v = function () { }; + C.v = function () { + }; return C; })(); diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js index 9d70b66887c..ed96311f526 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js @@ -106,7 +106,8 @@ var C = (function () { get: function () { return ''; }, - set: function (v) { } // ok + set: function (v) { + } // ok , enumerable: true, configurable: true @@ -114,7 +115,8 @@ var C = (function () { C.prototype.foo = function () { return ''; }; - C.foo = function () { }; // ok + C.foo = function () { + }; // ok Object.defineProperty(C, "X", { get: function () { return 1; @@ -129,7 +131,8 @@ var a; var b = { a: '', b: 1, - c: function () { }, + c: function () { + }, "d": '', "e": 1, 1.0: '', @@ -140,7 +143,8 @@ var b = { get X() { return ''; }, - set X(v) { }, + set X(v) { + }, foo: function () { return ''; } diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js index c9278c40446..b9195403b20 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations2.js @@ -50,7 +50,9 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { return ''; }; + A.prototype.foo = function () { + return ''; + }; return A; })(); var B = (function (_super) { @@ -58,7 +60,9 @@ var B = (function (_super) { function B() { _super.apply(this, arguments); } - B.prototype.bar = function () { return ''; }; + B.prototype.bar = function () { + return ''; + }; return B; })(A); var Foo = (function () { diff --git a/tests/baselines/reference/stringIndexingResults.js b/tests/baselines/reference/stringIndexingResults.js index a6e00d92ec2..4e80c25d9b9 100644 --- a/tests/baselines/reference/stringIndexingResults.js +++ b/tests/baselines/reference/stringIndexingResults.js @@ -54,7 +54,9 @@ var a; var r7 = a['y']; var r8 = a['a']; var r9 = a[1]; -var b = { y: '' }; +var b = { + y: '' +}; var r10 = b['y']; var r11 = b['a']; var r12 = b[1]; diff --git a/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js b/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js index 2c9e54e610b..a367c3400f8 100644 --- a/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js +++ b/tests/baselines/reference/stringLiteralObjectLiteralDeclaration1.js @@ -7,7 +7,9 @@ module m1 { //// [stringLiteralObjectLiteralDeclaration1.js] var m1; (function (m1) { - m1.n = { 'foo bar': 4 }; + m1.n = { + 'foo bar': 4 + }; })(m1 || (m1 = {})); diff --git a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.js b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.js index 99ed3fb320a..0c46d72e23a 100644 --- a/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.js +++ b/tests/baselines/reference/stringLiteralPropertyNameWithLineContinuation1.js @@ -5,6 +5,8 @@ x.text = "bar" //// [stringLiteralPropertyNameWithLineContinuation1.js] -var x = { 'text\ -': 'hello' }; +var x = { + 'text\ +': 'hello' +}; x.text = "bar"; diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js index 6260493dea0..37aa59bef43 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js @@ -101,21 +101,36 @@ function f16(x: any) { } //// [stringLiteralTypeIsSubtypeOfString.js] // string literal types are subtypes of string, any -function f1(x) { } -function f2(x) { } -function f3(x) { } -function f4(x) { } -function f5(x) { } -function f6(x) { } -function f7(x) { } -function f8(x) { } -function f9(x) { } +function f1(x) { +} +function f2(x) { +} +function f3(x) { +} +function f4(x) { +} +function f5(x) { +} +function f6(x) { +} +function f7(x) { +} +function f8(x) { +} +function f9(x) { +} var C = (function () { function C() { } - C.prototype.toString = function () { return null; }; - C.prototype.charAt = function (pos) { return null; }; - C.prototype.charCodeAt = function (index) { return null; }; + C.prototype.toString = function () { + return null; + }; + C.prototype.charAt = function (pos) { + return null; + }; + C.prototype.charCodeAt = function (index) { + return null; + }; C.prototype.concat = function () { var strings = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -123,31 +138,68 @@ var C = (function () { } return null; }; - C.prototype.indexOf = function (searchString, position) { return null; }; - C.prototype.lastIndexOf = function (searchString, position) { return null; }; - C.prototype.localeCompare = function (that) { return null; }; - C.prototype.match = function (regexp) { return null; }; - C.prototype.replace = function (searchValue, replaceValue) { return null; }; - C.prototype.search = function (regexp) { return null; }; - C.prototype.slice = function (start, end) { return null; }; - C.prototype.split = function (separator, limit) { return null; }; - C.prototype.substring = function (start, end) { return null; }; - C.prototype.toLowerCase = function () { return null; }; - C.prototype.toLocaleLowerCase = function () { return null; }; - C.prototype.toUpperCase = function () { return null; }; - C.prototype.toLocaleUpperCase = function () { return null; }; - C.prototype.trim = function () { return null; }; - C.prototype.substr = function (from, length) { return null; }; + C.prototype.indexOf = function (searchString, position) { + return null; + }; + C.prototype.lastIndexOf = function (searchString, position) { + return null; + }; + C.prototype.localeCompare = function (that) { + return null; + }; + C.prototype.match = function (regexp) { + return null; + }; + C.prototype.replace = function (searchValue, replaceValue) { + return null; + }; + C.prototype.search = function (regexp) { + return null; + }; + C.prototype.slice = function (start, end) { + return null; + }; + C.prototype.split = function (separator, limit) { + return null; + }; + C.prototype.substring = function (start, end) { + return null; + }; + C.prototype.toLowerCase = function () { + return null; + }; + C.prototype.toLocaleLowerCase = function () { + return null; + }; + C.prototype.toUpperCase = function () { + return null; + }; + C.prototype.toLocaleUpperCase = function () { + return null; + }; + C.prototype.trim = function () { + return null; + }; + C.prototype.substr = function (from, length) { + return null; + }; return C; })(); -function f10(x) { } -function f11(x) { } -function f12(x) { } -function f13(x) { } +function f10(x) { +} +function f11(x) { +} +function f12(x) { +} +function f13(x) { +} var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f14(x) { } -function f15(x) { } -function f16(x) { } +function f14(x) { +} +function f15(x) { +} +function f16(x) { +} diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js index 724c20c6309..dc2b2a73412 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js @@ -28,18 +28,25 @@ var b = { //// [stringLiteralTypesInImplementationSignatures.js] // String literal types are only valid in overload signatures -function foo(x) { } -var f = function foo(x) { }; -var f2 = function (x, y) { }; +function foo(x) { +} +var f = function foo(x) { +}; +var f2 = function (x, y) { +}; var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var a; var b = { - foo: function (x) { }, - a: function foo(x, y) { }, - b: function (x) { } + foo: function (x) { + }, + a: function foo(x, y) { + }, + b: function (x) { + } }; diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js index 5050709c213..2ecd3330e20 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js @@ -31,15 +31,19 @@ var b = { //// [stringLiteralTypesInImplementationSignatures2.js] // String literal types are only valid in overload signatures -function foo(x) { } +function foo(x) { +} var C = (function () { function C() { } - C.prototype.foo = function (x) { }; + C.prototype.foo = function (x) { + }; return C; })(); var a; var b = { - foo: function (x) { }, - foo: function (x) { } + foo: function (x) { + }, + foo: function (x) { + } }; diff --git a/tests/baselines/reference/stringPropCodeGen.js b/tests/baselines/reference/stringPropCodeGen.js index ae8cfa3d5aa..46e1a6eb920 100644 --- a/tests/baselines/reference/stringPropCodeGen.js +++ b/tests/baselines/reference/stringPropCodeGen.js @@ -15,7 +15,8 @@ a.bar.toString(); //// [stringPropCodeGen.js] var a = { - "foo": function () { }, + "foo": function () { + }, "bar": 5 }; a.foo(); diff --git a/tests/baselines/reference/stripInternal1.js b/tests/baselines/reference/stripInternal1.js index c5d350bcd86..9deadf1fc31 100644 --- a/tests/baselines/reference/stripInternal1.js +++ b/tests/baselines/reference/stripInternal1.js @@ -10,9 +10,11 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; // @internal - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); diff --git a/tests/baselines/reference/structural1.js b/tests/baselines/reference/structural1.js index 73b033a525c..ebafbc8f0a0 100644 --- a/tests/baselines/reference/structural1.js +++ b/tests/baselines/reference/structural1.js @@ -18,5 +18,8 @@ var M; function f(i) { } M.f = f; - f({ salt: 2, pepper: 0 }); + f({ + salt: 2, + pepper: 0 + }); })(M || (M = {})); diff --git a/tests/baselines/reference/subtypesOfAny.js b/tests/baselines/reference/subtypesOfAny.js index e73a120ed63..973db6a9a74 100644 --- a/tests/baselines/reference/subtypesOfAny.js +++ b/tests/baselines/reference/subtypesOfAny.js @@ -149,7 +149,8 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index 7d739132a77..c14e5c01a26 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -143,7 +143,8 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; @@ -174,12 +175,22 @@ function f2(x, y) { var r4 = true ? x : new Date(); var r5 = true ? /1/ : x; var r5 = true ? x : /1/; - var r6 = true ? { foo: 1 } : x; - var r6 = true ? x : { foo: 1 }; - var r7 = true ? function () { } : x; - var r7 = true ? x : function () { }; - var r8 = true ? function (x) { return x; } : x; - var r8b = true ? x : function (x) { return x; }; // type parameters not identical across declarations + var r6 = true ? { + foo: 1 + } : x; + var r6 = true ? x : { + foo: 1 + }; + var r7 = true ? function () { + } : x; + var r7 = true ? x : function () { + }; + var r8 = true ? function (x) { + return x; + } : x; + var r8b = true ? x : function (x) { + return x; + }; // type parameters not identical across declarations var i1; var r9 = true ? i1 : x; var r9 = true ? x : i1; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js index df4511fb7ad..9c52fa671e5 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js @@ -199,7 +199,8 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; @@ -241,16 +242,26 @@ function f9(x) { var r5 = true ? x : /1/; // ok } function f10(x) { - var r6 = true ? { foo: 1 } : x; // ok - var r6 = true ? x : { foo: 1 }; // ok + var r6 = true ? { + foo: 1 + } : x; // ok + var r6 = true ? x : { + foo: 1 + }; // ok } function f11(x) { - var r7 = true ? function () { } : x; // ok - var r7 = true ? x : function () { }; // ok + var r7 = true ? function () { + } : x; // ok + var r7 = true ? x : function () { + }; // ok } function f12(x) { - var r8 = true ? function (x) { return x; } : x; // ok - var r8b = true ? x : function (x) { return x; }; // ok, type parameters not identical across declarations + var r8 = true ? function (x) { + return x; + } : x; // ok + var r8b = true ? x : function (x) { + return x; + }; // ok, type parameters not identical across declarations } function f13(x) { var i1; diff --git a/tests/baselines/reference/subtypesOfUnion.js b/tests/baselines/reference/subtypesOfUnion.js index 926efc3e921..a18ebb944b9 100644 --- a/tests/baselines/reference/subtypesOfUnion.js +++ b/tests/baselines/reference/subtypesOfUnion.js @@ -68,7 +68,8 @@ var A2 = (function () { } return A2; })(); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/subtypingWithCallSignatures.js b/tests/baselines/reference/subtypingWithCallSignatures.js index 73ca2c6543c..560871cce4e 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures.js +++ b/tests/baselines/reference/subtypingWithCallSignatures.js @@ -14,8 +14,16 @@ module CallSignature { //// [subtypingWithCallSignatures.js] var CallSignature; (function (CallSignature) { - var r = foo1(function (x) { return 1; }); // ok because base returns void - var r2 = foo1(function (x) { return ''; }); // ok because base returns void - var r3 = foo2(function (x, y) { return 1; }); // ok because base returns void - var r4 = foo2(function (x) { return ''; }); // ok because base returns void + var r = foo1(function (x) { + return 1; + }); // ok because base returns void + var r2 = foo1(function (x) { + return ''; + }); // ok because base returns void + var r3 = foo2(function (x, y) { + return 1; + }); // ok because base returns void + var r4 = foo2(function (x) { + return ''; + }); // ok because base returns void })(CallSignature || (CallSignature = {})); diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index e1341914739..cd430902af0 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -206,51 +206,160 @@ var OtherDerived = (function (_super) { } return OtherDerived; })(Base); -var r1arg1 = function (x) { return [x]; }; -var r1arg2 = function (x) { return [1]; }; +var r1arg1 = function (x) { + return [ + x + ]; +}; +var r1arg2 = function (x) { + return [ + 1 + ]; +}; var r1 = foo1(r1arg1); // any, return types are not subtype of first overload -var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions -var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions -var r2arg1 = function (x) { return ['']; }; -var r2arg2 = function (x) { return ['']; }; +var r1a = [ + r1arg2, + r1arg1 +]; // generic signature, subtype in both directions +var r1b = [ + r1arg1, + r1arg2 +]; // generic signature, subtype in both directions +var r2arg1 = function (x) { + return [ + '' + ]; +}; +var r2arg2 = function (x) { + return [ + '' + ]; +}; var r2 = foo2(r2arg1); -var r2a = [r2arg1, r2arg2]; -var r2b = [r2arg2, r2arg1]; -var r3arg1 = function (x) { return x; }; -var r3arg2 = function (x) { }; +var r2a = [ + r2arg1, + r2arg2 +]; +var r2b = [ + r2arg2, + r2arg1 +]; +var r3arg1 = function (x) { + return x; +}; +var r3arg2 = function (x) { +}; var r3 = foo3(r3arg1); -var r3a = [r3arg1, r3arg2]; -var r3b = [r3arg2, r3arg1]; -var r4arg1 = function (x, y) { return x; }; -var r4arg2 = function (x, y) { return ''; }; +var r3a = [ + r3arg1, + r3arg2 +]; +var r3b = [ + r3arg2, + r3arg1 +]; +var r4arg1 = function (x, y) { + return x; +}; +var r4arg2 = function (x, y) { + return ''; +}; var r4 = foo4(r4arg1); // any -var r4a = [r4arg1, r4arg2]; -var r4b = [r4arg2, r4arg1]; -var r5arg1 = function (x) { return null; }; -var r5arg2 = function (x) { return ''; }; +var r4a = [ + r4arg1, + r4arg2 +]; +var r4b = [ + r4arg2, + r4arg1 +]; +var r5arg1 = function (x) { + return null; +}; +var r5arg2 = function (x) { + return ''; +}; var r5 = foo5(r5arg1); // any -var r5a = [r5arg1, r5arg2]; -var r5b = [r5arg2, r5arg1]; -var r6arg1 = function (x) { return null; }; -var r6arg2 = function (x) { return null; }; +var r5a = [ + r5arg1, + r5arg2 +]; +var r5b = [ + r5arg2, + r5arg1 +]; +var r6arg1 = function (x) { + return null; +}; +var r6arg2 = function (x) { + return null; +}; var r6 = foo6(r6arg1); // any -var r6a = [r6arg1, r6arg2]; -var r6b = [r6arg2, r6arg1]; -var r7arg1 = function (x) { return function (r) { return null; }; }; -var r7arg2 = function (x) { return function (r) { return null; }; }; +var r6a = [ + r6arg1, + r6arg2 +]; +var r6b = [ + r6arg2, + r6arg1 +]; +var r7arg1 = function (x) { + return function (r) { + return null; + }; +}; +var r7arg2 = function (x) { + return function (r) { + return null; + }; +}; var r7 = foo7(r7arg1); // any -var r7a = [r7arg1, r7arg2]; -var r7b = [r7arg2, r7arg1]; -var r8arg1 = function (x, y) { return function (r) { return null; }; }; -var r8arg2 = function (x, y) { return function (r) { return null; }; }; +var r7a = [ + r7arg1, + r7arg2 +]; +var r7b = [ + r7arg2, + r7arg1 +]; +var r8arg1 = function (x, y) { + return function (r) { + return null; + }; +}; +var r8arg2 = function (x, y) { + return function (r) { + return null; + }; +}; var r8 = foo8(r8arg1); // any -var r8a = [r8arg1, r8arg2]; -var r8b = [r8arg2, r8arg1]; -var r9arg1 = function (x, y) { return function (r) { return null; }; }; -var r9arg2 = function (x, y) { return function (r) { return null; }; }; +var r8a = [ + r8arg1, + r8arg2 +]; +var r8b = [ + r8arg2, + r8arg1 +]; +var r9arg1 = function (x, y) { + return function (r) { + return null; + }; +}; +var r9arg2 = function (x, y) { + return function (r) { + return null; + }; +}; var r9 = foo9(r9arg1); // any -var r9a = [r9arg1, r9arg2]; -var r9b = [r9arg2, r9arg1]; +var r9a = [ + r9arg1, + r9arg2 +]; +var r9b = [ + r9arg2, + r9arg1 +]; var r10arg1 = function () { var x = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -266,33 +375,89 @@ var r10arg2 = function () { return null; }; var r10 = foo10(r10arg1); // any -var r10a = [r10arg1, r10arg2]; -var r10b = [r10arg2, r10arg1]; -var r11arg1 = function (x, y) { return x; }; -var r11arg2 = function (x, y) { return null; }; +var r10a = [ + r10arg1, + r10arg2 +]; +var r10b = [ + r10arg2, + r10arg1 +]; +var r11arg1 = function (x, y) { + return x; +}; +var r11arg2 = function (x, y) { + return null; +}; var r11 = foo11(r11arg1); // any -var r11a = [r11arg1, r11arg2]; -var r11b = [r11arg2, r11arg1]; -var r12arg1 = function (x, y) { return null; }; -var r12arg2 = function (x, y) { return null; }; +var r11a = [ + r11arg1, + r11arg2 +]; +var r11b = [ + r11arg2, + r11arg1 +]; +var r12arg1 = function (x, y) { + return null; +}; +var r12arg2 = function (x, y) { + return null; +}; var r12 = foo12(r12arg1); // any -var r12a = [r12arg1, r12arg2]; -var r12b = [r12arg2, r12arg1]; -var r13arg1 = function (x, y) { return y; }; -var r13arg2 = function (x, y) { return null; }; +var r12a = [ + r12arg1, + r12arg2 +]; +var r12b = [ + r12arg2, + r12arg1 +]; +var r13arg1 = function (x, y) { + return y; +}; +var r13arg2 = function (x, y) { + return null; +}; var r13 = foo13(r13arg1); // any -var r13a = [r13arg1, r13arg2]; -var r13b = [r13arg2, r13arg1]; -var r14arg1 = function (x) { return x.a; }; -var r14arg2 = function (x) { return null; }; +var r13a = [ + r13arg1, + r13arg2 +]; +var r13b = [ + r13arg2, + r13arg1 +]; +var r14arg1 = function (x) { + return x.a; +}; +var r14arg2 = function (x) { + return null; +}; var r14 = foo14(r14arg1); // any -var r14a = [r14arg1, r14arg2]; -var r14b = [r14arg2, r14arg1]; -var r15arg1 = function (x) { return null; }; +var r14a = [ + r14arg1, + r14arg2 +]; +var r14b = [ + r14arg2, + r14arg1 +]; +var r15arg1 = function (x) { + return null; +}; var r15 = foo15(r15arg1); // any -var r16arg1 = function (x) { return [1]; }; +var r16arg1 = function (x) { + return [ + 1 + ]; +}; var r16 = foo16(r16arg1); -var r17arg1 = function (x) { return null; }; +var r17arg1 = function (x) { + return null; +}; var r17 = foo17(r17arg1); // any -var r18arg1 = function (x) { return null; }; +var r18arg1 = function (x) { + return null; +}; var r18 = foo18(r18arg1); diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.js b/tests/baselines/reference/subtypingWithCallSignatures3.js index fb7b0fef551..9dd2cb7a87e 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.js +++ b/tests/baselines/reference/subtypingWithCallSignatures3.js @@ -155,19 +155,67 @@ var Errors; } return OtherDerived; })(Base); - var r1 = foo2(function (x) { return null; }); // any - var r1a = [function (x) { return ['']; }, function (x) { return null; }]; - var r1b = [function (x) { return null; }, function (x) { return ['']; }]; - var r2arg = function (x) { return function (r) { return null; }; }; - var r2arg2 = function (x) { return function (r) { return null; }; }; + var r1 = foo2(function (x) { + return null; + }); // any + var r1a = [ + function (x) { + return [ + '' + ]; + }, + function (x) { + return null; + } + ]; + var r1b = [ + function (x) { + return null; + }, + function (x) { + return [ + '' + ]; + } + ]; + var r2arg = function (x) { + return function (r) { + return null; + }; + }; + var r2arg2 = function (x) { + return function (r) { + return null; + }; + }; var r2 = foo7(r2arg); // any - var r2a = [r2arg2, r2arg]; - var r2b = [r2arg, r2arg2]; - var r3arg = function (x, y) { return function (r) { return null; }; }; - var r3arg2 = function (x, y) { return function (r) { return null; }; }; + var r2a = [ + r2arg2, + r2arg + ]; + var r2b = [ + r2arg, + r2arg2 + ]; + var r3arg = function (x, y) { + return function (r) { + return null; + }; + }; + var r3arg2 = function (x, y) { + return function (r) { + return null; + }; + }; var r3 = foo8(r3arg); // any - var r3a = [r3arg2, r3arg]; - var r3b = [r3arg, r3arg2]; + var r3a = [ + r3arg2, + r3arg + ]; + var r3b = [ + r3arg, + r3arg2 + ]; var r4arg = function () { var x = []; for (var _i = 0; _i < arguments.length; _i++) { @@ -183,36 +231,90 @@ var Errors; return null; }; var r4 = foo10(r4arg); // any - var r4a = [r4arg2, r4arg]; - var r4b = [r4arg, r4arg2]; - var r5arg = function (x, y) { return null; }; - var r5arg2 = function (x, y) { return null; }; + var r4a = [ + r4arg2, + r4arg + ]; + var r4b = [ + r4arg, + r4arg2 + ]; + var r5arg = function (x, y) { + return null; + }; + var r5arg2 = function (x, y) { + return null; + }; var r5 = foo11(r5arg); // any - var r5a = [r5arg2, r5arg]; - var r5b = [r5arg, r5arg2]; - var r6arg = function (x, y) { return null; }; - var r6arg2 = function (x, y) { return null; }; + var r5a = [ + r5arg2, + r5arg + ]; + var r5b = [ + r5arg, + r5arg2 + ]; + var r6arg = function (x, y) { + return null; + }; + var r6arg2 = function (x, y) { + return null; + }; var r6 = foo12(r6arg); // (x: Array, y: Array) => Array - var r6a = [r6arg2, r6arg]; - var r6b = [r6arg, r6arg2]; - var r7arg = function (x) { return null; }; - var r7arg2 = function (x) { return 1; }; + var r6a = [ + r6arg2, + r6arg + ]; + var r6b = [ + r6arg, + r6arg2 + ]; + var r7arg = function (x) { + return null; + }; + var r7arg2 = function (x) { + return 1; + }; var r7 = foo15(r7arg); // any - var r7a = [r7arg2, r7arg]; - var r7b = [r7arg, r7arg2]; - var r7arg3 = function (x) { return 1; }; + var r7a = [ + r7arg2, + r7arg + ]; + var r7b = [ + r7arg, + r7arg2 + ]; + var r7arg3 = function (x) { + return 1; + }; var r7c = foo15(r7arg3); // (x: { a: string; b: number }) => number): number; - var r7d = [r7arg2, r7arg3]; - var r7e = [r7arg3, r7arg2]; - var r8arg = function (x) { return null; }; + var r7d = [ + r7arg2, + r7arg3 + ]; + var r7e = [ + r7arg3, + r7arg2 + ]; + var r8arg = function (x) { + return null; + }; var r8 = foo16(r8arg); // any - var r9arg = function (x) { return null; }; + var r9arg = function (x) { + return null; + }; var r9 = foo17(r9arg); // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; })(Errors || (Errors = {})); var WithGenericSignaturesInBaseType; (function (WithGenericSignaturesInBaseType) { - var r2arg2 = function (x) { return ['']; }; + var r2arg2 = function (x) { + return [ + '' + ]; + }; var r2 = foo2(r2arg2); // (x:T) => T[] since we can infer from generic signatures now - var r3arg2 = function (x) { return null; }; + var r3arg2 = function (x) { + return null; + }; var r3 = foo3(r3arg2); // any })(WithGenericSignaturesInBaseType || (WithGenericSignaturesInBaseType = {})); diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index cbdf92e2e60..abdef75ef91 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -145,52 +145,149 @@ var OtherDerived = (function (_super) { } return OtherDerived; })(Base); -var r1arg = function (x) { return null; }; -var r1arg2 = function (x) { return null; }; +var r1arg = function (x) { + return null; +}; +var r1arg2 = function (x) { + return null; +}; var r1 = foo1(r1arg); -var r1a = [r1arg, r1arg2]; -var r1b = [r1arg2, r1arg]; -var r2arg = function (x) { return ['']; }; -var r2arg2 = function (x) { return ['']; }; +var r1a = [ + r1arg, + r1arg2 +]; +var r1b = [ + r1arg2, + r1arg +]; +var r2arg = function (x) { + return [ + '' + ]; +}; +var r2arg2 = function (x) { + return [ + '' + ]; +}; var r2 = foo2(r2arg); -var r2a = [r2arg, r2arg2]; -var r2b = [r2arg2, r2arg]; -var r3arg = function (x) { return null; }; -var r3arg2 = function (x) { }; +var r2a = [ + r2arg, + r2arg2 +]; +var r2b = [ + r2arg2, + r2arg +]; +var r3arg = function (x) { + return null; +}; +var r3arg2 = function (x) { +}; var r3 = foo3(r3arg); -var r3a = [r3arg, r3arg2]; -var r3b = [r3arg2, r3arg]; -var r4arg = function (x, y) { return ''; }; -var r4arg2 = function (x, y) { return ''; }; +var r3a = [ + r3arg, + r3arg2 +]; +var r3b = [ + r3arg2, + r3arg +]; +var r4arg = function (x, y) { + return ''; +}; +var r4arg2 = function (x, y) { + return ''; +}; var r4 = foo4(r4arg); -var r4a = [r4arg, r4arg2]; -var r4b = [r4arg2, r4arg]; -var r5arg = function (x) { return null; }; -var r5arg2 = function (x) { return null; }; +var r4a = [ + r4arg, + r4arg2 +]; +var r4b = [ + r4arg2, + r4arg +]; +var r5arg = function (x) { + return null; +}; +var r5arg2 = function (x) { + return null; +}; var r5 = foo5(r5arg); -var r5a = [r5arg, r5arg2]; -var r5b = [r5arg2, r5arg]; -var r6arg = function (x) { return null; }; -var r6arg2 = function (x) { return null; }; +var r5a = [ + r5arg, + r5arg2 +]; +var r5b = [ + r5arg2, + r5arg +]; +var r6arg = function (x) { + return null; +}; +var r6arg2 = function (x) { + return null; +}; var r6 = foo6(r6arg); -var r6a = [r6arg, r6arg2]; -var r6b = [r6arg2, r6arg]; -var r11arg = function (x, y) { return null; }; -var r11arg2 = function (x, y) { return null; }; +var r6a = [ + r6arg, + r6arg2 +]; +var r6b = [ + r6arg2, + r6arg +]; +var r11arg = function (x, y) { + return null; +}; +var r11arg2 = function (x, y) { + return null; +}; var r11 = foo11(r11arg); -var r11a = [r11arg, r11arg2]; -var r11b = [r11arg2, r11arg]; -var r15arg = function (x) { return null; }; -var r15arg2 = function (x) { return null; }; +var r11a = [ + r11arg, + r11arg2 +]; +var r11b = [ + r11arg2, + r11arg +]; +var r15arg = function (x) { + return null; +}; +var r15arg2 = function (x) { + return null; +}; var r15 = foo15(r15arg); -var r15a = [r15arg, r15arg2]; -var r15b = [r15arg2, r15arg]; -var r16arg = function (x) { return null; }; -var r16arg2 = function (x) { return null; }; +var r15a = [ + r15arg, + r15arg2 +]; +var r15b = [ + r15arg2, + r15arg +]; +var r16arg = function (x) { + return null; +}; +var r16arg2 = function (x) { + return null; +}; var r16 = foo16(r16arg); -var r16a = [r16arg, r16arg2]; -var r16b = [r16arg2, r16arg]; -var r17arg = function (x) { return null; }; +var r16a = [ + r16arg, + r16arg2 +]; +var r16b = [ + r16arg2, + r16arg +]; +var r17arg = function (x) { + return null; +}; var r17 = foo17(r17arg); -var r18arg = function (x) { return null; }; +var r18arg = function (x) { + return null; +}; var r18 = foo18(r18arg); diff --git a/tests/baselines/reference/subtypingWithCallSignaturesA.js b/tests/baselines/reference/subtypingWithCallSignaturesA.js index a6c8da99b8c..5a679844573 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesA.js +++ b/tests/baselines/reference/subtypingWithCallSignaturesA.js @@ -3,4 +3,6 @@ declare function foo3(cb: (x: number) => number): typeof cb; var r5 = foo3((x: number) => ''); // error //// [subtypingWithCallSignaturesA.js] -var r5 = foo3(function (x) { return ''; }); // error +var r5 = foo3(function (x) { + return ''; +}); // error diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.js b/tests/baselines/reference/subtypingWithConstructSignatures2.js index 9a7ecd791c3..ebedd898491 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.js @@ -209,73 +209,157 @@ var OtherDerived = (function (_super) { var r1arg1; var r1arg2; var r1 = foo1(r1arg1); // any, return types are not subtype of first overload -var r1a = [r1arg2, r1arg1]; // generic signature, subtype in both directions -var r1b = [r1arg1, r1arg2]; // generic signature, subtype in both directions +var r1a = [ + r1arg2, + r1arg1 +]; // generic signature, subtype in both directions +var r1b = [ + r1arg1, + r1arg2 +]; // generic signature, subtype in both directions var r2arg1; var r2arg2; var r2 = foo2(r2arg1); -var r2a = [r2arg1, r2arg2]; -var r2b = [r2arg2, r2arg1]; +var r2a = [ + r2arg1, + r2arg2 +]; +var r2b = [ + r2arg2, + r2arg1 +]; var r3arg1; var r3arg2; var r3 = foo3(r3arg1); -var r3a = [r3arg1, r3arg2]; -var r3b = [r3arg2, r3arg1]; +var r3a = [ + r3arg1, + r3arg2 +]; +var r3b = [ + r3arg2, + r3arg1 +]; var r4arg1; var r4arg2; var r4 = foo4(r4arg1); // any -var r4a = [r4arg1, r4arg2]; -var r4b = [r4arg2, r4arg1]; +var r4a = [ + r4arg1, + r4arg2 +]; +var r4b = [ + r4arg2, + r4arg1 +]; var r5arg1; var r5arg2; var r5 = foo5(r5arg1); // any -var r5a = [r5arg1, r5arg2]; -var r5b = [r5arg2, r5arg1]; +var r5a = [ + r5arg1, + r5arg2 +]; +var r5b = [ + r5arg2, + r5arg1 +]; var r6arg1; var r6arg2; var r6 = foo6(r6arg1); // any -var r6a = [r6arg1, r6arg2]; -var r6b = [r6arg2, r6arg1]; +var r6a = [ + r6arg1, + r6arg2 +]; +var r6b = [ + r6arg2, + r6arg1 +]; var r7arg1; var r7arg2; var r7 = foo7(r7arg1); // any -var r7a = [r7arg1, r7arg2]; -var r7b = [r7arg2, r7arg1]; +var r7a = [ + r7arg1, + r7arg2 +]; +var r7b = [ + r7arg2, + r7arg1 +]; var r8arg1; var r8arg2; var r8 = foo8(r8arg1); // any -var r8a = [r8arg1, r8arg2]; -var r8b = [r8arg2, r8arg1]; +var r8a = [ + r8arg1, + r8arg2 +]; +var r8b = [ + r8arg2, + r8arg1 +]; var r9arg1; var r9arg2; var r9 = foo9(r9arg1); // any -var r9a = [r9arg1, r9arg2]; -var r9b = [r9arg2, r9arg1]; +var r9a = [ + r9arg1, + r9arg2 +]; +var r9b = [ + r9arg2, + r9arg1 +]; var r10arg1; var r10arg2; var r10 = foo10(r10arg1); // any -var r10a = [r10arg1, r10arg2]; -var r10b = [r10arg2, r10arg1]; +var r10a = [ + r10arg1, + r10arg2 +]; +var r10b = [ + r10arg2, + r10arg1 +]; var r11arg1; var r11arg2; var r11 = foo11(r11arg1); // any -var r11a = [r11arg1, r11arg2]; -var r11b = [r11arg2, r11arg1]; +var r11a = [ + r11arg1, + r11arg2 +]; +var r11b = [ + r11arg2, + r11arg1 +]; var r12arg1; var r12arg2; var r12 = foo12(r12arg1); // any -var r12a = [r12arg1, r12arg2]; -var r12b = [r12arg2, r12arg1]; +var r12a = [ + r12arg1, + r12arg2 +]; +var r12b = [ + r12arg2, + r12arg1 +]; var r13arg1; var r13arg2; var r13 = foo13(r13arg1); // any -var r13a = [r13arg1, r13arg2]; -var r13b = [r13arg2, r13arg1]; +var r13a = [ + r13arg1, + r13arg2 +]; +var r13b = [ + r13arg2, + r13arg1 +]; var r14arg1; var r14arg2; var r14 = foo14(r14arg1); // any -var r14a = [r14arg1, r14arg2]; -var r14b = [r14arg2, r14arg1]; +var r14a = [ + r14arg1, + r14arg2 +]; +var r14b = [ + r14arg2, + r14arg1 +]; var r15arg1; var r15 = foo15(r15arg1); // any var r16arg1; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.js b/tests/baselines/reference/subtypingWithConstructSignatures3.js index a74c14e8d4b..f32f26fc693 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.js @@ -160,42 +160,90 @@ var Errors; var r1arg1; var r1arg2; var r1 = foo2(r1arg1); // any - var r1a = [r1arg2, r1arg1]; - var r1b = [r1arg1, r1arg2]; + var r1a = [ + r1arg2, + r1arg1 + ]; + var r1b = [ + r1arg1, + r1arg2 + ]; var r2arg1; var r2arg2; var r2 = foo7(r2arg1); // any - var r2a = [r2arg2, r2arg1]; - var r2b = [r2arg1, r2arg2]; + var r2a = [ + r2arg2, + r2arg1 + ]; + var r2b = [ + r2arg1, + r2arg2 + ]; var r3arg1; var r3arg2; var r3 = foo8(r3arg1); // any - var r3a = [r3arg2, r3arg1]; - var r3b = [r3arg1, r3arg2]; + var r3a = [ + r3arg2, + r3arg1 + ]; + var r3b = [ + r3arg1, + r3arg2 + ]; var r4arg1; var r4arg2; var r4 = foo10(r4arg1); // any - var r4a = [r4arg2, r4arg1]; - var r4b = [r4arg1, r4arg2]; + var r4a = [ + r4arg2, + r4arg1 + ]; + var r4b = [ + r4arg1, + r4arg2 + ]; var r5arg1; var r5arg2; var r5 = foo11(r5arg1); // any - var r5a = [r5arg2, r5arg1]; - var r5b = [r5arg1, r5arg2]; + var r5a = [ + r5arg2, + r5arg1 + ]; + var r5b = [ + r5arg1, + r5arg2 + ]; var r6arg1; var r6arg2; var r6 = foo12(r6arg1); // new (x: Array, y: Array) => Array - var r6a = [r6arg2, r6arg1]; - var r6b = [r6arg1, r6arg2]; + var r6a = [ + r6arg2, + r6arg1 + ]; + var r6b = [ + r6arg1, + r6arg2 + ]; var r7arg1; var r7arg2; var r7 = foo15(r7arg1); // (x: { a: string; b: number }) => number): number; - var r7a = [r7arg2, r7arg1]; - var r7b = [r7arg1, r7arg2]; + var r7a = [ + r7arg2, + r7arg1 + ]; + var r7b = [ + r7arg1, + r7arg2 + ]; var r7arg3; var r7c = foo15(r7arg3); // any - var r7d = [r7arg2, r7arg3]; - var r7e = [r7arg3, r7arg2]; + var r7d = [ + r7arg2, + r7arg3 + ]; + var r7e = [ + r7arg3, + r7arg2 + ]; var r8arg; var r8 = foo16(r8arg); // any var r9arg; diff --git a/tests/baselines/reference/subtypingWithConstructSignatures4.js b/tests/baselines/reference/subtypingWithConstructSignatures4.js index b3d43b03087..4e0783afa47 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures4.js +++ b/tests/baselines/reference/subtypingWithConstructSignatures4.js @@ -148,48 +148,102 @@ var OtherDerived = (function (_super) { var r1arg; var r1arg2; var r1 = foo1(r1arg); -var r1a = [r1arg, r1arg2]; -var r1b = [r1arg2, r1arg]; +var r1a = [ + r1arg, + r1arg2 +]; +var r1b = [ + r1arg2, + r1arg +]; var r2arg; var r2arg2; var r2 = foo2(r2arg); -var r2a = [r2arg, r2arg2]; -var r2b = [r2arg2, r2arg]; +var r2a = [ + r2arg, + r2arg2 +]; +var r2b = [ + r2arg2, + r2arg +]; var r3arg; var r3arg2; var r3 = foo3(r3arg); -var r3a = [r3arg, r3arg2]; -var r3b = [r3arg2, r3arg]; +var r3a = [ + r3arg, + r3arg2 +]; +var r3b = [ + r3arg2, + r3arg +]; var r4arg; var r4arg2; var r4 = foo4(r4arg); -var r4a = [r4arg, r4arg2]; -var r4b = [r4arg2, r4arg]; +var r4a = [ + r4arg, + r4arg2 +]; +var r4b = [ + r4arg2, + r4arg +]; var r5arg; var r5arg2; var r5 = foo5(r5arg); -var r5a = [r5arg, r5arg2]; -var r5b = [r5arg2, r5arg]; +var r5a = [ + r5arg, + r5arg2 +]; +var r5b = [ + r5arg2, + r5arg +]; var r6arg; var r6arg2; var r6 = foo6(r6arg); -var r6a = [r6arg, r6arg2]; -var r6b = [r6arg2, r6arg]; +var r6a = [ + r6arg, + r6arg2 +]; +var r6b = [ + r6arg2, + r6arg +]; var r11arg; var r11arg2; var r11 = foo11(r11arg); -var r11a = [r11arg, r11arg2]; -var r11b = [r11arg2, r11arg]; +var r11a = [ + r11arg, + r11arg2 +]; +var r11b = [ + r11arg2, + r11arg +]; var r15arg; var r15arg2; var r15 = foo15(r15arg); -var r15a = [r15arg, r15arg2]; -var r15b = [r15arg2, r15arg]; +var r15a = [ + r15arg, + r15arg2 +]; +var r15b = [ + r15arg2, + r15arg +]; var r16arg; var r16arg2; var r16 = foo16(r16arg); -var r16a = [r16arg, r16arg2]; -var r16b = [r16arg2, r16arg]; +var r16a = [ + r16arg, + r16arg2 +]; +var r16b = [ + r16arg2, + r16arg +]; var r17arg; var r17 = foo17(r17arg); var r18arg; diff --git a/tests/baselines/reference/subtypingWithObjectMembersOptionality.js b/tests/baselines/reference/subtypingWithObjectMembersOptionality.js index 87a7012e91e..f0005c9fe15 100644 --- a/tests/baselines/reference/subtypingWithObjectMembersOptionality.js +++ b/tests/baselines/reference/subtypingWithObjectMembersOptionality.js @@ -77,12 +77,16 @@ module TwoLevels { // Derived member is not optional but base member is, should be ok // object literal case var a; -var b = { Foo: null }; +var b = { + Foo: null +}; var r = true ? a : b; var TwoLevels; (function (TwoLevels) { // object literal case var a; - var b = { Foo: null }; + var b = { + Foo: null + }; var r = true ? a : b; })(TwoLevels || (TwoLevels = {})); diff --git a/tests/baselines/reference/subtypingWithOptionalProperties.js b/tests/baselines/reference/subtypingWithOptionalProperties.js index 4908a92f2e5..48f73e72b0e 100644 --- a/tests/baselines/reference/subtypingWithOptionalProperties.js +++ b/tests/baselines/reference/subtypingWithOptionalProperties.js @@ -17,5 +17,7 @@ function f(a) { var b = a; return b; } -var r = f({ s: new Object() }); // ok +var r = f({ + s: new Object() +}); // ok r.s && r.s.toFixed(); // would blow up at runtime diff --git a/tests/baselines/reference/superAccess.js b/tests/baselines/reference/superAccess.js index 3d9080b76e1..c9ab251443f 100644 --- a/tests/baselines/reference/superAccess.js +++ b/tests/baselines/reference/superAccess.js @@ -23,7 +23,9 @@ var __extends = this.__extends || function (d, b) { var MyBase = (function () { function MyBase() { this.S2 = "test"; - this.f = function () { return 5; }; + this.f = function () { + return 5; + }; } MyBase.S1 = 5; return MyBase; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 7d8f7a9e643..cd3d9c63e41 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -34,8 +34,10 @@ var __extends = this.__extends || function (d, b) { var P = (function () { function P() { } - P.prototype.x = function () { }; - P.y = function () { }; + P.prototype.x = function () { + }; + P.y = function () { + }; return P; })(); var Q = (function (_super) { @@ -45,7 +47,9 @@ var Q = (function (_super) { var _this = this; if (z === void 0) { z = _super.prototype.; } if (zz === void 0) { zz = _super.prototype.; } - if (zzz === void 0) { zzz = function () { return _super.prototype.; }; } + if (zzz === void 0) { zzz = function () { + return _super.prototype.; + }; } _super.call(this); this.z = z; this.xx = _super.prototype.; diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js index 92abed0d66d..bbfd81879bb 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.js @@ -26,7 +26,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } return B; })(A); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js index 7e3c61e6690..11eb82025a6 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.js @@ -26,7 +26,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } return B; })(A); diff --git a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js index b48d5bb7f58..b6caa0880ca 100644 --- a/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js +++ b/tests/baselines/reference/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.js @@ -26,7 +26,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } return B; })(A); diff --git a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js index 7818aed7ff8..3f4c24297e1 100644 --- a/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js +++ b/tests/baselines/reference/superCallFromClassThatHasNoBaseType1.js @@ -19,7 +19,9 @@ var A = (function () { })(); var B = (function () { function B() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } return B; })(); diff --git a/tests/baselines/reference/superCallFromFunction1.js b/tests/baselines/reference/superCallFromFunction1.js index a7fcbaaeff0..ecc78aa5397 100644 --- a/tests/baselines/reference/superCallFromFunction1.js +++ b/tests/baselines/reference/superCallFromFunction1.js @@ -6,5 +6,7 @@ function foo() { //// [superCallFromFunction1.js] function foo() { - _super.call(this, function (value) { return String(value); }); + _super.call(this, function (value) { + return String(value); + }); } diff --git a/tests/baselines/reference/superCallInNonStaticMethod.js b/tests/baselines/reference/superCallInNonStaticMethod.js index 7ef1ce1c62a..cf29ac3b1a4 100644 --- a/tests/baselines/reference/superCallInNonStaticMethod.js +++ b/tests/baselines/reference/superCallInNonStaticMethod.js @@ -70,7 +70,9 @@ var Other = (function (_super) { var _this = this; _super.call(this); this.propertyInitializer = _super.prototype.instanceMethod.call(this); - this.functionProperty = function () { _super.prototype.instanceMethod.call(_this); }; + this.functionProperty = function () { + _super.prototype.instanceMethod.call(_this); + }; _super.prototype.instanceMethod.call(this); } // in instance method diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 94f41cccb57..32d45b044f5 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -32,7 +32,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.js b/tests/baselines/reference/superCallParameterContextualTyping1.js index b11d62d62c8..0df2159c40c 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.js +++ b/tests/baselines/reference/superCallParameterContextualTyping1.js @@ -29,7 +29,9 @@ var B = (function (_super) { __extends(B, _super); // Ensure 'value' is of type 'number (and not '{}') by using its 'toExponential()' method. function B() { - _super.call(this, function (value) { return String(value.toExponential()); }); + _super.call(this, function (value) { + return String(value.toExponential()); + }); } return B; })(A); diff --git a/tests/baselines/reference/superCallParameterContextualTyping2.js b/tests/baselines/reference/superCallParameterContextualTyping2.js index 61e8b94f00f..cfd2c452ada 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping2.js +++ b/tests/baselines/reference/superCallParameterContextualTyping2.js @@ -28,7 +28,9 @@ var C = (function (_super) { __extends(C, _super); // Ensure 'value' is not of type 'any' by invoking it with type arguments. function C() { - _super.call(this, function (value) { return String(value()); }); + _super.call(this, function (value) { + return String(value()); + }); } return C; })(A); diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index 2928793feb6..e714a4db191 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -43,7 +43,8 @@ var Base = (function () { } return Base; })(); -function v() { } +function v() { +} var Derived = (function (_super) { __extends(Derived, _super); //super call in class constructor of derived type diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 0c19e365d92..912bfab349b 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -30,8 +30,10 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { }; - C.prototype.bar = function () { }; + C.prototype.foo = function () { + }; + C.prototype.bar = function () { + }; return C; })(); var Base = (function () { @@ -47,7 +49,8 @@ var Derived = (function (_super) { _super.call(this); bar(); } - try { } + try { + } catch (e) { _super.call(this); } diff --git a/tests/baselines/reference/superErrors.js b/tests/baselines/reference/superErrors.js index ce49da10687..2dc2db1a3d4 100644 --- a/tests/baselines/reference/superErrors.js +++ b/tests/baselines/reference/superErrors.js @@ -61,8 +61,16 @@ var __extends = this.__extends || function (d, b) { function foo() { // super in a non class context var x = super.; - var y = function () { return super.; }; - var z = function () { return function () { return function () { return super.; }; }; }; + var y = function () { + return super.; + }; + var z = function () { + return function () { + return function () { + return super.; + }; + }; + }; } var User = (function () { function User() { @@ -84,27 +92,47 @@ var RegisteredUser = (function (_super) { } // super call in a lambda in an inner function in a constructor function inner2() { - var x = function () { return super.sayHello.call(this); }; + var x = function () { + return super.sayHello.call(this); + }; } // super call in a lambda in a function expression in a constructor - (function () { return function () { return super.; }; })(); + (function () { + return function () { + return super.; + }; + })(); } RegisteredUser.prototype.sayHello = function () { // super call in a method _super.prototype.sayHello.call(this); // super call in a lambda in an inner function in a method function inner() { - var x = function () { return super.sayHello.call(this); }; + var x = function () { + return super.sayHello.call(this); + }; } // super call in a lambda in a function expression in a constructor - (function () { return function () { return super.; }; })(); + (function () { + return function () { + return super.; + }; + })(); }; RegisteredUser.staticFunction = function () { var _this = this; // super in static functions var s = _super.; - var x = function () { return _super.; }; - var y = function () { return function () { return function () { return _super.; }; }; }; + var x = function () { + return _super.; + }; + var y = function () { + return function () { + return function () { + return _super.; + }; + }; + }; }; return RegisteredUser; })(User); diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index 1b9085ec266..f94c0511277 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.m = function () { }; + A.prototype.m = function () { + }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/superInLambdas.js b/tests/baselines/reference/superInLambdas.js index 10c489f1b40..f7e3c4706c4 100644 --- a/tests/baselines/reference/superInLambdas.js +++ b/tests/baselines/reference/superInLambdas.js @@ -92,14 +92,18 @@ var RegisteredUser = (function (_super) { // super call in a constructor _super.prototype.sayHello.call(this); // super call in a lambda in a constructor - var x = function () { return _super.prototype.sayHello.call(_this); }; + var x = function () { + return _super.prototype.sayHello.call(_this); + }; } RegisteredUser.prototype.sayHello = function () { var _this = this; // super call in a method _super.prototype.sayHello.call(this); // super call in a lambda in a method - var x = function () { return _super.prototype.sayHello.call(_this); }; + var x = function () { + return _super.prototype.sayHello.call(_this); + }; }; return RegisteredUser; })(User); @@ -110,12 +114,24 @@ var RegisteredUser2 = (function (_super) { _super.call(this); this.name = "Joe"; // super call in a nested lambda in a constructor - var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; + var x = function () { + return function () { + return function () { + return _super.prototype.sayHello.call(_this); + }; + }; + }; } RegisteredUser2.prototype.sayHello = function () { var _this = this; // super call in a nested lambda in a method - var x = function () { return function () { return function () { return _super.prototype.sayHello.call(_this); }; }; }; + var x = function () { + return function () { + return function () { + return _super.prototype.sayHello.call(_this); + }; + }; + }; }; return RegisteredUser2; })(User); @@ -126,12 +142,24 @@ var RegisteredUser3 = (function (_super) { _super.call(this); this.name = "Sam"; // super property in a nested lambda in a constructor - var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; + var superName = function () { + return function () { + return function () { + return _super.prototype.name; + }; + }; + }; } RegisteredUser3.prototype.sayHello = function () { var _this = this; // super property in a nested lambda in a method - var superName = function () { return function () { return function () { return _super.prototype.name; }; }; }; + var superName = function () { + return function () { + return function () { + return _super.prototype.name; + }; + }; + }; }; return RegisteredUser3; })(User); @@ -142,12 +170,20 @@ var RegisteredUser4 = (function (_super) { _super.call(this); this.name = "Mark"; // super in a nested lambda in a constructor - var x = function () { return function () { return _super.prototype.; }; }; + var x = function () { + return function () { + return _super.prototype.; + }; + }; } RegisteredUser4.prototype.sayHello = function () { var _this = this; // super in a nested lambda in a method - var x = function () { return function () { return _super.prototype.; }; }; + var x = function () { + return function () { + return _super.prototype.; + }; + }; }; return RegisteredUser4; })(User); diff --git a/tests/baselines/reference/superNewCall1.js b/tests/baselines/reference/superNewCall1.js index d9b74ac5080..b0ec9899a52 100644 --- a/tests/baselines/reference/superNewCall1.js +++ b/tests/baselines/reference/superNewCall1.js @@ -28,7 +28,9 @@ var A = (function () { var B = (function (_super) { __extends(B, _super); function B() { - new _super.prototype(function (value) { return String(value); }); + new _super.prototype(function (value) { + return String(value); + }); } return B; })(A); diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index a5419aaf36e..a9ee2352c76 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -45,15 +45,22 @@ var __extends = this.__extends || function (d, b) { }; var MyBase = (function () { function MyBase() { - this.m2 = function () { }; + this.m2 = function () { + }; this.d1 = 42; this.d2 = 42; } - MyBase.prototype.m1 = function (a) { return a; }; - MyBase.prototype.p1 = function () { }; + MyBase.prototype.m1 = function (a) { + return a; + }; + MyBase.prototype.p1 = function () { + }; Object.defineProperty(MyBase.prototype, "value", { - get: function () { return 0; }, - set: function (v) { }, + get: function () { + return 0; + }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -72,7 +79,9 @@ var MyDerived = (function (_super) { _super.prototype.p1.call(this); // Should error, private not public instance member function var l1 = _super.prototype.d1; // Should error, instance data property not a public instance member function var l1 = _super.prototype.d2; // Should error, instance data property not a public instance member function - _super.prototype.m1 = function (a) { return ""; }; // Should be allowed, we will not restrict assignment + _super.prototype.m1 = function (a) { + return ""; + }; // Should be allowed, we will not restrict assignment _super.prototype.value = 0; // Should error, instance data property not a public instance member function var z = _super.prototype.value; // Should error, instance data property not a public instance member function }; diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index a0a52526f93..8b1e855e0a3 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -37,7 +37,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { }; + C.prototype.foo = function () { + }; Object.defineProperty(C.prototype, "x", { get: function () { return 1; @@ -45,7 +46,8 @@ var C = (function () { enumerable: true, configurable: true }); - C.prototype.bar = function () { }; + C.prototype.bar = function () { + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index b906f1b0a8b..98beb078e2f 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -37,7 +37,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.foo = function () { }; + C.foo = function () { + }; Object.defineProperty(C.prototype, "x", { get: function () { return 1; @@ -45,7 +46,8 @@ var C = (function () { enumerable: true, configurable: true }); - C.bar = function () { }; + C.bar = function () { + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superPropertyAccessNoError.js b/tests/baselines/reference/superPropertyAccessNoError.js index e49a2c6b719..086ead2e16d 100644 --- a/tests/baselines/reference/superPropertyAccessNoError.js +++ b/tests/baselines/reference/superPropertyAccessNoError.js @@ -95,7 +95,9 @@ var SomeDerivedClass = (function (_super) { var _this = this; var x = _super.prototype.func.call(this); var x; - var y = function () { return _super.prototype.func.call(_this); }; + var y = function () { + return _super.prototype.func.call(_this); + }; }; Object.defineProperty(SomeDerivedClass.prototype, "a", { get: function () { diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index ef228a3ba20..8277fe0506e 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -23,7 +23,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { + }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js index 7fd55d221ab..48ae609cdc6 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.js @@ -52,7 +52,9 @@ var ObjectLiteral; var F = (function () { function F() { } - F.prototype.test = function () { return ""; }; + F.prototype.test = function () { + return ""; + }; return F; })(); var SuperObjectTest = (function (_super) { diff --git a/tests/baselines/reference/switchAssignmentCompat.js b/tests/baselines/reference/switchAssignmentCompat.js index 1e6792ee378..4743e5d7eb3 100644 --- a/tests/baselines/reference/switchAssignmentCompat.js +++ b/tests/baselines/reference/switchAssignmentCompat.js @@ -13,5 +13,6 @@ var Foo = (function () { return Foo; })(); switch (0) { - case Foo: break; // Error expected + case Foo: + break; // Error expected } diff --git a/tests/baselines/reference/switchBreakStatements.js b/tests/baselines/reference/switchBreakStatements.js index 534f025e2f5..810c9909233 100644 --- a/tests/baselines/reference/switchBreakStatements.js +++ b/tests/baselines/reference/switchBreakStatements.js @@ -91,7 +91,8 @@ SEVEN: switch ('') { break SEVEN; EIGHT: switch ('') { case 'a': - var fn = function () { }; + var fn = function () { + }; break EIGHT; } } diff --git a/tests/baselines/reference/switchCasesExpressionTypeMismatch.js b/tests/baselines/reference/switchCasesExpressionTypeMismatch.js index ca354779be1..546d03dec92 100644 --- a/tests/baselines/reference/switchCasesExpressionTypeMismatch.js +++ b/tests/baselines/reference/switchCasesExpressionTypeMismatch.js @@ -25,16 +25,24 @@ var Foo = (function () { return Foo; })(); switch (0) { - case Foo: break; // Error - case "sss": break; // Error - case 123: break; // No Error - case true: break; // Error + case Foo: + break; // Error + case "sss": + break; // Error + case 123: + break; // No Error + case true: + break; // Error } var s = 0; // No error for all switch (s) { - case Foo: break; - case "sss": break; - case 123: break; - case true: break; + case Foo: + break; + case "sss": + break; + case 123: + break; + case true: + break; } diff --git a/tests/baselines/reference/switchFallThroughs.js b/tests/baselines/reference/switchFallThroughs.js index 53f221bd467..b38c6b6f0ab 100644 --- a/tests/baselines/reference/switchFallThroughs.js +++ b/tests/baselines/reference/switchFallThroughs.js @@ -26,9 +26,10 @@ function R1(index) { var a = 'a'; return a; case 3: - case 4: { - return 'b'; - } + case 4: + { + return 'b'; + } case 5: default: return 'c'; diff --git a/tests/baselines/reference/switchStatements.js b/tests/baselines/reference/switchStatements.js index 6348ca62e78..699871d9dd2 100644 --- a/tests/baselines/reference/switchStatements.js +++ b/tests/baselines/reference/switchStatements.js @@ -81,13 +81,21 @@ switch (x) { case /[a-z]/: case []: case {}: - case { id: 12 }: - case ['a']: + case { + id: 12 + }: + case [ + 'a' + ]: case typeof x: case typeof M: case M.fn(1): - case function (x) { return ''; }: - case (function (x) { return ''; })(2): + case function (x) { + return ''; + }: + case (function (x) { + return ''; + })(2): default: } // basic assignable check, rest covered in tests for 'assignement compatibility' @@ -105,7 +113,10 @@ var D = (function (_super) { })(C); switch (new C()) { case new D(): - case { id: 12, name: '' }: + case { + id: 12, + name: '' + }: case new C(): } switch ('') { @@ -128,11 +139,19 @@ switch ([]) { } switch ({}) { } -switch ({ id: 12 }) { +switch ({ + id: 12 +}) { } -switch (['a']) { +switch ([ + 'a' +]) { } -switch (function (x) { return ''; }) { +switch (function (x) { + return ''; +}) { } -switch ((function (x) { return ''; })(1)) { +switch ((function (x) { + return ''; +})(1)) { } diff --git a/tests/baselines/reference/switchStatementsWithMultipleDefaults.js b/tests/baselines/reference/switchStatementsWithMultipleDefaults.js index a17abe5711d..09a1a70a5d9 100644 --- a/tests/baselines/reference/switchStatementsWithMultipleDefaults.js +++ b/tests/baselines/reference/switchStatementsWithMultipleDefaults.js @@ -56,7 +56,8 @@ switch (x) { default: // Error, third 'default' clause default: // Error, fourth 'default' clause. // Errors on fifth-seventh - default: return; + default: + return; default: default: } diff --git a/tests/baselines/reference/symbolDeclarationEmit10.js b/tests/baselines/reference/symbolDeclarationEmit10.js index 0c46d8750e9..7ace6617db5 100644 --- a/tests/baselines/reference/symbolDeclarationEmit10.js +++ b/tests/baselines/reference/symbolDeclarationEmit10.js @@ -6,8 +6,11 @@ var obj = { //// [symbolDeclarationEmit10.js] var obj = { - get [Symbol.isConcatSpreadable]() { return ''; }, - set [Symbol.isConcatSpreadable](x) { } + get [Symbol.isConcatSpreadable]() { + return ''; + }, + set [Symbol.isConcatSpreadable](x) { + } }; diff --git a/tests/baselines/reference/symbolDeclarationEmit11.js b/tests/baselines/reference/symbolDeclarationEmit11.js index e5822104bf8..c9c819eefa2 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.js +++ b/tests/baselines/reference/symbolDeclarationEmit11.js @@ -10,10 +10,14 @@ class C { var C = (function () { function C() { } - C[Symbol.toPrimitive] = function () { }; + C[Symbol.toPrimitive] = function () { + }; Object.defineProperty(C, Symbol.isRegExp, { - get: function () { return ""; }, - set: function (x) { }, + get: function () { + return ""; + }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/symbolDeclarationEmit12.js b/tests/baselines/reference/symbolDeclarationEmit12.js index 68a256bd39d..49ff8b35976 100644 --- a/tests/baselines/reference/symbolDeclarationEmit12.js +++ b/tests/baselines/reference/symbolDeclarationEmit12.js @@ -18,13 +18,17 @@ var M; var C = (function () { function C() { } - C.prototype[Symbol.toPrimitive] = function (x) { }; + C.prototype[Symbol.toPrimitive] = function (x) { + }; C.prototype[Symbol.isConcatSpreadable] = function () { return undefined; }; Object.defineProperty(C.prototype, Symbol.isRegExp, { - get: function () { return undefined; }, - set: function (x) { }, + get: function () { + return undefined; + }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/symbolDeclarationEmit13.js b/tests/baselines/reference/symbolDeclarationEmit13.js index acf470ffce1..51b6edcece5 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.js +++ b/tests/baselines/reference/symbolDeclarationEmit13.js @@ -9,12 +9,15 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, Symbol.isRegExp, { - get: function () { return ""; }, + get: function () { + return ""; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, Symbol.toStringTag, { - set: function (x) { }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/symbolDeclarationEmit14.js b/tests/baselines/reference/symbolDeclarationEmit14.js index 64330c6ce92..d81bc329927 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.js +++ b/tests/baselines/reference/symbolDeclarationEmit14.js @@ -9,12 +9,16 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, Symbol.isRegExp, { - get: function () { return ""; }, + get: function () { + return ""; + }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, Symbol.toStringTag, { - get: function () { return ""; }, + get: function () { + return ""; + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/symbolDeclarationEmit3.js b/tests/baselines/reference/symbolDeclarationEmit3.js index e3b22d883c8..6d06c09bd69 100644 --- a/tests/baselines/reference/symbolDeclarationEmit3.js +++ b/tests/baselines/reference/symbolDeclarationEmit3.js @@ -9,7 +9,8 @@ class C { var C = (function () { function C() { } - C.prototype[Symbol.isRegExp] = function (x) { }; + C.prototype[Symbol.isRegExp] = function (x) { + }; return C; })(); diff --git a/tests/baselines/reference/symbolDeclarationEmit4.js b/tests/baselines/reference/symbolDeclarationEmit4.js index cfe3a14122d..cd3fc53a5bb 100644 --- a/tests/baselines/reference/symbolDeclarationEmit4.js +++ b/tests/baselines/reference/symbolDeclarationEmit4.js @@ -9,8 +9,11 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, Symbol.isRegExp, { - get: function () { return ""; }, - set: function (x) { }, + get: function () { + return ""; + }, + set: function (x) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/symbolDeclarationEmit9.js b/tests/baselines/reference/symbolDeclarationEmit9.js index d38171767a5..8cdb7173144 100644 --- a/tests/baselines/reference/symbolDeclarationEmit9.js +++ b/tests/baselines/reference/symbolDeclarationEmit9.js @@ -5,7 +5,8 @@ var obj = { //// [symbolDeclarationEmit9.js] var obj = { - [Symbol.isConcatSpreadable]() { } + [Symbol.isConcatSpreadable]() { + } }; diff --git a/tests/baselines/reference/symbolProperty1.js b/tests/baselines/reference/symbolProperty1.js index 0117dd3b1c2..1537883f4ec 100644 --- a/tests/baselines/reference/symbolProperty1.js +++ b/tests/baselines/reference/symbolProperty1.js @@ -12,7 +12,8 @@ var x = { var s; var x = { [s]: 0, - [s]() { }, + [s]() { + }, get [s]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty18.js b/tests/baselines/reference/symbolProperty18.js index 1d0a57e7b50..ff69588be31 100644 --- a/tests/baselines/reference/symbolProperty18.js +++ b/tests/baselines/reference/symbolProperty18.js @@ -12,8 +12,11 @@ i[Symbol.toPrimitive] = false; //// [symbolProperty18.js] var i = { [Symbol.iterator]: 0, - [Symbol.toStringTag]() { return ""; }, - set [Symbol.toPrimitive](p) { } + [Symbol.toStringTag]() { + return ""; + }, + set [Symbol.toPrimitive](p) { + } }; var it = i[Symbol.iterator]; var str = i[Symbol.toStringTag](); diff --git a/tests/baselines/reference/symbolProperty19.js b/tests/baselines/reference/symbolProperty19.js index 5ec7968218a..d4bfd0dc7c7 100644 --- a/tests/baselines/reference/symbolProperty19.js +++ b/tests/baselines/reference/symbolProperty19.js @@ -9,8 +9,14 @@ var str = i[Symbol.toStringTag](); //// [symbolProperty19.js] var i = { - [Symbol.iterator]: { p: null }, - [Symbol.toStringTag]() { return { p: undefined }; } + [Symbol.iterator]: { + p: null + }, + [Symbol.toStringTag]() { + return { + p: undefined + }; + } }; var it = i[Symbol.iterator]; var str = i[Symbol.toStringTag](); diff --git a/tests/baselines/reference/symbolProperty2.js b/tests/baselines/reference/symbolProperty2.js index 0158366f9d5..5c0f89b0257 100644 --- a/tests/baselines/reference/symbolProperty2.js +++ b/tests/baselines/reference/symbolProperty2.js @@ -12,7 +12,8 @@ var x = { var s = Symbol(); var x = { [s]: 0, - [s]() { }, + [s]() { + }, get [s]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty20.js b/tests/baselines/reference/symbolProperty20.js index dd60a87cbea..cfb763dc207 100644 --- a/tests/baselines/reference/symbolProperty20.js +++ b/tests/baselines/reference/symbolProperty20.js @@ -12,5 +12,7 @@ var i: I = { //// [symbolProperty20.js] var i = { [Symbol.iterator]: s => s, - [Symbol.toStringTag](n) { return n; } + [Symbol.toStringTag](n) { + return n; + } }; diff --git a/tests/baselines/reference/symbolProperty22.js b/tests/baselines/reference/symbolProperty22.js index d4609c74d36..19989106e56 100644 --- a/tests/baselines/reference/symbolProperty22.js +++ b/tests/baselines/reference/symbolProperty22.js @@ -8,4 +8,6 @@ declare function foo(p1: T, p2: I): U; foo("", { [Symbol.unscopables]: s => s.length }); //// [symbolProperty22.js] -foo("", { [Symbol.unscopables]: s => s.length }); +foo("", { + [Symbol.unscopables]: s => s.length +}); diff --git a/tests/baselines/reference/symbolProperty28.js b/tests/baselines/reference/symbolProperty28.js index 219a192e381..57c826cb7ab 100644 --- a/tests/baselines/reference/symbolProperty28.js +++ b/tests/baselines/reference/symbolProperty28.js @@ -21,7 +21,9 @@ var C1 = (function () { function C1() { } C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; + return { + x: "" + }; }; return C1; })(); diff --git a/tests/baselines/reference/symbolProperty29.js b/tests/baselines/reference/symbolProperty29.js index f7fee99f6a1..da6afdc6420 100644 --- a/tests/baselines/reference/symbolProperty29.js +++ b/tests/baselines/reference/symbolProperty29.js @@ -11,7 +11,9 @@ var C1 = (function () { function C1() { } C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; + return { + x: "" + }; }; return C1; })(); diff --git a/tests/baselines/reference/symbolProperty3.js b/tests/baselines/reference/symbolProperty3.js index dda9ca23d32..6159b10f9f3 100644 --- a/tests/baselines/reference/symbolProperty3.js +++ b/tests/baselines/reference/symbolProperty3.js @@ -12,7 +12,8 @@ var x = { var s = Symbol; var x = { [s]: 0, - [s]() { }, + [s]() { + }, get [s]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty30.js b/tests/baselines/reference/symbolProperty30.js index bdb108015cf..af151e0efd5 100644 --- a/tests/baselines/reference/symbolProperty30.js +++ b/tests/baselines/reference/symbolProperty30.js @@ -11,7 +11,9 @@ var C1 = (function () { function C1() { } C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; + return { + x: "" + }; }; return C1; })(); diff --git a/tests/baselines/reference/symbolProperty31.js b/tests/baselines/reference/symbolProperty31.js index cf532774652..e8388225dd7 100644 --- a/tests/baselines/reference/symbolProperty31.js +++ b/tests/baselines/reference/symbolProperty31.js @@ -19,7 +19,9 @@ var C1 = (function () { function C1() { } C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; + return { + x: "" + }; }; return C1; })(); diff --git a/tests/baselines/reference/symbolProperty32.js b/tests/baselines/reference/symbolProperty32.js index 73e4bffdc01..b544c60da7e 100644 --- a/tests/baselines/reference/symbolProperty32.js +++ b/tests/baselines/reference/symbolProperty32.js @@ -19,7 +19,9 @@ var C1 = (function () { function C1() { } C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; + return { + x: "" + }; }; return C1; })(); diff --git a/tests/baselines/reference/symbolProperty33.js b/tests/baselines/reference/symbolProperty33.js index f5a08010338..082c0fe7e65 100644 --- a/tests/baselines/reference/symbolProperty33.js +++ b/tests/baselines/reference/symbolProperty33.js @@ -21,7 +21,9 @@ var C1 = (function (_super) { _super.apply(this, arguments); } C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; + return { + x: "" + }; }; return C1; })(C2); diff --git a/tests/baselines/reference/symbolProperty34.js b/tests/baselines/reference/symbolProperty34.js index 5b25f487fbf..de7d722227b 100644 --- a/tests/baselines/reference/symbolProperty34.js +++ b/tests/baselines/reference/symbolProperty34.js @@ -21,7 +21,9 @@ var C1 = (function (_super) { _super.apply(this, arguments); } C1.prototype[Symbol.toStringTag] = function () { - return { x: "" }; + return { + x: "" + }; }; return C1; })(C2); diff --git a/tests/baselines/reference/symbolProperty4.js b/tests/baselines/reference/symbolProperty4.js index 6072d6bbf72..be7cdab5f85 100644 --- a/tests/baselines/reference/symbolProperty4.js +++ b/tests/baselines/reference/symbolProperty4.js @@ -10,7 +10,8 @@ var x = { //// [symbolProperty4.js] var x = { [Symbol()]: 0, - [Symbol()]() { }, + [Symbol()]() { + }, get [Symbol()]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty48.js b/tests/baselines/reference/symbolProperty48.js index 48717470f2f..b0dc2b46dba 100644 --- a/tests/baselines/reference/symbolProperty48.js +++ b/tests/baselines/reference/symbolProperty48.js @@ -14,7 +14,8 @@ var M; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); })(M || (M = {})); diff --git a/tests/baselines/reference/symbolProperty49.js b/tests/baselines/reference/symbolProperty49.js index 6c115a89ae4..ea6e6f2c523 100644 --- a/tests/baselines/reference/symbolProperty49.js +++ b/tests/baselines/reference/symbolProperty49.js @@ -14,7 +14,8 @@ var M; var C = (function () { function C() { } - C.prototype[M.Symbol.iterator] = function () { }; + C.prototype[M.Symbol.iterator] = function () { + }; return C; })(); })(M || (M = {})); diff --git a/tests/baselines/reference/symbolProperty5.js b/tests/baselines/reference/symbolProperty5.js index c7c88681f8a..9f0ff3d688f 100644 --- a/tests/baselines/reference/symbolProperty5.js +++ b/tests/baselines/reference/symbolProperty5.js @@ -10,7 +10,8 @@ var x = { //// [symbolProperty5.js] var x = { [Symbol.iterator]: 0, - [Symbol.isRegExp]() { }, + [Symbol.isRegExp]() { + }, get [Symbol.toStringTag]() { return 0; } diff --git a/tests/baselines/reference/symbolProperty50.js b/tests/baselines/reference/symbolProperty50.js index 61ded053938..0a668e95509 100644 --- a/tests/baselines/reference/symbolProperty50.js +++ b/tests/baselines/reference/symbolProperty50.js @@ -13,7 +13,8 @@ var M; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); })(M || (M = {})); diff --git a/tests/baselines/reference/symbolProperty51.js b/tests/baselines/reference/symbolProperty51.js index 246dbaaa173..b3b9902fcd6 100644 --- a/tests/baselines/reference/symbolProperty51.js +++ b/tests/baselines/reference/symbolProperty51.js @@ -13,7 +13,8 @@ var M; var C = (function () { function C() { } - C.prototype[Symbol.iterator] = function () { }; + C.prototype[Symbol.iterator] = function () { + }; return C; })(); })(M || (M = {})); diff --git a/tests/baselines/reference/symbolProperty6.js b/tests/baselines/reference/symbolProperty6.js index aee61b97435..114999dc873 100644 --- a/tests/baselines/reference/symbolProperty6.js +++ b/tests/baselines/reference/symbolProperty6.js @@ -13,7 +13,8 @@ var C = (function () { function C() { this[Symbol.iterator] = 0; } - C.prototype[Symbol.isRegExp] = function () { }; + C.prototype[Symbol.isRegExp] = function () { + }; Object.defineProperty(C.prototype, Symbol.toStringTag, { get: function () { return 0; diff --git a/tests/baselines/reference/symbolProperty7.js b/tests/baselines/reference/symbolProperty7.js index 781113572a1..42d19616ce3 100644 --- a/tests/baselines/reference/symbolProperty7.js +++ b/tests/baselines/reference/symbolProperty7.js @@ -13,7 +13,8 @@ var C = (function () { function C() { this[Symbol()] = 0; } - C.prototype[Symbol()] = function () { }; + C.prototype[Symbol()] = function () { + }; Object.defineProperty(C.prototype, Symbol(), { get: function () { return 0; diff --git a/tests/baselines/reference/symbolType13.js b/tests/baselines/reference/symbolType13.js index afd62079bb5..56aef2cc8e6 100644 --- a/tests/baselines/reference/symbolType13.js +++ b/tests/baselines/reference/symbolType13.js @@ -9,6 +9,9 @@ for (var y in s) { } //// [symbolType13.js] var s = Symbol(); var x; -for (s in {}) { } -for (x in s) { } -for (var y in s) { } +for (s in {}) { +} +for (x in s) { +} +for (var y in s) { +} diff --git a/tests/baselines/reference/taggedTemplateContextualTyping1.js b/tests/baselines/reference/taggedTemplateContextualTyping1.js index 17618b50e8b..173d0f56bb7 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping1.js +++ b/tests/baselines/reference/taggedTemplateContextualTyping1.js @@ -26,7 +26,28 @@ function tempTag1(...rest) { // Otherwise, the arrow functions' parameters will be typed as 'any', // and it is an error to invoke an any-typed value with type arguments, // so this test will error. -tempTag1 `${x => { x(undefined); return x; }}${10}`; -tempTag1 `${x => { x(undefined); return x; }}${y => { y(undefined); return y; }}${10}`; -tempTag1 `${x => { x(undefined); return x; }}${(y) => { y(undefined); return y; }}${undefined}`; -tempTag1 `${(x) => { x(undefined); return x; }}${y => { y(undefined); return y; }}${undefined}`; +tempTag1 `${x => { + x(undefined); + return x; +}}${10}`; +tempTag1 `${x => { + x(undefined); + return x; +}}${y => { + y(undefined); + return y; +}}${10}`; +tempTag1 `${x => { + x(undefined); + return x; +}}${(y) => { + y(undefined); + return y; +}}${undefined}`; +tempTag1 `${(x) => { + x(undefined); + return x; +}}${y => { + y(undefined); + return y; +}}${undefined}`; diff --git a/tests/baselines/reference/taggedTemplateContextualTyping2.js b/tests/baselines/reference/taggedTemplateContextualTyping2.js index 8adea53f470..1eed600da4c 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping2.js +++ b/tests/baselines/reference/taggedTemplateContextualTyping2.js @@ -25,6 +25,18 @@ function tempTag2(...rest) { // Otherwise, the arrow functions' parameters will be typed as 'any', // and it is an error to invoke an any-typed value with type arguments, // so this test will error. -tempTag2 `${x => { x(undefined); return x; }}${0}`; -tempTag2 `${x => { x(undefined); return x; }}${y => { y(null); return y; }}${"hello"}`; -tempTag2 `${x => { x(undefined); return x; }}${undefined}${"hello"}`; +tempTag2 `${x => { + x(undefined); + return x; +}}${0}`; +tempTag2 `${x => { + x(undefined); + return x; +}}${y => { + y(null); + return y; +}}${"hello"}`; +tempTag2 `${x => { + x(undefined); + return x; +}}${undefined}${"hello"}`; diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js index 9d3531c2667..663969caefc 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js @@ -95,48 +95,115 @@ var arr: any[]; //// [taggedTemplateStringsTypeArgumentInference.js] // Generic tag with one parameter -function noParams(n) { } +function noParams(n) { +} (_a = [""], _a.raw = [""], noParams(_a)); // Generic tag with parameter which does not use type parameter -function noGenericParams(n) { } +function noGenericParams(n) { +} (_b = [""], _b.raw = [""], noGenericParams(_b)); // Generic tag with multiple type parameters and only one used in parameter type annotation -function someGenerics1a(n, m) { } +function someGenerics1a(n, m) { +} (_c = ["", ""], _c.raw = ["", ""], someGenerics1a(_c, 3)); -function someGenerics1b(n, m) { } +function someGenerics1b(n, m) { +} (_d = ["", ""], _d.raw = ["", ""], someGenerics1b(_d, 3)); // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs, n) { } -(_e = ["", ""], _e.raw = ["", ""], someGenerics2a(_e, function (n) { return n; })); -function someGenerics2b(strs, n) { } -(_f = ["", ""], _f.raw = ["", ""], someGenerics2b(_f, function (n, x) { return n; })); +function someGenerics2a(strs, n) { +} +(_e = ["", ""], _e.raw = ["", ""], someGenerics2a(_e, function (n) { + return n; +})); +function someGenerics2b(strs, n) { +} +(_f = ["", ""], _f.raw = ["", ""], someGenerics2b(_f, function (n, x) { + return n; +})); // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs, producer) { } -(_g = ["", ""], _g.raw = ["", ""], someGenerics3(_g, function () { return ''; })); -(_h = ["", ""], _h.raw = ["", ""], someGenerics3(_h, function () { return undefined; })); -(_j = ["", ""], _j.raw = ["", ""], someGenerics3(_j, function () { return 3; })); +function someGenerics3(strs, producer) { +} +(_g = ["", ""], _g.raw = ["", ""], someGenerics3(_g, function () { + return ''; +})); +(_h = ["", ""], _h.raw = ["", ""], someGenerics3(_h, function () { + return undefined; +})); +(_j = ["", ""], _j.raw = ["", ""], someGenerics3(_j, function () { + return 3; +})); // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs, n, f) { } -(_k = ["", "", ""], _k.raw = ["", "", ""], someGenerics4(_k, 4, function () { return null; })); -(_l = ["", "", ""], _l.raw = ["", "", ""], someGenerics4(_l, '', function () { return 3; })); +function someGenerics4(strs, n, f) { +} +(_k = ["", "", ""], _k.raw = ["", "", ""], someGenerics4(_k, 4, function () { + return null; +})); +(_l = ["", "", ""], _l.raw = ["", "", ""], someGenerics4(_l, '', function () { + return 3; +})); (_m = ["", "", ""], _m.raw = ["", "", ""], someGenerics4(_m, null, null)); // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs, n, f) { } -(_n = ["", " ", ""], _n.raw = ["", " ", ""], someGenerics5(_n, 4, function () { return null; })); -(_o = ["", "", ""], _o.raw = ["", "", ""], someGenerics5(_o, '', function () { return 3; })); +function someGenerics5(strs, n, f) { +} +(_n = ["", " ", ""], _n.raw = ["", " ", ""], someGenerics5(_n, 4, function () { + return null; +})); +(_o = ["", "", ""], _o.raw = ["", "", ""], someGenerics5(_o, '', function () { + return 3; +})); (_p = ["", "", ""], _p.raw = ["", "", ""], someGenerics5(_p, null, null)); // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs, a, b, c) { } -(_q = ["", "", "", ""], _q.raw = ["", "", "", ""], someGenerics6(_q, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_r = ["", "", "", ""], _r.raw = ["", "", "", ""], someGenerics6(_r, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_s = ["", "", "", ""], _s.raw = ["", "", "", ""], someGenerics6(_s, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +function someGenerics6(strs, a, b, c) { +} +(_q = ["", "", "", ""], _q.raw = ["", "", "", ""], someGenerics6(_q, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); +(_r = ["", "", "", ""], _r.raw = ["", "", "", ""], someGenerics6(_r, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); +(_s = ["", "", "", ""], _s.raw = ["", "", "", ""], someGenerics6(_s, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs, a, b, c) { } -(_t = ["", "", "", ""], _t.raw = ["", "", "", ""], someGenerics7(_t, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_u = ["", "", "", ""], _u.raw = ["", "", "", ""], someGenerics7(_u, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_v = ["", "", "", ""], _v.raw = ["", "", "", ""], someGenerics7(_v, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +function someGenerics7(strs, a, b, c) { +} +(_t = ["", "", "", ""], _t.raw = ["", "", "", ""], someGenerics7(_t, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); +(_u = ["", "", "", ""], _u.raw = ["", "", "", ""], someGenerics7(_u, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); +(_v = ["", "", "", ""], _v.raw = ["", "", "", ""], someGenerics7(_v, function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +})); // Generic tag with argument of generic function type -function someGenerics8(strs, n) { return n; } +function someGenerics8(strs, n) { + return n; +} var x = (_w = ["", ""], _w.raw = ["", ""], someGenerics8(_w, someGenerics7)); (_x = ["", "", "", ""], _x.raw = ["", "", "", ""], x(_x, null, null, null)); // Generic tag with multiple parameters of generic type passed arguments with no best common type @@ -145,10 +212,22 @@ function someGenerics9(strs, a, b, c) { } var a9a = (_y = ["", "", "", ""], _y.raw = ["", "", "", ""], someGenerics9(_y, '', 0, [])); var a9a; -var a9e = (_z = ["", "", "", ""], _z.raw = ["", "", "", ""], someGenerics9(_z, undefined, { x: 6, z: new Date() }, { x: 6, y: '' })); +var a9e = (_z = ["", "", "", ""], _z.raw = ["", "", "", ""], someGenerics9(_z, undefined, { + x: 6, + z: new Date() +}, { + x: 6, + y: '' +})); var a9e; // Generic tag with multiple parameters of generic type passed arguments with a single best common type -var a9d = (_0 = ["", "", "", ""], _0.raw = ["", "", "", ""], someGenerics9(_0, { x: 3 }, { x: 6 }, { x: 6 })); +var a9d = (_0 = ["", "", "", ""], _0.raw = ["", "", "", ""], someGenerics9(_0, { + x: 3 +}, { + x: 6 +}, { + x: 6 +})); var a9d; // Generic tag with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js index 2f57882b4b7..1fdeb3e4b38 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js @@ -94,48 +94,61 @@ var arr: any[]; //// [taggedTemplateStringsTypeArgumentInferenceES6.js] // Generic tag with one parameter -function noParams(n) { } +function noParams(n) { +} noParams ``; // Generic tag with parameter which does not use type parameter -function noGenericParams(n) { } +function noGenericParams(n) { +} noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation -function someGenerics1a(n, m) { } +function someGenerics1a(n, m) { +} someGenerics1a `${3}`; -function someGenerics1b(n, m) { } +function someGenerics1b(n, m) { +} someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs, n) { } +function someGenerics2a(strs, n) { +} someGenerics2a `${(n) => n}`; -function someGenerics2b(strs, n) { } +function someGenerics2b(strs, n) { +} someGenerics2b `${(n, x) => n}`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs, producer) { } +function someGenerics3(strs, producer) { +} someGenerics3 `${() => ''}`; someGenerics3 `${() => undefined}`; someGenerics3 `${() => 3}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs, n, f) { } +function someGenerics4(strs, n, f) { +} someGenerics4 `${4}${() => null}`; someGenerics4 `${''}${() => 3}`; someGenerics4 `${null}${null}`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs, n, f) { } +function someGenerics5(strs, n, f) { +} someGenerics5 `${4} ${() => null}`; someGenerics5 `${''}${() => 3}`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs, a, b, c) { } +function someGenerics6(strs, a, b, c) { +} someGenerics6 `${n => n}${n => n}${n => n}`; someGenerics6 `${n => n}${n => n}${n => n}`; someGenerics6 `${(n) => n}${(n) => n}${(n) => n}`; // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs, a, b, c) { } +function someGenerics7(strs, a, b, c) { +} someGenerics7 `${n => n}${n => n}${n => n}`; someGenerics7 `${n => n}${n => n}${n => n}`; someGenerics7 `${(n) => n}${(n) => n}${(n) => n}`; // Generic tag with argument of generic function type -function someGenerics8(strs, n) { return n; } +function someGenerics8(strs, n) { + return n; +} var x = someGenerics8 `${someGenerics7}`; x `${null}${null}${null}`; // Generic tag with multiple parameters of generic type passed arguments with no best common type @@ -144,10 +157,22 @@ function someGenerics9(strs, a, b, c) { } var a9a = someGenerics9 `${''}${0}${[]}`; var a9a; -var a9e = someGenerics9 `${undefined}${{ x: 6, z: new Date() }}${{ x: 6, y: '' }}`; +var a9e = someGenerics9 `${undefined}${{ + x: 6, + z: new Date() +}}${{ + x: 6, + y: '' +}}`; var a9e; // Generic tag with multiple parameters of generic type passed arguments with a single best common type -var a9d = someGenerics9 `${{ x: 3 }}${{ x: 6 }}${{ x: 6 }}`; +var a9d = someGenerics9 `${{ + x: 3 +}}${{ + x: 6 +}}${{ + x: 6 +}}`; var a9d; // Generic tag with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js index 4b9df44d3f7..1840fed234b 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js @@ -74,11 +74,15 @@ fn5 `${ (n) => n.substr(0) }`; //// [taggedTemplateStringsWithOverloadResolution3.js] -function fn1() { return null; } +function fn1() { + return null; +} var s = (_a = ["", ""], _a.raw = ["", ""], fn1(_a, undefined)); // No candidate overloads found (_b = ["", ""], _b.raw = ["", ""], fn1(_b, {})); // Error -function fn2() { return undefined; } +function fn2() { + return undefined; +} var d1 = (_c = ["", "", ""], _c.raw = ["", "", ""], fn2(_c, 0, undefined)); // contextually typed var d2 = (_d = ["", "", ""], _d.raw = ["", "", ""], fn2(_d, 0, undefined)); // any d1.foo(); // error @@ -87,7 +91,9 @@ d2(); // no error (typed as any) (_e = ["", "", ""], _e.raw = ["", "", ""], fn2(_e, 0, '')); // OK // Generic and non-generic overload where non-generic overload is the only candidate (_f = ["", "", ""], _f.raw = ["", "", ""], fn2(_f, '', 0)); // OK -function fn3() { return null; } +function fn3() { + return null; +} var s = (_g = ["", ""], _g.raw = ["", ""], fn3(_g, 3)); var s = (_h = ["", "", "", ""], _h.raw = ["", "", "", ""], fn3(_h, '', 3, '')); var n = (_j = ["", "", "", ""], _j.raw = ["", "", "", ""], fn3(_j, 5, 5, 5)); @@ -98,7 +104,8 @@ var s = (_l = ["", "", "", ""], _l.raw = ["", "", "", ""], fn3(_l, '', '', '')); var n = (_m = ["", "", "", ""], _m.raw = ["", "", "", ""], fn3(_m, '', '', 3)); // Generic overloads with differing arity tagging with argument count that doesn't match any overload (_n = [""], _n.raw = [""], fn3(_n)); // Error -function fn4() { } +function fn4() { +} // Generic overloads with constraints tagged with types that satisfy the constraints (_o = ["", "", ""], _o.raw = ["", "", ""], fn4(_o, '', 3)); (_p = ["", "", ""], _p.raw = ["", "", ""], fn4(_p, 3, '')); @@ -109,7 +116,13 @@ function fn4() { } // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints (_t = ["", "", ""], _t.raw = ["", "", ""], fn4(_t, true, null)); (_u = ["", "", ""], _u.raw = ["", "", ""], fn4(_u, null, true)); -function fn5() { return undefined; } -(_v = ["", ""], _v.raw = ["", ""], fn5(_v, function (n) { return n.toFixed(); })); // will error; 'n' should have type 'string'. -(_w = ["", ""], _w.raw = ["", ""], fn5(_w, function (n) { return n.substr(0); })); +function fn5() { + return undefined; +} +(_v = ["", ""], _v.raw = ["", ""], fn5(_v, function (n) { + return n.toFixed(); +})); // will error; 'n' should have type 'string'. +(_w = ["", ""], _w.raw = ["", ""], fn5(_w, function (n) { + return n.substr(0); +})); var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js index 583770b9cd8..666974de447 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js @@ -73,11 +73,15 @@ fn5 `${ (n) => n.substr(0) }`; //// [taggedTemplateStringsWithOverloadResolution3_ES6.js] -function fn1() { return null; } +function fn1() { + return null; +} var s = fn1 `${undefined}`; // No candidate overloads found fn1 `${{}}`; // Error -function fn2() { return undefined; } +function fn2() { + return undefined; +} var d1 = fn2 `${0}${undefined}`; // contextually typed var d2 = fn2 `${0}${undefined}`; // any d1.foo(); // error @@ -86,7 +90,9 @@ d2(); // no error (typed as any) fn2 `${0}${''}`; // OK // Generic and non-generic overload where non-generic overload is the only candidate fn2 `${''}${0}`; // OK -function fn3() { return null; } +function fn3() { + return null; +} var s = fn3 `${3}`; var s = fn3 `${''}${3}${''}`; var n = fn3 `${5}${5}${5}`; @@ -97,7 +103,8 @@ var s = fn3 `${''}${''}${''}`; var n = fn3 `${''}${''}${3}`; // Generic overloads with differing arity tagging with argument count that doesn't match any overload fn3 ``; // Error -function fn4() { } +function fn4() { +} // Generic overloads with constraints tagged with types that satisfy the constraints fn4 `${''}${3}`; fn4 `${3}${''}`; @@ -108,6 +115,8 @@ fn4 `${null}${null}`; // Error // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4 `${true}${null}`; fn4 `${null}${true}`; -function fn5() { return undefined; } +function fn5() { + return undefined; +} fn5 `${(n) => n.toFixed()}`; // will error; 'n' should have type 'string'. fn5 `${(n) => n.substr(0)}`; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js index f7523eb9870..10a8f1f2a12 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js @@ -13,5 +13,7 @@ function foo() { rest[_i - 0] = arguments[_i]; } } -(_a = ["", ""], _a.raw = ["", ""], foo(_a, function (x) { x = "bad"; })); +(_a = ["", ""], _a.raw = ["", ""], foo(_a, function (x) { + x = "bad"; +})); var _a; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js index 7691b83b3bc..bc18a600458 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js @@ -8,4 +8,6 @@ foo `${function (x: number) { x = "bad"; } }`; //// [taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js] function foo(...rest) { } -foo `${function (x) { x = "bad"; }}`; +foo `${function (x) { + x = "bad"; +}}`; diff --git a/tests/baselines/reference/targetTypeArgs.js b/tests/baselines/reference/targetTypeArgs.js index 18dff375abe..cb227f81b40 100644 --- a/tests/baselines/reference/targetTypeArgs.js +++ b/tests/baselines/reference/targetTypeArgs.js @@ -18,10 +18,36 @@ foo(function(x) { x }); function foo(callback) { callback("hello"); } -foo(function (x) { x; }); -[1].forEach(function (v, i, a) { v; }); -["hello"].every(function (v, i, a) { return true; }); -[1].every(function (v, i, a) { return true; }); -[1].every(function (v, i, a) { return true; }); -["s"].every(function (v, i, a) { return true; }); -["s"].forEach(function (v, i, a) { v; }); +foo(function (x) { + x; +}); +[ + 1 +].forEach(function (v, i, a) { + v; +}); +[ + "hello" +].every(function (v, i, a) { + return true; +}); +[ + 1 +].every(function (v, i, a) { + return true; +}); +[ + 1 +].every(function (v, i, a) { + return true; +}); +[ + "s" +].every(function (v, i, a) { + return true; +}); +[ + "s" +].forEach(function (v, i, a) { + v; +}); diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index c886183bacf..d844354b154 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -25,18 +25,25 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function foo(x) { } +function foo(x) { +} var Foo = (function () { function Foo(x) { } return Foo; })(); -foo(function (s) { s = 5; }); // Error, can’t assign number to string -new Foo(function (s) { s = 5; }); // error, if types are applied correctly +foo(function (s) { + s = 5; +}); // Error, can’t assign number to string +new Foo(function (s) { + s = 5; +}); // error, if types are applied correctly var Bar = (function (_super) { __extends(Bar, _super); function Bar() { - _super.call(this, function (s) { s = 5; }); + _super.call(this, function (s) { + s = 5; + }); } return Bar; })(Foo); // error, if types are applied correctly diff --git a/tests/baselines/reference/targetTypeCalls.js b/tests/baselines/reference/targetTypeCalls.js index 168195216ca..302419a2693 100644 --- a/tests/baselines/reference/targetTypeCalls.js +++ b/tests/baselines/reference/targetTypeCalls.js @@ -6,7 +6,27 @@ var fra3: (v:any)=>string = function() { return function() { return function(v) var fra4: (v:any)=>void = function() { return function() { return function(v) {return v;};}(); }() // should work //// [targetTypeCalls.js] -var fra1 = function () { return function (v) { return v; }; }(); // should work -var fra2 = function () { return function () { return 0; }; }(); // should work -var fra3 = function () { return function () { return function (v) { return v; }; }(); }(); // should work -var fra4 = function () { return function () { return function (v) { return v; }; }(); }(); // should work +var fra1 = function () { + return function (v) { + return v; + }; +}(); // should work +var fra2 = function () { + return function () { + return 0; + }; +}(); // should work +var fra3 = function () { + return function () { + return function (v) { + return v; + }; + }(); +}(); // should work +var fra4 = function () { + return function () { + return function (v) { + return v; + }; + }(); +}(); // should work diff --git a/tests/baselines/reference/targetTypeCastTest.js b/tests/baselines/reference/targetTypeCastTest.js index 053aced7305..c9a30c6d685 100644 --- a/tests/baselines/reference/targetTypeCastTest.js +++ b/tests/baselines/reference/targetTypeCastTest.js @@ -28,8 +28,12 @@ function Point(x, y) { this.x = x; this.y = y; } -var add = function (x, y) { return x + y; }; +var add = function (x, y) { + return x + y; +}; var add2 = function (x, y) { return 0; }; -function add3(x, y) { x; } +function add3(x, y) { + x; +} diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.js b/tests/baselines/reference/targetTypeObjectLiteralToAny.js index fced520e09e..f6228f210f8 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.js +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.js @@ -15,6 +15,9 @@ function suggest() { var TypeScriptKeywords; var result; TypeScriptKeywords.forEach(function (keyword) { - result.push({ text: keyword, type: "keyword" }); // this should not cause a crash - push should be typed to any + result.push({ + text: keyword, + type: "keyword" + }); // this should not cause a crash - push should be typed to any }); } diff --git a/tests/baselines/reference/targetTypeTest1.js b/tests/baselines/reference/targetTypeTest1.js index 8f9657ee9d0..8c9156d1e0d 100644 --- a/tests/baselines/reference/targetTypeTest1.js +++ b/tests/baselines/reference/targetTypeTest1.js @@ -80,7 +80,9 @@ function Point(x, y) { this.x = x; this.y = y; } -function EF1(a, b) { return a + b; } +function EF1(a, b) { + return a + b; +} var x = EF1(1, 2); // Point.origin declared as type Point Point.origin = new Point(0, 0); @@ -108,10 +110,10 @@ function C(a, b) { this.a = a; this.b = b; } -C.prototype = - { a: 0, - b: 0, - C1M1: function (c, d) { - return (this.a + c) + (this.b + d); - } - }; +C.prototype = { + a: 0, + b: 0, + C1M1: function (c, d) { + return (this.a + c) + (this.b + d); + } +}; diff --git a/tests/baselines/reference/targetTypeTest2.js b/tests/baselines/reference/targetTypeTest2.js index 0ba82bc9cce..2d0a7dee464 100644 --- a/tests/baselines/reference/targetTypeTest2.js +++ b/tests/baselines/reference/targetTypeTest2.js @@ -13,8 +13,18 @@ function func2(stuff1:string, stuff2:number, stuff3:number) { //// [targetTypeTest2.js] // Test target typing for array literals and call expressions -var a = [1, 2, "3"]; -function func1(stuff) { return stuff; } -function func2(stuff1, stuff2, stuff3) { - return func1([stuff1, stuff2, stuff3]); +var a = [ + 1, + 2, + "3" +]; +function func1(stuff) { + return stuff; +} +function func2(stuff1, stuff2, stuff3) { + return func1([ + stuff1, + stuff2, + stuff3 + ]); } diff --git a/tests/baselines/reference/targetTypeTest3.js b/tests/baselines/reference/targetTypeTest3.js index 13972478582..199d998a11c 100644 --- a/tests/baselines/reference/targetTypeTest3.js +++ b/tests/baselines/reference/targetTypeTest3.js @@ -13,8 +13,18 @@ function func2(stuff1:string, stuff2:number, stuff3:number) { //// [targetTypeTest3.js] // Test target typing for array literals and call expressions -var a = [1, 2, "3"]; // should produce an error -function func1(stuff) { return stuff; } -function func2(stuff1, stuff2, stuff3) { - return func1([stuff1, stuff2, stuff3]); +var a = [ + 1, + 2, + "3" +]; // should produce an error +function func1(stuff) { + return stuff; +} +function func2(stuff1, stuff2, stuff3) { + return func1([ + stuff1, + stuff2, + stuff3 + ]); } diff --git a/tests/baselines/reference/targetTypeVoidFunc.js b/tests/baselines/reference/targetTypeVoidFunc.js index dba2086b0e1..9913b4bd491 100644 --- a/tests/baselines/reference/targetTypeVoidFunc.js +++ b/tests/baselines/reference/targetTypeVoidFunc.js @@ -9,7 +9,9 @@ var z = new (f1())(); //// [targetTypeVoidFunc.js] function f1() { - return function () { return; }; + return function () { + return; + }; } ; var x = f1(); diff --git a/tests/baselines/reference/targetTypingOnFunctions.js b/tests/baselines/reference/targetTypingOnFunctions.js index fad75a4bf6d..5b11a34ff4d 100644 --- a/tests/baselines/reference/targetTypingOnFunctions.js +++ b/tests/baselines/reference/targetTypingOnFunctions.js @@ -4,5 +4,9 @@ var fu: (s: string) => string = function (s) { return s.toLowerCase() }; var zu = fu = function (s) { return s.toLowerCase() }; //// [targetTypingOnFunctions.js] -var fu = function (s) { return s.toLowerCase(); }; -var zu = fu = function (s) { return s.toLowerCase(); }; +var fu = function (s) { + return s.toLowerCase(); +}; +var zu = fu = function (s) { + return s.toLowerCase(); +}; diff --git a/tests/baselines/reference/templateStringInArray.js b/tests/baselines/reference/templateStringInArray.js index 97d0b1a636b..175dc39f62c 100644 --- a/tests/baselines/reference/templateStringInArray.js +++ b/tests/baselines/reference/templateStringInArray.js @@ -2,4 +2,8 @@ var x = [1, 2, `abc${ 123 }def`]; //// [templateStringInArray.js] -var x = [1, 2, ("abc" + 123 + "def")]; +var x = [ + 1, + 2, + ("abc" + 123 + "def") +]; diff --git a/tests/baselines/reference/templateStringInArrowFunction.js b/tests/baselines/reference/templateStringInArrowFunction.js index 4c4890633e1..984c8673cb0 100644 --- a/tests/baselines/reference/templateStringInArrowFunction.js +++ b/tests/baselines/reference/templateStringInArrowFunction.js @@ -2,4 +2,6 @@ var x = x => `abc${ x }def`; //// [templateStringInArrowFunction.js] -var x = function (x) { return ("abc" + x + "def"); }; +var x = function (x) { + return ("abc" + x + "def"); +}; diff --git a/tests/baselines/reference/templateStringInEqualityChecks.js b/tests/baselines/reference/templateStringInEqualityChecks.js index f7573f8efd5..54f5fa610c2 100644 --- a/tests/baselines/reference/templateStringInEqualityChecks.js +++ b/tests/baselines/reference/templateStringInEqualityChecks.js @@ -5,7 +5,4 @@ var x = `abc${0}abc` === `abc` || "abc0abc" !== `abc${0}abc`; //// [templateStringInEqualityChecks.js] -var x = "abc" + 0 + "abc" === "abc" || - "abc" !== "abc" + 0 + "abc" && - "abc" + 0 + "abc" == "abc0abc" && - "abc0abc" !== "abc" + 0 + "abc"; +var x = "abc" + 0 + "abc" === "abc" || "abc" !== "abc" + 0 + "abc" && "abc" + 0 + "abc" == "abc0abc" && "abc0abc" !== "abc" + 0 + "abc"; diff --git a/tests/baselines/reference/templateStringInEqualityChecksES6.js b/tests/baselines/reference/templateStringInEqualityChecksES6.js index 9bb001d9dc7..317db1ab366 100644 --- a/tests/baselines/reference/templateStringInEqualityChecksES6.js +++ b/tests/baselines/reference/templateStringInEqualityChecksES6.js @@ -5,7 +5,4 @@ var x = `abc${0}abc` === `abc` || "abc0abc" !== `abc${0}abc`; //// [templateStringInEqualityChecksES6.js] -var x = `abc${0}abc` === `abc` || - `abc` !== `abc${0}abc` && - `abc${0}abc` == "abc0abc" && - "abc0abc" !== `abc${0}abc`; +var x = `abc${0}abc` === `abc` || `abc` !== `abc${0}abc` && `abc${0}abc` == "abc0abc" && "abc0abc" !== `abc${0}abc`; diff --git a/tests/baselines/reference/templateStringInInOperator.js b/tests/baselines/reference/templateStringInInOperator.js index c496e335dd4..6384c1096c6 100644 --- a/tests/baselines/reference/templateStringInInOperator.js +++ b/tests/baselines/reference/templateStringInInOperator.js @@ -2,4 +2,7 @@ var x = `${ "hi" }` in { hi: 10, hello: 20}; //// [templateStringInInOperator.js] -var x = "" + "hi" in { hi: 10, hello: 20 }; +var x = "" + "hi" in { + hi: 10, + hello: 20 +}; diff --git a/tests/baselines/reference/templateStringInInOperatorES6.js b/tests/baselines/reference/templateStringInInOperatorES6.js index bd4daef3b6d..75d79fad062 100644 --- a/tests/baselines/reference/templateStringInInOperatorES6.js +++ b/tests/baselines/reference/templateStringInInOperatorES6.js @@ -2,4 +2,7 @@ var x = `${ "hi" }` in { hi: 10, hello: 20}; //// [templateStringInInOperatorES6.js] -var x = `${"hi"}` in { hi: 10, hello: 20 }; +var x = `${"hi"}` in { + hi: 10, + hello: 20 +}; diff --git a/tests/baselines/reference/templateStringInObjectLiteral.js b/tests/baselines/reference/templateStringInObjectLiteral.js index 2e4de70f57c..5a096b0adfa 100644 --- a/tests/baselines/reference/templateStringInObjectLiteral.js +++ b/tests/baselines/reference/templateStringInObjectLiteral.js @@ -6,6 +6,7 @@ var x = { //// [templateStringInObjectLiteral.js] var x = (_a = ["b"], _a.raw = ["b"], ({ - a: "abc" + 123 + "def" })(_a)); + a: "abc" + 123 + "def" +})(_a)); 321; var _a; diff --git a/tests/baselines/reference/templateStringInObjectLiteralES6.js b/tests/baselines/reference/templateStringInObjectLiteralES6.js index 7de012185a9..22144e75247 100644 --- a/tests/baselines/reference/templateStringInObjectLiteralES6.js +++ b/tests/baselines/reference/templateStringInObjectLiteralES6.js @@ -6,5 +6,6 @@ var x = { //// [templateStringInObjectLiteralES6.js] var x = { - a: `abc${123}def`, } `b`; + a: `abc${123}def`, +} `b`; 321; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArray.js b/tests/baselines/reference/templateStringWithEmbeddedArray.js index 1fb6512db47..946bae01dfb 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArray.js +++ b/tests/baselines/reference/templateStringWithEmbeddedArray.js @@ -2,4 +2,8 @@ var x = `abc${ [1,2,3] }def`; //// [templateStringWithEmbeddedArray.js] -var x = "abc" + [1, 2, 3] + "def"; +var x = "abc" + [ + 1, + 2, + 3 +] + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js index 804ef7a4e78..96b311cf02b 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedArrayES6.js @@ -2,4 +2,8 @@ var x = `abc${ [1,2,3] }def`; //// [templateStringWithEmbeddedArrayES6.js] -var x = `abc${[1, 2, 3]}def`; +var x = `abc${[ + 1, + 2, + 3 +]}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js index eb2579b0cc3..22b9387047f 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js +++ b/tests/baselines/reference/templateStringWithEmbeddedArrowFunction.js @@ -2,4 +2,6 @@ var x = `abc${ x => x }def`; //// [templateStringWithEmbeddedArrowFunction.js] -var x = "abc" + function (x) { return x; } + "def"; +var x = "abc" + function (x) { + return x; +} + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js index 88a8349d1a4..3447ff87ac3 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpression.js @@ -2,4 +2,6 @@ var x = `abc${ function y() { return y; } }def`; //// [templateStringWithEmbeddedFunctionExpression.js] -var x = "abc" + function y() { return y; } + "def"; +var x = "abc" + function y() { + return y; +} + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js index f0e2f749cfd..46e37c0ac18 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedFunctionExpressionES6.js @@ -2,4 +2,6 @@ var x = `abc${ function y() { return y; } }def`; //// [templateStringWithEmbeddedFunctionExpressionES6.js] -var x = `abc${function y() { return y; }}def`; +var x = `abc${function y() { + return y; +}}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperator.js b/tests/baselines/reference/templateStringWithEmbeddedInOperator.js index 091843ea52e..27c83d6ca81 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInOperator.js +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperator.js @@ -2,4 +2,7 @@ var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; //// [templateStringWithEmbeddedInOperator.js] -var x = "abc" + ("hi" in { hi: 10, hello: 20 }) + "def"; +var x = "abc" + ("hi" in { + hi: 10, + hello: 20 +}) + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js index f6510c2fab9..76a66436311 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedInOperatorES6.js @@ -2,4 +2,7 @@ var x = `abc${ "hi" in { hi: 10, hello: 20} }def`; //// [templateStringWithEmbeddedInOperatorES6.js] -var x = `abc${"hi" in { hi: 10, hello: 20 }}def`; +var x = `abc${"hi" in { + hi: 10, + hello: 20 +}}def`; diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js index 40ecf486245..99d801f1c8a 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteral.js @@ -2,4 +2,7 @@ var x = `abc${ { x: 10, y: 20 } }def`; //// [templateStringWithEmbeddedObjectLiteral.js] -var x = "abc" + { x: 10, y: 20 } + "def"; +var x = "abc" + { + x: 10, + y: 20 +} + "def"; diff --git a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js index dbc3837e133..bf197d86319 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js +++ b/tests/baselines/reference/templateStringWithEmbeddedObjectLiteralES6.js @@ -2,4 +2,7 @@ var x = `abc${ { x: 10, y: 20 } }def`; //// [templateStringWithEmbeddedObjectLiteralES6.js] -var x = `abc${{ x: 10, y: 20 }}def`; +var x = `abc${{ + x: 10, + y: 20 +}}def`; diff --git a/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js b/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js index 72d0fd8c8db..ef113312060 100644 --- a/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js +++ b/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js @@ -4,4 +4,6 @@ `${function (x: number) { x = "bad"; } }`; //// [templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js] -"" + function (x) { x = "bad"; }; +"" + function (x) { + x = "bad"; +}; diff --git a/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js b/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js index 18fae66c78a..9ce47348dc1 100644 --- a/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js +++ b/tests/baselines/reference/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js @@ -3,4 +3,6 @@ `${function (x: number) { x = "bad"; } }`; //// [templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpressionES6.js] -`${function (x) { x = "bad"; }}`; +`${function (x) { + x = "bad"; +}}`; diff --git a/tests/baselines/reference/ternaryExpressionSourceMap.js b/tests/baselines/reference/ternaryExpressionSourceMap.js index 4b43726b281..24813de9734 100644 --- a/tests/baselines/reference/ternaryExpressionSourceMap.js +++ b/tests/baselines/reference/ternaryExpressionSourceMap.js @@ -5,5 +5,9 @@ var foo = x ? () => 0 : () => 0; //// [ternaryExpressionSourceMap.js] var x = 1; -var foo = x ? function () { return 0; } : function () { return 0; }; +var foo = x ? function () { + return 0; +} : function () { + return 0; +}; //# sourceMappingURL=ternaryExpressionSourceMap.js.map \ No newline at end of file diff --git a/tests/baselines/reference/ternaryExpressionSourceMap.js.map b/tests/baselines/reference/ternaryExpressionSourceMap.js.map index 9eb28cae3c1..af4eaa03ab7 100644 --- a/tests/baselines/reference/ternaryExpressionSourceMap.js.map +++ b/tests/baselines/reference/ternaryExpressionSourceMap.js.map @@ -1,2 +1,2 @@ //// [ternaryExpressionSourceMap.js.map] -{"version":3,"file":"ternaryExpressionSourceMap.js","sourceRoot":"","sources":["ternaryExpressionSourceMap.ts"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,IAAI,GAAG,GAAG,CAAC,GAAG,cAAM,QAAC,EAAD,CAAC,GAAG,cAAM,QAAC,EAAD,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"ternaryExpressionSourceMap.js","sourceRoot":"","sources":["ternaryExpressionSourceMap.ts"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,CAAC,CAAC;AACV,IAAI,GAAG,GAAG,CAAC,GAAG;WAAM,CAAC;AAAD,CAAC,GAAG;WAAM,CAAC;AAAD,CAAC,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/ternaryExpressionSourceMap.sourcemap.txt b/tests/baselines/reference/ternaryExpressionSourceMap.sourcemap.txt index 9eb1dd1be86..b1046e0b429 100644 --- a/tests/baselines/reference/ternaryExpressionSourceMap.sourcemap.txt +++ b/tests/baselines/reference/ternaryExpressionSourceMap.sourcemap.txt @@ -15,7 +15,7 @@ sourceFile:ternaryExpressionSourceMap.ts 4 > ^^^ 5 > ^ 6 > ^ -7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +7 > ^^^^^^^^^^^^^^^^^^-> 1 > > 2 >var @@ -30,23 +30,13 @@ sourceFile:ternaryExpressionSourceMap.ts 5 >Emitted(1, 10) Source(2, 10) + SourceIndex(0) 6 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) --- ->>>var foo = x ? function () { return 0; } : function () { return 0; }; +>>>var foo = x ? function () { 1-> 2 >^^^^ 3 > ^^^ 4 > ^^^ 5 > ^ 6 > ^^^ -7 > ^^^^^^^^^^^^^^ -8 > ^^^^^^^^ -9 > ^^ -10> ^ -11> ^^^ -12> ^^^^^^^^^^^^^^ -13> ^^^^^^^^ -14> ^^ -15> ^ -16> ^ 1-> > 2 >var @@ -54,31 +44,52 @@ sourceFile:ternaryExpressionSourceMap.ts 4 > = 5 > x 6 > ? -7 > () => -8 > 0 -9 > -10> 0 -11> : -12> () => -13> 0 -14> -15> 0 -16> ; 1->Emitted(2, 1) Source(3, 1) + SourceIndex(0) 2 >Emitted(2, 5) Source(3, 5) + SourceIndex(0) 3 >Emitted(2, 8) Source(3, 8) + SourceIndex(0) 4 >Emitted(2, 11) Source(3, 11) + SourceIndex(0) 5 >Emitted(2, 12) Source(3, 12) + SourceIndex(0) 6 >Emitted(2, 15) Source(3, 15) + SourceIndex(0) -7 >Emitted(2, 29) Source(3, 21) + SourceIndex(0) -8 >Emitted(2, 37) Source(3, 22) + SourceIndex(0) -9 >Emitted(2, 39) Source(3, 21) + SourceIndex(0) -10>Emitted(2, 40) Source(3, 22) + SourceIndex(0) -11>Emitted(2, 43) Source(3, 25) + SourceIndex(0) -12>Emitted(2, 57) Source(3, 31) + SourceIndex(0) -13>Emitted(2, 65) Source(3, 32) + SourceIndex(0) -14>Emitted(2, 67) Source(3, 31) + SourceIndex(0) -15>Emitted(2, 68) Source(3, 32) + SourceIndex(0) -16>Emitted(2, 69) Source(3, 33) + SourceIndex(0) +--- +>>> return 0; +1 >^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^-> +1 >() => +2 > 0 +1 >Emitted(3, 12) Source(3, 21) + SourceIndex(0) +2 >Emitted(3, 13) Source(3, 22) + SourceIndex(0) +--- +>>>} : function () { +1-> +2 >^ +3 > ^^^ +4 > ^^^^^^^^^^-> +1-> +2 >0 +3 > : +1->Emitted(4, 1) Source(3, 21) + SourceIndex(0) +2 >Emitted(4, 2) Source(3, 22) + SourceIndex(0) +3 >Emitted(4, 5) Source(3, 25) + SourceIndex(0) +--- +>>> return 0; +1->^^^^^^^^^^^ +2 > ^ +1->() => +2 > 0 +1->Emitted(5, 12) Source(3, 31) + SourceIndex(0) +2 >Emitted(5, 13) Source(3, 32) + SourceIndex(0) +--- +>>>}; +1 > +2 >^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >0 +3 > ; +1 >Emitted(6, 1) Source(3, 31) + SourceIndex(0) +2 >Emitted(6, 2) Source(3, 32) + SourceIndex(0) +3 >Emitted(6, 3) Source(3, 33) + SourceIndex(0) --- >>>//# sourceMappingURL=ternaryExpressionSourceMap.js.map \ No newline at end of file diff --git a/tests/baselines/reference/thisBinding.js b/tests/baselines/reference/thisBinding.js index 79a27b19fd8..0c0547a4b91 100644 --- a/tests/baselines/reference/thisBinding.js +++ b/tests/baselines/reference/thisBinding.js @@ -27,7 +27,10 @@ var M; var C = (function () { function C() { this.x = 0; - ({ z: 10, f: this.f }).f(({})); + ({ + z: 10, + f: this.f + }).f(({})); } C.prototype.f = function (x) { x.e; // e not found diff --git a/tests/baselines/reference/thisBinding2.js b/tests/baselines/reference/thisBinding2.js index 76b99797e16..ced47c0bc7b 100644 --- a/tests/baselines/reference/thisBinding2.js +++ b/tests/baselines/reference/thisBinding2.js @@ -40,6 +40,8 @@ var messenger = { message: "Hello World", start: function () { var _this = this; - return setTimeout(function () { var x = _this.message; }, 3000); + return setTimeout(function () { + var x = _this.message; + }, 3000); } }; diff --git a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.js b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.js index 78b06d30dd2..348684fe606 100644 --- a/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.js +++ b/tests/baselines/reference/thisExpressionInCallExpressionWithTypeArguments.js @@ -10,7 +10,13 @@ var C = (function () { } C.prototype.foo = function () { var _this = this; - [1, 2, 3].map(function (x) { return _this; }); + [ + 1, + 2, + 3 + ].map(function (x) { + return _this; + }); }; return C; })(); diff --git a/tests/baselines/reference/thisExpressionInIndexExpression.js b/tests/baselines/reference/thisExpressionInIndexExpression.js index 1e6661386c4..45094ece936 100644 --- a/tests/baselines/reference/thisExpressionInIndexExpression.js +++ b/tests/baselines/reference/thisExpressionInIndexExpression.js @@ -6,5 +6,7 @@ function f() { //// [thisExpressionInIndexExpression.js] function f() { var _this = this; - return function (r) { return r[_this]; }; + return function (r) { + return r[_this]; + }; } diff --git a/tests/baselines/reference/thisExpressionOfGenericObject.js b/tests/baselines/reference/thisExpressionOfGenericObject.js index e790050069e..5daa4959c6d 100644 --- a/tests/baselines/reference/thisExpressionOfGenericObject.js +++ b/tests/baselines/reference/thisExpressionOfGenericObject.js @@ -11,7 +11,9 @@ class MyClass1 { var MyClass1 = (function () { function MyClass1() { var _this = this; - (function () { return _this; }); + (function () { + return _this; + }); } return MyClass1; })(); diff --git a/tests/baselines/reference/thisInAccessors.js b/tests/baselines/reference/thisInAccessors.js index ab521649292..3d3206e11f5 100644 --- a/tests/baselines/reference/thisInAccessors.js +++ b/tests/baselines/reference/thisInAccessors.js @@ -38,7 +38,9 @@ var GetterOnly = (function () { Object.defineProperty(GetterOnly.prototype, "Value", { get: function () { var _this = this; - var fn = function () { return _this; }; + var fn = function () { + return _this; + }; return ''; }, set: function (val) { @@ -58,7 +60,9 @@ var SetterOnly = (function () { }, set: function (val) { var _this = this; - var fn = function () { return _this; }; + var fn = function () { + return _this; + }; }, enumerable: true, configurable: true @@ -72,12 +76,16 @@ var GetterAndSetter = (function () { Object.defineProperty(GetterAndSetter.prototype, "Value", { get: function () { var _this = this; - var fn = function () { return _this; }; + var fn = function () { + return _this; + }; return ''; }, set: function (val) { var _this = this; - var fn = function () { return _this; }; + var fn = function () { + return _this; + }; }, enumerable: true, configurable: true diff --git a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js index 03e6ddb64d9..fdfcc5d9522 100644 --- a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js +++ b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js @@ -9,7 +9,8 @@ class Vector { } //// [thisInArrowFunctionInStaticInitializer1.js] -function log(a) { } +function log(a) { +} var Vector = (function () { function Vector() { var _this = this; diff --git a/tests/baselines/reference/thisInInnerFunctions.js b/tests/baselines/reference/thisInInnerFunctions.js index d9ba3adfdf3..09ee60fdb9b 100644 --- a/tests/baselines/reference/thisInInnerFunctions.js +++ b/tests/baselines/reference/thisInInnerFunctions.js @@ -26,7 +26,9 @@ var Foo = (function () { function inner() { var _this = this; this.y = "hi"; // 'this' should be not type to 'Foo' either - var f = function () { return _this.y; }; // 'this' should be not type to 'Foo' either + var f = function () { + return _this.y; + }; // 'this' should be not type to 'Foo' either } }; return Foo; @@ -34,7 +36,9 @@ var Foo = (function () { function test() { var _this = this; var x = function () { - (function () { return _this; })(); + (function () { + return _this; + })(); _this; }; } diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index f21ebedc1eb..16c40a96e91 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -92,7 +92,8 @@ var M; //'this' as type parameter constraint // function fn() { } // Error //'this' as a type argument -function genericFunc(x) { } +function genericFunc(x) { +} genericFunc < this > (undefined); // Should be an error var ErrClass3 = (function () { function ErrClass3() { diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index e9fddd380bf..2e8e6d10c6c 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -92,7 +92,8 @@ var M; //'this' as type parameter constraint // function fn() { } // Error //'this' as a type argument -function genericFunc(x) { } +function genericFunc(x) { +} genericFunc < this > (undefined); // Should be an error var ErrClass3 = (function () { function ErrClass3() { diff --git a/tests/baselines/reference/thisInLambda.js b/tests/baselines/reference/thisInLambda.js index 94c86bd5a80..40a12d93351 100644 --- a/tests/baselines/reference/thisInLambda.js +++ b/tests/baselines/reference/thisInLambda.js @@ -26,11 +26,14 @@ var Foo = (function () { Foo.prototype.bar = function () { var _this = this; this.x; // 'this' is type 'Foo' - var f = function () { return _this.x; }; // 'this' should be type 'Foo' as well + var f = function () { + return _this.x; + }; // 'this' should be type 'Foo' as well }; return Foo; })(); -function myFn(a) { } +function myFn(a) { +} var myCls = (function () { function myCls() { var _this = this; diff --git a/tests/baselines/reference/thisInObjectLiterals.js b/tests/baselines/reference/thisInObjectLiterals.js index 79e834be154..a2a6453e1aa 100644 --- a/tests/baselines/reference/thisInObjectLiterals.js +++ b/tests/baselines/reference/thisInObjectLiterals.js @@ -24,7 +24,10 @@ var MyClass = (function () { } MyClass.prototype.fn = function () { //type of 'this' in an object literal is the containing scope's this - var t = { x: this, y: this.t }; + var t = { + x: this, + y: this.t + }; var t; }; return MyClass; diff --git a/tests/baselines/reference/thisInOuterClassBody.js b/tests/baselines/reference/thisInOuterClassBody.js index 0dff441bb1e..ecbe6fc5417 100644 --- a/tests/baselines/reference/thisInOuterClassBody.js +++ b/tests/baselines/reference/thisInOuterClassBody.js @@ -28,7 +28,9 @@ var Foo = (function () { Foo.prototype.bar = function () { var _this = this; this.x; // 'this' is type 'Foo' - var f = function () { return _this.x; }; // 'this' should be type 'Foo' as well + var f = function () { + return _this.x; + }; // 'this' should be type 'Foo' as well var p = this.y; return this; }; diff --git a/tests/baselines/reference/thisInPropertyBoundDeclarations.js b/tests/baselines/reference/thisInPropertyBoundDeclarations.js index e5004eed431..cba8fd2a8c2 100644 --- a/tests/baselines/reference/thisInPropertyBoundDeclarations.js +++ b/tests/baselines/reference/thisInPropertyBoundDeclarations.js @@ -92,7 +92,9 @@ var A = (function () { function inner() { this; } - (function () { return _this; }); + (function () { + return _this; + }); }; this.prop3 = function () { function inner() { @@ -100,11 +102,15 @@ var A = (function () { } }; this.prop4 = { - a: function () { return this; } + a: function () { + return this; + } }; this.prop5 = function () { return { - a: function () { return this; } + a: function () { + return this; + } }; }; } @@ -114,19 +120,36 @@ var B = (function () { function B() { var _this = this; this.prop1 = this; - this.prop2 = function () { return _this; }; - this.prop3 = function () { return function () { return function () { return function () { return _this; }; }; }; }; - this.prop4 = ' ' + - function () { - } + - ' ' + - (function () { return function () { return function () { return _this; }; }; }); + this.prop2 = function () { + return _this; + }; + this.prop3 = function () { + return function () { + return function () { + return function () { + return _this; + }; + }; + }; + }; + this.prop4 = ' ' + function () { + } + ' ' + (function () { + return function () { + return function () { + return _this; + }; + }; + }); this.prop5 = { - a: function () { return _this; } + a: function () { + return _this; + } }; this.prop6 = function () { return { - a: function () { return _this; } + a: function () { + return _this; + } }; }; } diff --git a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js index 99341af9f86..78467e8a22e 100644 --- a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js +++ b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js @@ -8,9 +8,12 @@ function test() } //// [thisReferencedInFunctionInsideArrowFunction1.js] -var foo = function (dummy) { }; +var foo = function (dummy) { +}; function test() { foo(function () { - return function () { return this; }; + return function () { + return this; + }; }); } diff --git a/tests/baselines/reference/throwInEnclosingStatements.js b/tests/baselines/reference/throwInEnclosingStatements.js index 0b072434f33..b52926e651e 100644 --- a/tests/baselines/reference/throwInEnclosingStatements.js +++ b/tests/baselines/reference/throwInEnclosingStatements.js @@ -50,7 +50,9 @@ var aa = { function fn(x) { throw x; } -(function (x) { throw x; }); +(function (x) { + throw x; +}); var y; switch (y) { case 'a': diff --git a/tests/baselines/reference/throwStatements.js b/tests/baselines/reference/throwStatements.js index 83663d08cc4..4ab370db0b6 100644 --- a/tests/baselines/reference/throwStatements.js +++ b/tests/baselines/reference/throwStatements.js @@ -97,7 +97,9 @@ var D = (function () { } return D; })(); -function F(x) { return 42; } +function F(x) { + return 42; +} var M; (function (M) { var A = (function () { @@ -106,7 +108,9 @@ var M; return A; })(); M.A = A; - function F2(x) { return x.toString(); } + function F2(x) { + return x.toString(); + } M.F2 = F2; })(M || (M = {})); var aNumber = 9.9; @@ -127,12 +131,16 @@ var aClass = new C(); throw aClass; var aGenericClass = new D(); throw aGenericClass; -var anObjectLiteral = { id: 12 }; +var anObjectLiteral = { + id: 12 +}; throw anObjectLiteral; var aFunction = F; throw aFunction; throw aFunction(''); -var aLambda = function (x) { return 2; }; +var aLambda = function (x) { + return 2; +}; throw aLambda; throw aLambda(1); var aModule = M; @@ -151,11 +159,23 @@ throw false; throw null; throw undefined; throw 'a string'; -throw function () { return 'a string'; }; -throw function (x) { return 42; }; -throw { x: 12, y: 13 }; +throw function () { + return 'a string'; +}; +throw function (x) { + return 42; +}; +throw { + x: 12, + y: 13 +}; throw []; -throw ['a', ['b']]; +throw [ + 'a', + [ + 'b' + ] +]; throw /[a-z]/; throw new Date(); throw new C(); diff --git a/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.js b/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.js index 4b00c5fd0f2..8aa23c82469 100644 --- a/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.js +++ b/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.js @@ -19,6 +19,10 @@ var r1b = _.map(c2, rf1); //// [tooFewArgumentsInGenericFunctionTypedArgument.js] var c2; var _; -var r1a = _.map(c2, function (x) { return x.toFixed(); }); -var rf1 = function (x) { return x.toFixed(); }; +var r1a = _.map(c2, function (x) { + return x.toFixed(); +}); +var rf1 = function (x) { + return x.toFixed(); +}; var r1b = _.map(c2, rf1); diff --git a/tests/baselines/reference/tooManyTypeParameters1.js b/tests/baselines/reference/tooManyTypeParameters1.js index 892731cbd43..3ac7dfacda3 100644 --- a/tests/baselines/reference/tooManyTypeParameters1.js +++ b/tests/baselines/reference/tooManyTypeParameters1.js @@ -12,9 +12,11 @@ interface I {} var i: I; //// [tooManyTypeParameters1.js] -function f() { } +function f() { +} f(); -var x = function () { }; +var x = function () { +}; x(); var C = (function () { function C() { diff --git a/tests/baselines/reference/topLevelExports.js b/tests/baselines/reference/topLevelExports.js index 91e28b6a976..0f539310b15 100644 --- a/tests/baselines/reference/topLevelExports.js +++ b/tests/baselines/reference/topLevelExports.js @@ -8,6 +8,8 @@ void log(foo).toString(); //// [topLevelExports.js] define(["require", "exports"], function (require, exports) { exports.foo = 3; - function log(n) { return n; } + function log(n) { + return n; + } void log(exports.foo).toString(); }); diff --git a/tests/baselines/reference/topLevelLambda.js b/tests/baselines/reference/topLevelLambda.js index 3c4f1a3bc84..756a42b4340 100644 --- a/tests/baselines/reference/topLevelLambda.js +++ b/tests/baselines/reference/topLevelLambda.js @@ -8,5 +8,7 @@ module M { var M; (function (M) { var _this = this; - var f = function () { _this.window; }; + var f = function () { + _this.window; + }; })(M || (M = {})); diff --git a/tests/baselines/reference/topLevelLambda2.js b/tests/baselines/reference/topLevelLambda2.js index 10059e42efd..e5cb1fcac5a 100644 --- a/tests/baselines/reference/topLevelLambda2.js +++ b/tests/baselines/reference/topLevelLambda2.js @@ -5,5 +5,8 @@ foo(()=>this.window); //// [topLevelLambda2.js] var _this = this; -function foo(x) { } -foo(function () { return _this.window; }); +function foo(x) { +} +foo(function () { + return _this.window; +}); diff --git a/tests/baselines/reference/topLevelLambda3.js b/tests/baselines/reference/topLevelLambda3.js index 0314b356b0f..1505e38956a 100644 --- a/tests/baselines/reference/topLevelLambda3.js +++ b/tests/baselines/reference/topLevelLambda3.js @@ -3,4 +3,6 @@ var f = () => {this.window;} //// [topLevelLambda3.js] var _this = this; -var f = function () { _this.window; }; +var f = function () { + _this.window; +}; diff --git a/tests/baselines/reference/topLevelLambda4.js b/tests/baselines/reference/topLevelLambda4.js index 863a0e9a103..47b238cd87f 100644 --- a/tests/baselines/reference/topLevelLambda4.js +++ b/tests/baselines/reference/topLevelLambda4.js @@ -4,5 +4,7 @@ export var x = () => this.window; //// [topLevelLambda4.js] define(["require", "exports"], function (require, exports) { var _this = this; - exports.x = function () { return _this.window; }; + exports.x = function () { + return _this.window; + }; }); diff --git a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js index 7dd59ee840e..0fdc7577088 100644 --- a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js +++ b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js @@ -13,11 +13,22 @@ class arrTest { var arrTest = (function () { function arrTest() { } - arrTest.prototype.test = function (arg1) { }; + arrTest.prototype.test = function (arg1) { + }; arrTest.prototype.callTest = function () { // these two should give the same error - this.test([1, 2, "hi", 5,]); - this.test([1, 2, "hi", 5]); + this.test([ + 1, + 2, + "hi", + 5, + ]); + this.test([ + 1, + 2, + "hi", + 5 + ]); }; return arrTest; })(); diff --git a/tests/baselines/reference/trailingCommasES3.js b/tests/baselines/reference/trailingCommasES3.js index 554390a83ea..b8b8c8ad1f0 100644 --- a/tests/baselines/reference/trailingCommasES3.js +++ b/tests/baselines/reference/trailingCommasES3.js @@ -13,13 +13,35 @@ var a5 = [1, , ]; var a6 = [, , ]; //// [trailingCommasES3.js] -var o1 = { a: 1, b: 2 }; -var o2 = { a: 1, b: 2 }; -var o3 = { a: 1 }; +var o1 = { + a: 1, + b: 2 +}; +var o2 = { + a: 1, + b: 2 +}; +var o3 = { + a: 1 +}; var o4 = {}; -var a1 = [1, 2]; -var a2 = [1, 2,]; -var a3 = [1,]; +var a1 = [ + 1, + 2 +]; +var a2 = [ + 1, + 2, +]; +var a3 = [ + 1, +]; var a4 = []; -var a5 = [1, ,]; -var a6 = [, ,]; +var a5 = [ + 1, + , +]; +var a6 = [ + , + , +]; diff --git a/tests/baselines/reference/trailingCommasES5.js b/tests/baselines/reference/trailingCommasES5.js index e54e911189a..8cd17e7519f 100644 --- a/tests/baselines/reference/trailingCommasES5.js +++ b/tests/baselines/reference/trailingCommasES5.js @@ -13,13 +13,35 @@ var a5 = [1, , ]; var a6 = [, , ]; //// [trailingCommasES5.js] -var o1 = { a: 1, b: 2 }; -var o2 = { a: 1, b: 2, }; -var o3 = { a: 1, }; +var o1 = { + a: 1, + b: 2 +}; +var o2 = { + a: 1, + b: 2, +}; +var o3 = { + a: 1, +}; var o4 = {}; -var a1 = [1, 2]; -var a2 = [1, 2,]; -var a3 = [1,]; +var a1 = [ + 1, + 2 +]; +var a2 = [ + 1, + 2, +]; +var a3 = [ + 1, +]; var a4 = []; -var a5 = [1, ,]; -var a6 = [, ,]; +var a5 = [ + 1, + , +]; +var a6 = [ + , + , +]; diff --git a/tests/baselines/reference/tryCatchFinally.js b/tests/baselines/reference/tryCatchFinally.js index b93f248c031..aeda61faca4 100644 --- a/tests/baselines/reference/tryCatchFinally.js +++ b/tests/baselines/reference/tryCatchFinally.js @@ -6,10 +6,17 @@ try {} catch(e) {} try {} finally {} //// [tryCatchFinally.js] -try { } -catch (e) { } -finally { } -try { } -catch (e) { } -try { } -finally { } +try { +} +catch (e) { +} +finally { +} +try { +} +catch (e) { +} +try { +} +finally { +} diff --git a/tests/baselines/reference/tryStatements.js b/tests/baselines/reference/tryStatements.js index 723014c1b52..01d55308d19 100644 --- a/tests/baselines/reference/tryStatements.js +++ b/tests/baselines/reference/tryStatements.js @@ -18,9 +18,14 @@ function fn() { catch (x) { var x; } - try { } - finally { } - try { } - catch (z) { } - finally { } + try { + } + finally { + } + try { + } + catch (z) { + } + finally { + } } diff --git a/tests/baselines/reference/tupleTypes.js b/tests/baselines/reference/tupleTypes.js index 451aeb5eb09..ba0aaa9d8b4 100644 --- a/tests/baselines/reference/tupleTypes.js +++ b/tests/baselines/reference/tupleTypes.js @@ -67,15 +67,40 @@ var t1; var t2 = t[2]; // number|string var t2; t = []; // Error -t = [1]; // Error -t = [1, "hello"]; // Ok -t = ["hello", 1]; // Error -t = [1, "hello", 2]; // Ok -var tf = ["hello", function (x) { return x.length; }]; -var ff1 = ff("hello", ["foo", function (x) { return x.length; }]); +t = [ + 1 +]; // Error +t = [ + 1, + "hello" +]; // Ok +t = [ + "hello", + 1 +]; // Error +t = [ + 1, + "hello", + 2 +]; // Ok +var tf = [ + "hello", + function (x) { + return x.length; + } +]; +var ff1 = ff("hello", [ + "foo", + function (x) { + return x.length; + } +]); var ff1; function tuple2(item0, item1) { - return [item0, item1]; + return [ + item0, + item1 + ]; } var tt = tuple2(1, "string"); var tt0 = tt[0]; @@ -85,8 +110,14 @@ var tt1; var tt2 = tt[2]; var tt2; tt = tuple2(1, undefined); -tt = [1, undefined]; -tt = [undefined, undefined]; +tt = [ + 1, + undefined +]; +tt = [ + undefined, + undefined +]; tt = []; // Error var a; var a1; diff --git a/tests/baselines/reference/twoAccessorsWithSameName.js b/tests/baselines/reference/twoAccessorsWithSameName.js index 1e447ea1205..7ae4d3bd1f9 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName.js +++ b/tests/baselines/reference/twoAccessorsWithSameName.js @@ -39,7 +39,9 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -49,7 +51,8 @@ var D = (function () { function D() { } Object.defineProperty(D.prototype, "x", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -62,7 +65,8 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -81,5 +85,6 @@ var y = { get x() { return 1; }, - set x(v) { } + set x(v) { + } }; diff --git a/tests/baselines/reference/twoAccessorsWithSameName2.js b/tests/baselines/reference/twoAccessorsWithSameName2.js index 847f83e6a70..437fe16cea5 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName2.js +++ b/tests/baselines/reference/twoAccessorsWithSameName2.js @@ -21,7 +21,9 @@ var C = (function () { function C() { } Object.defineProperty(C, "x", { - get: function () { return 1; }, + get: function () { + return 1; + }, enumerable: true, configurable: true }); @@ -31,7 +33,8 @@ var D = (function () { function D() { } Object.defineProperty(D, "x", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); @@ -44,7 +47,8 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/typeAliases.js b/tests/baselines/reference/typeAliases.js index 0cf0dd92402..7f1597939ea 100644 --- a/tests/baselines/reference/typeAliases.js +++ b/tests/baselines/reference/typeAliases.js @@ -122,5 +122,8 @@ var E; f15(10 /* x */).toLowerCase(); var x; f16(x); -var y = ["1", false]; +var y = [ + "1", + false +]; y[0].toLowerCase(); diff --git a/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.js b/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.js index cf5ddb23ccd..be252fe345b 100644 --- a/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.js +++ b/tests/baselines/reference/typeAnnotationBestCommonTypeInArrayLiteral.js @@ -29,7 +29,8 @@ var menuData = [ "type": "image", "link": "", "icon": "modules/menu/logo.svg" - }, { + }, + { "id": "productName", "type": "default", "link": "", diff --git a/tests/baselines/reference/typeArgInference.js b/tests/baselines/reference/typeArgInference.js index 7ac36fa2580..624c357cbc4 100644 --- a/tests/baselines/reference/typeArgInference.js +++ b/tests/baselines/reference/typeArgInference.js @@ -16,13 +16,32 @@ var t4: { c: number; d: string }; //// [typeArgInference.js] -var o = { a: 3, b: "test" }; +var o = { + a: 3, + b: "test" +}; var x; -var t1 = x.f([o], [o]); +var t1 = x.f([ + o +], [ + o +]); var t1; -var t2 = x.f([o], [o]); +var t2 = x.f([ + o +], [ + o +]); var t2; -var t3 = x.g([o], [o]); +var t3 = x.g([ + o +], [ + o +]); var t3; -var t4 = x.g([o], [o]); +var t4 = x.g([ + o +], [ + o +]); var t4; diff --git a/tests/baselines/reference/typeArgInference2.js b/tests/baselines/reference/typeArgInference2.js index 193345cdeb3..1af776c1197 100644 --- a/tests/baselines/reference/typeArgInference2.js +++ b/tests/baselines/reference/typeArgInference2.js @@ -15,7 +15,20 @@ var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error //// [typeArgInference2.js] var z1 = foo(null); // any var z2 = foo(); // Item -var z3 = foo({ name: null }); // { name: any } -var z4 = foo({ name: "abc" }); // { name: string } -var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } -var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error +var z3 = foo({ + name: null +}); // { name: any } +var z4 = foo({ + name: "abc" +}); // { name: string } +var z5 = foo({ + name: "abc", + a: 5 +}); // { name: string; a: number } +var z6 = foo({ + name: "abc", + a: 5 +}, { + name: "def", + b: 5 +}); // error diff --git a/tests/baselines/reference/typeArgInferenceWithNull.js b/tests/baselines/reference/typeArgInferenceWithNull.js index ed7a50780aa..78b0dd238fe 100644 --- a/tests/baselines/reference/typeArgInferenceWithNull.js +++ b/tests/baselines/reference/typeArgInferenceWithNull.js @@ -13,9 +13,19 @@ fn6({ x: null }, y => { }, { x: "" }); // y has type { x: any }, but ideally wou //// [typeArgInferenceWithNull.js] // All legal -function fn4(n) { } +function fn4(n) { +} fn4(null); -function fn5(n) { } -fn5({ x: null }); -function fn6(n, fun, n2) { } -fn6({ x: null }, function (y) { }, { x: "" }); // y has type { x: any }, but ideally would have type { x: string } +function fn5(n) { +} +fn5({ + x: null +}); +function fn6(n, fun, n2) { +} +fn6({ + x: null +}, function (y) { +}, { + x: "" +}); // y has type { x: any }, but ideally would have type { x: string } diff --git a/tests/baselines/reference/typeArgumentConstraintResolution1.js b/tests/baselines/reference/typeArgumentConstraintResolution1.js index fd661dd812c..b7476ad2abd 100644 --- a/tests/baselines/reference/typeArgumentConstraintResolution1.js +++ b/tests/baselines/reference/typeArgumentConstraintResolution1.js @@ -13,7 +13,10 @@ foo2(""); // Type Date does not satisfy the constraint 'Number' for type p //// [typeArgumentConstraintResolution1.js] -function foo1(test) { } +function foo1(test) { +} foo1(""); // should error -function foo2(test) { return null; } +function foo2(test) { + return null; +} foo2(""); // Type Date does not satisfy the constraint 'Number' for type parameter 'T extends Number' diff --git a/tests/baselines/reference/typeArgumentInference.js b/tests/baselines/reference/typeArgumentInference.js index 1d10562ac7c..6de9a5951b4 100644 --- a/tests/baselines/reference/typeArgumentInference.js +++ b/tests/baselines/reference/typeArgumentInference.js @@ -102,55 +102,129 @@ var arr: any[]; //// [typeArgumentInference.js] // Generic call with no parameters -function noParams() { } +function noParams() { +} noParams(); noParams(); noParams(); // Generic call with parameters but none use type parameter type -function noGenericParams(n) { } +function noGenericParams(n) { +} noGenericParams(''); noGenericParams(''); noGenericParams(''); // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { } +function someGenerics1(n, m) { +} someGenerics1(3, 4); someGenerics1(3, 4); // Generic call with argument of function type whose parameter is of type parameter type -function someGenerics2a(n) { } -someGenerics2a(function (n) { return n; }); -someGenerics2a(function (n) { return n; }); -someGenerics2a(function (n) { return n.substr(0); }); -function someGenerics2b(n) { } -someGenerics2b(function (n, x) { return n; }); -someGenerics2b(function (n, t) { return n; }); -someGenerics2b(function (n, t) { return n.substr(t * t); }); +function someGenerics2a(n) { +} +someGenerics2a(function (n) { + return n; +}); +someGenerics2a(function (n) { + return n; +}); +someGenerics2a(function (n) { + return n.substr(0); +}); +function someGenerics2b(n) { +} +someGenerics2b(function (n, x) { + return n; +}); +someGenerics2b(function (n, t) { + return n; +}); +someGenerics2b(function (n, t) { + return n.substr(t * t); +}); // Generic call with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(producer) { } -someGenerics3(function () { return ''; }); -someGenerics3(function () { return undefined; }); -someGenerics3(function () { return 3; }); +function someGenerics3(producer) { +} +someGenerics3(function () { + return ''; +}); +someGenerics3(function () { + return undefined; +}); +someGenerics3(function () { + return 3; +}); // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { } -someGenerics4(4, function () { return null; }); -someGenerics4('', function () { return 3; }); +function someGenerics4(n, f) { +} +someGenerics4(4, function () { + return null; +}); +someGenerics4('', function () { + return 3; +}); someGenerics4(null, null); // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { } -someGenerics5(4, function () { return null; }); -someGenerics5('', function () { return 3; }); +function someGenerics5(n, f) { +} +someGenerics5(4, function () { + return null; +}); +someGenerics5('', function () { + return 3; +}); someGenerics5(null, null); // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { } -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +function someGenerics6(a, b, c) { +} +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Generic call with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(a, b, c) { } -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +function someGenerics7(a, b, c) { +} +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Generic call with argument of generic function type -function someGenerics8(n) { return n; } +function someGenerics8(n) { + return n; +} var x = someGenerics8(someGenerics7); x(null, null, null); // Generic call with multiple parameters of generic type passed arguments with no best common type @@ -159,14 +233,36 @@ function someGenerics9(a, b, c) { } var a9a = someGenerics9('', 0, []); var a9a; -var a9b = someGenerics9({ a: 0 }, { b: '' }, null); +var a9b = someGenerics9({ + a: 0 +}, { + b: '' +}, null); var a9b; -var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); +var a9e = someGenerics9(undefined, { + x: 6, + z: new Date() +}, { + x: 6, + y: '' +}); var a9e; -var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); +var a9f = someGenerics9(undefined, { + x: 6, + z: new Date() +}, { + x: 6, + y: '' +}); var a9f; // Generic call with multiple parameters of generic type passed arguments with a single best common type -var a9d = someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); +var a9d = someGenerics9({ + x: 3 +}, { + x: 6 +}, { + x: 6 +}); var a9d; // Generic call with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js index 148ec81c441..a2346cc28a7 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.js @@ -152,50 +152,144 @@ new someGenerics1(3, 4); new someGenerics1(3, 4); // Error new someGenerics1(3, 4); var someGenerics2a; -new someGenerics2a(function (n) { return n; }); -new someGenerics2a(function (n) { return n; }); -new someGenerics2a(function (n) { return n.substr(0); }); +new someGenerics2a(function (n) { + return n; +}); +new someGenerics2a(function (n) { + return n; +}); +new someGenerics2a(function (n) { + return n.substr(0); +}); var someGenerics2b; -new someGenerics2b(function (n, x) { return n; }); -new someGenerics2b(function (n, t) { return n; }); -new someGenerics2b(function (n, t) { return n.substr(t * t); }); +new someGenerics2b(function (n, x) { + return n; +}); +new someGenerics2b(function (n, t) { + return n; +}); +new someGenerics2b(function (n, t) { + return n.substr(t * t); +}); var someGenerics3; -new someGenerics3(function () { return ''; }); -new someGenerics3(function () { return undefined; }); -new someGenerics3(function () { return 3; }); +new someGenerics3(function () { + return ''; +}); +new someGenerics3(function () { + return undefined; +}); +new someGenerics3(function () { + return 3; +}); var someGenerics4; -new someGenerics4(4, function () { return null; }); -new someGenerics4('', function () { return 3; }); -new someGenerics4('', function (x) { return ''; }); // Error +new someGenerics4(4, function () { + return null; +}); +new someGenerics4('', function () { + return 3; +}); +new someGenerics4('', function (x) { + return ''; +}); // Error new someGenerics4(null, null); var someGenerics5; -new someGenerics5(4, function () { return null; }); -new someGenerics5('', function () { return 3; }); -new someGenerics5('', function (x) { return ''; }); // Error +new someGenerics5(4, function () { + return null; +}); +new someGenerics5('', function () { + return 3; +}); +new someGenerics5('', function (x) { + return ''; +}); // Error new someGenerics5(null, null); var someGenerics6; -new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error -new someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +new someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +new someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +new someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Error +new someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); var someGenerics7; -new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -new someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +new someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +new someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +new someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); var someGenerics8; var x = new someGenerics8(someGenerics7); new x(null, null, null); var someGenerics9; var a9a = new someGenerics9('', 0, []); var a9a; -var a9b = new someGenerics9({ a: 0 }, { b: '' }, null); +var a9b = new someGenerics9({ + a: 0 +}, { + b: '' +}, null); var a9b; -var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); +var a9e = new someGenerics9(undefined, { + x: 6, + z: window +}, { + x: 6, + y: '' +}); var a9e; -var a9f = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); +var a9f = new someGenerics9(undefined, { + x: 6, + z: window +}, { + x: 6, + y: '' +}); var a9f; // Generic call with multiple parameters of generic type passed arguments with a single best common type -var a9d = new someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); +var a9d = new someGenerics9({ + x: 3 +}, { + x: 6 +}, { + x: 6 +}); var a9d; // Generic call with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/typeArgumentInferenceErrors.js b/tests/baselines/reference/typeArgumentInferenceErrors.js index 7ec612d2c7c..97dfce01a1d 100644 --- a/tests/baselines/reference/typeArgumentInferenceErrors.js +++ b/tests/baselines/reference/typeArgumentInferenceErrors.js @@ -18,14 +18,28 @@ someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // //// [typeArgumentInferenceErrors.js] // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { } +function someGenerics1(n, m) { +} someGenerics1(3, 4); // Error // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { } -someGenerics4('', function (x) { return ''; }); // Error +function someGenerics4(n, f) { +} +someGenerics4('', function (x) { + return ''; +}); // Error // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { } -someGenerics5('', function (x) { return ''; }); // Error +function someGenerics5(n, f) { +} +someGenerics5('', function (x) { + return ''; +}); // Error // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { } -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error +function someGenerics6(a, b, c) { +} +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Error diff --git a/tests/baselines/reference/typeArgumentInferenceOrdering.js b/tests/baselines/reference/typeArgumentInferenceOrdering.js index 96978bfd489..53917844f66 100644 --- a/tests/baselines/reference/typeArgumentInferenceOrdering.js +++ b/tests/baselines/reference/typeArgumentInferenceOrdering.js @@ -16,7 +16,9 @@ interface Goo { //// [typeArgumentInferenceOrdering.js] -function foo(f) { return null; } +function foo(f) { + return null; +} var x = foo(new C()).x; // was Error that property x does not exist on type {} var C = (function () { function C() { diff --git a/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js b/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js index 003ae4af535..5a470de46da 100644 --- a/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js +++ b/tests/baselines/reference/typeArgumentInferenceTransitiveConstraints.js @@ -10,7 +10,11 @@ var d: Date[]; // Should be OK (d should be Date[]) //// [typeArgumentInferenceTransitiveConstraints.js] function fn(a, b, c) { - return [a, b, c]; + return [ + a, + b, + c + ]; } var d = fn(new Date(), new Date(), new Date()); var d; // Should be OK (d should be Date[]) diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js index 941c9330a5f..50d7767b5db 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.js @@ -8,7 +8,9 @@ var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal //// [typeArgumentInferenceWithConstraintAsCommonRoot.js] -function f(x, y) { return undefined; } +function f(x, y) { + return undefined; +} var g; var e; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.js b/tests/baselines/reference/typeArgumentInferenceWithConstraints.js index b8c051f0c37..ce0d3cb82e3 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.js +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.js @@ -107,60 +107,144 @@ var arr: any[]; //// [typeArgumentInferenceWithConstraints.js] // Generic call with no parameters -function noParams() { } +function noParams() { +} noParams(); noParams(); noParams(); // Generic call with parameters but none use type parameter type -function noGenericParams(n) { } +function noGenericParams(n) { +} noGenericParams(''); // Valid noGenericParams(''); noGenericParams(''); // Error // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { } +function someGenerics1(n, m) { +} someGenerics1(3, 4); // Valid someGenerics1(3, 4); // Error someGenerics1(3, 4); // Error someGenerics1(3, 4); // Generic call with argument of function type whose parameter is of type parameter type -function someGenerics2a(n) { } -someGenerics2a(function (n) { return n; }); -someGenerics2a(function (n) { return n; }); -someGenerics2a(function (n) { return n.substr(0); }); -function someGenerics2b(n) { } -someGenerics2b(function (n, x) { return n; }); -someGenerics2b(function (n, t) { return n; }); -someGenerics2b(function (n, t) { return n.substr(t * t); }); +function someGenerics2a(n) { +} +someGenerics2a(function (n) { + return n; +}); +someGenerics2a(function (n) { + return n; +}); +someGenerics2a(function (n) { + return n.substr(0); +}); +function someGenerics2b(n) { +} +someGenerics2b(function (n, x) { + return n; +}); +someGenerics2b(function (n, t) { + return n; +}); +someGenerics2b(function (n, t) { + return n.substr(t * t); +}); // Generic call with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(producer) { } -someGenerics3(function () { return ''; }); // Error -someGenerics3(function () { return undefined; }); -someGenerics3(function () { return 3; }); // Error +function someGenerics3(producer) { +} +someGenerics3(function () { + return ''; +}); // Error +someGenerics3(function () { + return undefined; +}); +someGenerics3(function () { + return 3; +}); // Error // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { } -someGenerics4(4, function () { return null; }); // Valid -someGenerics4('', function () { return 3; }); -someGenerics4('', function (x) { return ''; }); // Error +function someGenerics4(n, f) { +} +someGenerics4(4, function () { + return null; +}); // Valid +someGenerics4('', function () { + return 3; +}); +someGenerics4('', function (x) { + return ''; +}); // Error someGenerics4(null, null); // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { } -someGenerics5(4, function () { return null; }); // Valid -someGenerics5('', function () { return 3; }); -someGenerics5('', function (x) { return ''; }); // Error +function someGenerics5(n, f) { +} +someGenerics5(4, function () { + return null; +}); // Valid +someGenerics5('', function () { + return 3; +}); +someGenerics5('', function (x) { + return ''; +}); // Error someGenerics5(null, null); // Error // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { } -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Valid -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error -someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +function someGenerics6(a, b, c) { +} +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Valid +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Error +someGenerics6(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Generic call with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(a, b, c) { } -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Valid, types of n are respectively -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); -someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); +function someGenerics7(a, b, c) { +} +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Valid, types of n are respectively +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); +someGenerics7(function (n) { + return n; +}, function (n) { + return n; +}, function (n) { + return n; +}); // Generic call with argument of generic function type -function someGenerics8(n) { return n; } +function someGenerics8(n) { + return n; +} var x = someGenerics8(someGenerics7); // Error x(null, null, null); // Error // Generic call with multiple parameters of generic type passed arguments with no best common type @@ -169,14 +253,36 @@ function someGenerics9(a, b, c) { } var a9a = someGenerics9('', 0, []); var a9a; -var a9b = someGenerics9({ a: 0 }, { b: '' }, null); +var a9b = someGenerics9({ + a: 0 +}, { + b: '' +}, null); var a9b; -var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); +var a9e = someGenerics9(undefined, { + x: 6, + z: window +}, { + x: 6, + y: '' +}); var a9e; -var a9f = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); +var a9f = someGenerics9(undefined, { + x: 6, + z: window +}, { + x: 6, + y: '' +}); var a9f; // Generic call with multiple parameters of generic type passed arguments with a single best common type -var a9d = someGenerics9({ x: 3 }, { x: 6 }, { x: 6 }); +var a9d = someGenerics9({ + x: 3 +}, { + x: 6 +}, { + x: 6 +}); var a9d; // Generic call with multiple parameters of generic type where one argument is of type 'any' var anyVar; diff --git a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js index 8e2445d249c..7b0708c38a9 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js +++ b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js @@ -37,16 +37,25 @@ var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error //// [typeArgumentInferenceWithObjectLiteral.js] -function foo(x) { } +function foo(x) { +} var s; // Calls below should infer string for T and then assign that type to the value parameter foo({ - read: function () { return s; }, - write: function (value) { return s = value; } + read: function () { + return s; + }, + write: function (value) { + return s = value; + } }); foo({ - write: function (value) { return s = value; }, - read: function () { return s; } + write: function (value) { + return s = value; + }, + read: function () { + return s; + } }); var E1; (function (E1) { @@ -57,9 +66,44 @@ var E2; E2[E2["X"] = 0] = "X"; })(E2 || (E2 = {})); var v1; -var v1 = f1({ w: function (x) { return x; }, r: function () { return 0; } }, 0); -var v1 = f1({ w: function (x) { return x; }, r: function () { return 0; } }, 0 /* X */); -var v1 = f1({ w: function (x) { return x; }, r: function () { return 0 /* X */; } }, 0); +var v1 = f1({ + w: function (x) { + return x; + }, + r: function () { + return 0; + } +}, 0); +var v1 = f1({ + w: function (x) { + return x; + }, + r: function () { + return 0; + } +}, 0 /* X */); +var v1 = f1({ + w: function (x) { + return x; + }, + r: function () { + return 0 /* X */; + } +}, 0); var v2; -var v2 = f1({ w: function (x) { return x; }, r: function () { return 0 /* X */; } }, 0 /* X */); -var v3 = f1({ w: function (x) { return x; }, r: function () { return 0 /* X */; } }, 0 /* X */); // Error +var v2 = f1({ + w: function (x) { + return x; + }, + r: function () { + return 0 /* X */; + } +}, 0 /* X */); +var v3 = f1({ + w: function (x) { + return x; + }, + r: function () { + return 0 /* X */; + } +}, 0 /* X */); // Error diff --git a/tests/baselines/reference/typeAssertionToGenericFunctionType.js b/tests/baselines/reference/typeAssertionToGenericFunctionType.js index 15e5cf82f26..4f7d30dfbdd 100644 --- a/tests/baselines/reference/typeAssertionToGenericFunctionType.js +++ b/tests/baselines/reference/typeAssertionToGenericFunctionType.js @@ -8,8 +8,12 @@ x.b(); // error //// [typeAssertionToGenericFunctionType.js] var x = { - a: (function (x) { return 1; }), - b: function (x) { x; } + a: (function (x) { + return 1; + }), + b: function (x) { + x; + } }; x.a(1); // bug was that this caused 'Could not find symbol T' on return type T in the type assertion on x.a's definition x.b(); // error diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index 01acf58227b..c964ae94958 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -50,8 +50,10 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // Function call whose argument is a 1 arg generic function call with explicit type arguments -function fn1(t) { } -function fn2(t) { } +function fn1(t) { +} +function fn2(t) { +} fn1(fn2(4)); // Error var a; var s; diff --git a/tests/baselines/reference/typeCheckTypeArgument.js b/tests/baselines/reference/typeCheckTypeArgument.js index bec33393f92..720ee92a966 100644 --- a/tests/baselines/reference/typeCheckTypeArgument.js +++ b/tests/baselines/reference/typeCheckTypeArgument.js @@ -23,11 +23,14 @@ var Foo = (function () { } return Foo; })(); -function bar() { } +function bar() { +} var Foo2 = (function () { function Foo2() { } - Foo2.prototype.method = function () { }; + Foo2.prototype.method = function () { + }; return Foo2; })(); -(function (a) { }); +(function (a) { +}); diff --git a/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.js b/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.js index 9dad9fb671f..3ea78c7a3d8 100644 --- a/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.js +++ b/tests/baselines/reference/typeCheckingInsideFunctionExpressionInArray.js @@ -8,9 +8,15 @@ var functions = [function () { //// [typeCheckingInsideFunctionExpressionInArray.js] -var functions = [function () { +var functions = [ + function () { var k = 10; k = new Object(); - [1, 2, 3].NonexistantMethod(); + [ + 1, + 2, + 3 + ].NonexistantMethod(); derp(); - }]; + } +]; diff --git a/tests/baselines/reference/typeGuardsDefeat.js b/tests/baselines/reference/typeGuardsDefeat.js index 9670c260b57..bb70c2db825 100644 --- a/tests/baselines/reference/typeGuardsDefeat.js +++ b/tests/baselines/reference/typeGuardsDefeat.js @@ -69,7 +69,9 @@ function foo3(x) { return x.length; // string } else { - var f = function () { return x * x; }; + var f = function () { + return x * x; + }; } x = "hello"; f(); diff --git a/tests/baselines/reference/typeGuardsInConditionalExpression.js b/tests/baselines/reference/typeGuardsInConditionalExpression.js index 118ebbc02c0..ebe84879d2b 100644 --- a/tests/baselines/reference/typeGuardsInConditionalExpression.js +++ b/tests/baselines/reference/typeGuardsInConditionalExpression.js @@ -105,92 +105,73 @@ function foo12(x: number | string | boolean) { // the type of a variable or parameter is narrowed by any type guard in the condition when false, // provided the false expression contains no assignments to the variable or parameter. function foo(x) { - return typeof x === "string" - ? x.length // string - : x++; // number + return typeof x === "string" ? x.length // string + : x++; // number } function foo2(x) { // x is assigned in the if true branch, the type is not narrowed - return typeof x === "string" - ? (x = 10 && x) // string | number - : x; // string | number + return typeof x === "string" ? (x = 10 && x) // string | number + : x; // string | number } function foo3(x) { // x is assigned in the if false branch, the type is not narrowed // even though assigned using same type as narrowed expression - return typeof x === "string" - ? (x = "Hello" && x) // string | number - : x; // string | number + return typeof x === "string" ? (x = "Hello" && x) // string | number + : x; // string | number } function foo4(x) { // false branch updates the variable - so here it is not number // even though assigned using same type as narrowed expression - return typeof x === "string" - ? x // string | number - : (x = 10 && x); // string | number + return typeof x === "string" ? x // string | number + : (x = 10 && x); // string | number } function foo5(x) { // false branch updates the variable - so here it is not number - return typeof x === "string" - ? x // string | number - : (x = "hello" && x); // string | number + return typeof x === "string" ? x // string | number + : (x = "hello" && x); // string | number } function foo6(x) { // Modify in both branches - return typeof x === "string" - ? (x = 10 && x) // string | number - : (x = "hello" && x); // string | number + return typeof x === "string" ? (x = 10 && x) // string | number + : (x = "hello" && x); // string | number } function foo7(x) { - return typeof x === "string" - ? x === "hello" // string - : typeof x === "boolean" - ? x // boolean - : x == 10; // number + return typeof x === "string" ? x === "hello" // string + : typeof x === "boolean" ? x // boolean + : x == 10; // number } function foo8(x) { var b; - return typeof x === "string" - ? x === "hello" - : ((b = x) && - (typeof x === "boolean" - ? x // boolean - : x == 10)); // number + return typeof x === "string" ? x === "hello" : ((b = x) && (typeof x === "boolean" ? x // boolean + : x == 10)); // number } function foo9(x) { var y = 10; // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop - return typeof x === "string" - ? ((y = x.length) && x === "hello") // string - : x === 10; // number + return typeof x === "string" ? ((y = x.length) && x === "hello") // string + : x === 10; // number } function foo10(x) { // Mixing typeguards var b; - return typeof x === "string" - ? x // string - : ((b = x) // x is number | boolean - && typeof x === "number" - && x.toString()); // x is number + return typeof x === "string" ? x // string + : ((b = x) // x is number | boolean + && typeof x === "number" && x.toString()); // x is number } function foo11(x) { // Mixing typeguards // Assigning value to x deep inside another guard stops narrowing of type too var b; - return typeof x === "string" - ? x // number | boolean | string - changed in the false branch - : ((b = x) // x is number | boolean | string - because the assignment changed it - && typeof x === "number" - && (x = 10) // assignment to x - && x); // x is number | boolean | string + return typeof x === "string" ? x // number | boolean | string - changed in the false branch + : ((b = x) // x is number | boolean | string - because the assignment changed it + && typeof x === "number" && (x = 10) // assignment to x + && x); // x is number | boolean | string } function foo12(x) { // Mixing typeguards // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression var b; - return typeof x === "string" - ? (x = 10 && x.toString().length) // number | boolean | string - changed here - : ((b = x) // x is number | boolean | string - changed in true branch - && typeof x === "number" - && x); // x is number + return typeof x === "string" ? (x = 10 && x.toString().length) // number | boolean | string - changed here + : ((b = x) // x is number | boolean | string - changed in true branch + && typeof x === "number" && x); // x is number } diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js index 7cf19dac0ad..239eeb4bfe7 100644 --- a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.js @@ -82,44 +82,32 @@ module m1 { //// [typeGuardsInFunctionAndModuleBlock.js] // typeguards are scoped in function/module block function foo(x) { - return typeof x === "string" - ? x - : function f() { - var b = x; // number | boolean - return typeof x === "boolean" - ? x.toString() // boolean - : x.toString(); // number - }(); + return typeof x === "string" ? x : function f() { + var b = x; // number | boolean + return typeof x === "boolean" ? x.toString() // boolean + : x.toString(); // number + }(); } function foo2(x) { - return typeof x === "string" - ? x - : function f(a) { - var b = x; // new scope - number | boolean - return typeof x === "boolean" - ? x.toString() // boolean - : x.toString(); // number - }(x); // x here is narrowed to number | boolean + return typeof x === "string" ? x : function f(a) { + var b = x; // new scope - number | boolean + return typeof x === "boolean" ? x.toString() // boolean + : x.toString(); // number + }(x); // x here is narrowed to number | boolean } function foo3(x) { - return typeof x === "string" - ? x - : (function () { - var b = x; // new scope - number | boolean - return typeof x === "boolean" - ? x.toString() // boolean - : x.toString(); // number - })(); + return typeof x === "string" ? x : (function () { + var b = x; // new scope - number | boolean + return typeof x === "boolean" ? x.toString() // boolean + : x.toString(); // number + })(); } function foo4(x) { - return typeof x === "string" - ? x - : (function (a) { - var b = x; // new scope - number | boolean - return typeof x === "boolean" - ? x.toString() // boolean - : x.toString(); // number - })(x); // x here is narrowed to number | boolean + return typeof x === "string" ? x : (function (a) { + var b = x; // new scope - number | boolean + return typeof x === "boolean" ? x.toString() // boolean + : x.toString(); // number + })(x); // x here is narrowed to number | boolean } // Type guards affect nested function expressions, but not nested function declarations function foo5(x) { @@ -141,9 +129,8 @@ var m; y = x; // string; } else { - y = typeof x === "boolean" - ? x.toString() // boolean - : x.toString(); // number + y = typeof x === "boolean" ? x.toString() // boolean + : x.toString(); // number } })(m2 || (m2 = {})); })(m || (m = {})); @@ -160,9 +147,8 @@ var m1; y = x; // string; } else { - y = typeof x === "boolean" - ? x.toString() // boolean - : x.toString(); // number + y = typeof x === "boolean" ? x.toString() // boolean + : x.toString(); // number } })(m3 = m2.m3 || (m2.m3 = {})); })(m2 || (m2 = {})); diff --git a/tests/baselines/reference/typeGuardsInIfStatement.js b/tests/baselines/reference/typeGuardsInIfStatement.js index 820d205bc65..c228c038579 100644 --- a/tests/baselines/reference/typeGuardsInIfStatement.js +++ b/tests/baselines/reference/typeGuardsInIfStatement.js @@ -258,9 +258,8 @@ function foo10(x) { else { var y; var b = x; // number | boolean - return typeof x === "number" - ? x === 10 // number - : x; // x should be boolean + return typeof x === "number" ? x === 10 // number + : x; // x should be boolean } } function foo11(x) { @@ -272,15 +271,13 @@ function foo11(x) { else { var y; var b = x; // number | boolean | string - because below we are changing value of x in if statement - return typeof x === "number" - ? ( - // change value of x - x = 10 && x.toString() // number | boolean | string - ) - : ( - // do not change value - y = x && x.toString() // number | boolean | string - ); + return typeof x === "number" ? ( + // change value of x + x = 10 && x.toString() // number | boolean | string + ) : ( + // do not change value + y = x && x.toString() // number | boolean | string + ); } } function foo12(x) { @@ -292,8 +289,7 @@ function foo12(x) { else { x = 10; var b = x; // number | boolean | string - return typeof x === "number" - ? x.toString() // number - : x.toString(); // boolean | string + return typeof x === "number" ? x.toString() // number + : x.toString(); // boolean | string } } diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.js b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.js index e3f1a8c72c2..ffba829c37d 100644 --- a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.js +++ b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.js @@ -72,40 +72,36 @@ function foo3(x) { } function foo4(x) { return typeof x !== "string" // string | number | boolean - && typeof x !== "number" // number | boolean - && x; // boolean + && typeof x !== "number" // number | boolean + && x; // boolean } function foo5(x) { // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop var b; return typeof x !== "string" // string | number | boolean - && ((b = x) && (typeof x !== "number" // number | boolean - && x)); // boolean + && ((b = x) && (typeof x !== "number" // number | boolean + && x)); // boolean } function foo6(x) { // Mixing typeguard narrowing in if statement with conditional expression typeguard return typeof x !== "string" // string | number | boolean - && (typeof x !== "number" // number | boolean - ? x // boolean - : x === 10); // number + && (typeof x !== "number" // number | boolean + ? x // boolean + : x === 10); // number } function foo7(x) { var y; var z; // Mixing typeguard narrowing // Assigning value to x deep inside another guard stops narrowing of type too - return typeof x !== "string" - && ((z = x) // string | number | boolean - x changed deeper in conditional expression - && (typeof x === "number" - ? (x = 10 && x.toString()) // number | boolean | string - : (y = x && x.toString()))); // number | boolean | string + return typeof x !== "string" && ((z = x) // string | number | boolean - x changed deeper in conditional expression + && (typeof x === "number" ? (x = 10 && x.toString()) // number | boolean | string + : (y = x && x.toString()))); // number | boolean | string } function foo8(x) { // Mixing typeguard // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression - return typeof x !== "string" - && (x = 10) // change x - number| string - && (typeof x === "number" - ? x // number - : x.length); // string + return typeof x !== "string" && (x = 10) // change x - number| string + && (typeof x === "number" ? x // number + : x.length); // string } diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.js b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.js index 188d226da13..5f5880a4947 100644 --- a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.js +++ b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.js @@ -72,40 +72,36 @@ function foo3(x) { } function foo4(x) { return typeof x === "string" // string | number | boolean - || typeof x === "number" // number | boolean - || x; // boolean + || typeof x === "number" // number | boolean + || x; // boolean } function foo5(x) { // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop var b; return typeof x === "string" // string | number | boolean - || ((b = x) || (typeof x === "number" // number | boolean - || x)); // boolean + || ((b = x) || (typeof x === "number" // number | boolean + || x)); // boolean } function foo6(x) { // Mixing typeguard return typeof x === "string" // string | number | boolean - || (typeof x !== "number" // number | boolean - ? x // boolean - : x === 10); // number + || (typeof x !== "number" // number | boolean + ? x // boolean + : x === 10); // number } function foo7(x) { var y; var z; // Mixing typeguard narrowing // Assigning value to x deep inside another guard stops narrowing of type too - return typeof x === "string" - || ((z = x) // string | number | boolean - x changed deeper in conditional expression - || (typeof x === "number" - ? (x = 10 && x.toString()) // number | boolean | string - : (y = x && x.toString()))); // number | boolean | string + return typeof x === "string" || ((z = x) // string | number | boolean - x changed deeper in conditional expression + || (typeof x === "number" ? (x = 10 && x.toString()) // number | boolean | string + : (y = x && x.toString()))); // number | boolean | string } function foo8(x) { // Mixing typeguard // Assigning value to x in outer guard shouldn't stop narrowing in the inner expression - return typeof x === "string" - || (x = 10) // change x - number| string - || (typeof x === "number" - ? x // number - : x.length); // string + return typeof x === "string" || (x = 10) // change x - number| string + || (typeof x === "number" ? x // number + : x.length); // string } diff --git a/tests/baselines/reference/typeGuardsWithAny.js b/tests/baselines/reference/typeGuardsWithAny.js index be3d64b806f..08aed91edd8 100644 --- a/tests/baselines/reference/typeGuardsWithAny.js +++ b/tests/baselines/reference/typeGuardsWithAny.js @@ -38,7 +38,9 @@ else { //// [typeGuardsWithAny.js] -var x = { p: 0 }; +var x = { + p: 0 +}; if (x instanceof Object) { x.p; // No error, type any unaffected by instanceof type guard } diff --git a/tests/baselines/reference/typeIdentityConsidersBrands.js b/tests/baselines/reference/typeIdentityConsidersBrands.js index 2398033c2c6..002364a2e03 100644 --- a/tests/baselines/reference/typeIdentityConsidersBrands.js +++ b/tests/baselines/reference/typeIdentityConsidersBrands.js @@ -53,13 +53,15 @@ var Y_1 = (function () { } return Y_1; })(); -function foo(arg) { } +function foo(arg) { +} var a = new Y(); var b = new X(); a = b; // ok foo(a); // ok var a2 = new Y_1(); var b2 = new X_1(); -function foo2(arg) { } +function foo2(arg) { +} a2 = b2; // should error foo2(a2); // should error diff --git a/tests/baselines/reference/typeInfer1.js b/tests/baselines/reference/typeInfer1.js index f9613298838..bab1ebf930c 100644 --- a/tests/baselines/reference/typeInfer1.js +++ b/tests/baselines/reference/typeInfer1.js @@ -15,9 +15,13 @@ var yyyyyyyy: ITextWriter2 = { //// [typeInfer1.js] var x = { - Write: function (s) { }, - WriteLine: function (s) { } + Write: function (s) { + }, + WriteLine: function (s) { + } }; var yyyyyyyy = { - Moo: function () { return "cow"; } + Moo: function () { + return "cow"; + } }; diff --git a/tests/baselines/reference/typeInferenceConflictingCandidates.js b/tests/baselines/reference/typeInferenceConflictingCandidates.js index 2033c3b6b22..ea7834a0769 100644 --- a/tests/baselines/reference/typeInferenceConflictingCandidates.js +++ b/tests/baselines/reference/typeInferenceConflictingCandidates.js @@ -4,4 +4,6 @@ declare function g(a: T, b: T, c: (t: T) => T): T; g("", 3, a => a); //// [typeInferenceConflictingCandidates.js] -g("", 3, function (a) { return a; }); +g("", 3, function (a) { + return a; +}); diff --git a/tests/baselines/reference/typeInferenceFixEarly.js b/tests/baselines/reference/typeInferenceFixEarly.js index 58b8824c8b1..820f381e7ad 100644 --- a/tests/baselines/reference/typeInferenceFixEarly.js +++ b/tests/baselines/reference/typeInferenceFixEarly.js @@ -4,4 +4,6 @@ declare function f(p: (t: T) => T): T; f(n => 3); //// [typeInferenceFixEarly.js] -f(function (n) { return 3; }); +f(function (n) { + return 3; +}); diff --git a/tests/baselines/reference/typeInferenceWithTupleType.js b/tests/baselines/reference/typeInferenceWithTupleType.js index 10a18274c73..bc504b30b35 100644 --- a/tests/baselines/reference/typeInferenceWithTupleType.js +++ b/tests/baselines/reference/typeInferenceWithTupleType.js @@ -27,22 +27,39 @@ var zipResultEleEle = zipResult[0][0]; // string //// [typeInferenceWithTupleType.js] function combine(x, y) { - return [x, y]; + return [ + x, + y + ]; } var combineResult = combine("string", 10); var combineEle1 = combineResult[0]; // string var combineEle2 = combineResult[1]; // number function zip(array1, array2) { if (array1.length != array2.length) { - return [[undefined, undefined]]; + return [ + [ + undefined, + undefined + ] + ]; } var length = array1.length; var zipResult; for (var i = 0; i < length; ++i) { - zipResult.push([array1[i], array2[i]]); + zipResult.push([ + array1[i], + array2[i] + ]); } return zipResult; } -var zipResult = zip(["foo", "bar"], [5, 6]); +var zipResult = zip([ + "foo", + "bar" +], [ + 5, + 6 +]); var zipResultEle = zipResult[0]; // [string, number] var zipResultEleEle = zipResult[0][0]; // string diff --git a/tests/baselines/reference/typeInferenceWithTypeAnnotation.js b/tests/baselines/reference/typeInferenceWithTypeAnnotation.js index 119773f6e31..164be34cd29 100644 --- a/tests/baselines/reference/typeInferenceWithTypeAnnotation.js +++ b/tests/baselines/reference/typeInferenceWithTypeAnnotation.js @@ -4,4 +4,6 @@ declare function f(p: (t: T) => T): T; f((n: number) => n); //// [typeInferenceWithTypeAnnotation.js] -f(function (n) { return n; }); +f(function (n) { + return n; +}); diff --git a/tests/baselines/reference/typeLiteralCallback.js b/tests/baselines/reference/typeLiteralCallback.js index 82c8b37e454..8f940581916 100644 --- a/tests/baselines/reference/typeLiteralCallback.js +++ b/tests/baselines/reference/typeLiteralCallback.js @@ -17,5 +17,9 @@ test.fail2(arg => foo.reject(arg)); // Should be OK. Was: Error: Supplied para //// [typeLiteralCallback.js] var foo; var test; -test.fail(function (arg) { return foo.reject(arg); }); -test.fail2(function (arg) { return foo.reject(arg); }); // Should be OK. Was: Error: Supplied parameters do not match any signature of call target +test.fail(function (arg) { + return foo.reject(arg); +}); +test.fail2(function (arg) { + return foo.reject(arg); +}); // Should be OK. Was: Error: Supplied parameters do not match any signature of call target diff --git a/tests/baselines/reference/typeMatch2.js b/tests/baselines/reference/typeMatch2.js index 1fd624e4e5b..c59bfad8b13 100644 --- a/tests/baselines/reference/typeMatch2.js +++ b/tests/baselines/reference/typeMatch2.js @@ -52,11 +52,23 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; function f1() { - var a = { x: 1, y: 2 }; + var a = { + x: 1, + y: 2 + }; a = {}; // error - a = { x: 1 }; // error - a = { x: 1, y: 2, z: 3 }; - a = { x: 1, z: 3 }; // error + a = { + x: 1 + }; // error + a = { + x: 1, + y: 2, + z: 3 + }; + a = { + x: 1, + z: 3 + }; // error } var Animal = (function () { function Animal() { @@ -73,12 +85,26 @@ var Giraffe = (function (_super) { function f2() { var a = new Animal(); var g = new Giraffe(); - var aa = [a, a, a]; - var gg = [g, g, g]; + var aa = [ + a, + a, + a + ]; + var gg = [ + g, + g, + g + ]; aa = gg; gg = aa; // error - var xa = { f1: 5, f2: aa }; - var xb = { f1: 5, f2: gg }; + var xa = { + f1: 5, + f2: aa + }; + var xb = { + f1: 5, + f2: gg + }; xa = xb; // Should be ok xb = xa; // Not ok } @@ -87,14 +113,36 @@ function f4() { var i = 5; i = null; i = undefined; - var a = { x: 1, y: 1 }; - a = { x: 1, y: null }; - a = { x: 1, y: undefined }; - a = { x: 1, y: _any }; - a = { x: 1, y: _any, z: 1 }; - a = { x: 1 }; // error - var mf = function m(n) { return false; }; - var zf = function z(n) { return true; }; + var a = { + x: 1, + y: 1 + }; + a = { + x: 1, + y: null + }; + a = { + x: 1, + y: undefined + }; + a = { + x: 1, + y: _any + }; + a = { + x: 1, + y: _any, + z: 1 + }; + a = { + x: 1 + }; // error + var mf = function m(n) { + return false; + }; + var zf = function z(n) { + return true; + }; mf = zf; mf(_any); zf(_any); diff --git a/tests/baselines/reference/typeOfOnTypeArg.js b/tests/baselines/reference/typeOfOnTypeArg.js index 199233065b4..ff304c05697 100644 --- a/tests/baselines/reference/typeOfOnTypeArg.js +++ b/tests/baselines/reference/typeOfOnTypeArg.js @@ -9,7 +9,9 @@ fill(32); //// [typeOfOnTypeArg.js] -var A = { '': 3 }; +var A = { + '': 3 +}; function fill(f) { } fill(32); diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.js b/tests/baselines/reference/typeOfThisInInstanceMember.js index 5e4b4f2970d..7d88d98cf74 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.js +++ b/tests/baselines/reference/typeOfThisInInstanceMember.js @@ -59,7 +59,11 @@ var r = c.x; var ra = c.x.x.x; var r2 = c.y; var r3 = c.foo(); -var rs = [r, r2, r3]; +var rs = [ + r, + r2, + r3 +]; rs.forEach(function (x) { x.foo; x.x; diff --git a/tests/baselines/reference/typeOfThisInInstanceMember2.js b/tests/baselines/reference/typeOfThisInInstanceMember2.js index b2b81ce3a23..e094e232ec1 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember2.js +++ b/tests/baselines/reference/typeOfThisInInstanceMember2.js @@ -64,7 +64,11 @@ var ra = c.x.x.x; var r2 = c.y; var r3 = c.foo(); var r4 = c.z; -var rs = [r, r2, r3]; +var rs = [ + r, + r2, + r3 +]; rs.forEach(function (x) { x.foo; x.x; diff --git a/tests/baselines/reference/typeParameterAsElementType.js b/tests/baselines/reference/typeParameterAsElementType.js index a934f3d0330..ce4364e7407 100644 --- a/tests/baselines/reference/typeParameterAsElementType.js +++ b/tests/baselines/reference/typeParameterAsElementType.js @@ -7,5 +7,8 @@ function fee() { //// [typeParameterAsElementType.js] function fee() { var t; - var arr = [t, ""]; + var arr = [ + t, + "" + ]; } diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraint.js index 9266f520867..f432358a1ca 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint.js @@ -29,16 +29,32 @@ foo2(1, ['']); //// [typeParameterAsTypeParameterConstraint.js] // using a type parameter as a constraint for a type parameter is valid // no errors expected except illegal constraints -function foo(x, y) { return y; } +function foo(x, y) { + return y; +} var r = foo(1, 2); var r = foo({}, 1); var a; var b; var r2 = foo(a, b); -var r3 = foo({ x: 1 }, { x: 2, y: 3 }); -function foo2(x, y) { return y; } +var r3 = foo({ + x: 1 +}, { + x: 2, + y: 3 +}); +function foo2(x, y) { + return y; +} foo2(1, ''); -foo2({}, { length: 2 }); -foo2(1, { width: 3, length: 2 }); +foo2({}, { + length: 2 +}); +foo2(1, { + width: 3, + length: 2 +}); foo2(1, []); -foo2(1, ['']); +foo2(1, [ + '' +]); diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js index e8066b9ebfa..a3f4d8d5259 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraint2.js @@ -21,12 +21,22 @@ foo2([], ['']); //// [typeParameterAsTypeParameterConstraint2.js] // using a type parameter as a constraint for a type parameter is invalid // these should be errors unless otherwise noted -function foo(x, y) { return y; } // this is now an error +function foo(x, y) { + return y; +} // this is now an error foo(1, ''); foo(1, {}); var n; var r3 = foo(1, n); -function foo2(x, y) { return y; } // this is now an error -foo2(1, { length: '' }); -foo2(1, { length: {} }); -foo2([], ['']); +function foo2(x, y) { + return y; +} // this is now an error +foo2(1, { + length: '' +}); +foo2(1, { + length: {} +}); +foo2([], [ + '' +]); diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js index bc50363036d..669139058ed 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js @@ -30,15 +30,39 @@ foo(b, b, { foo: 1, bar: '', hm: '' }); var a; var b; var c; -function foo(x, y, z) { return z; } +function foo(x, y, z) { + return z; +} //function foo(x: T, y: U, z: V): V { return z; } foo(1, 2, 3); -foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: '', z: true }); +foo({ + x: 1 +}, { + x: 1, + y: '' +}, { + x: 2, + y: '', + z: true +}); foo(a, b, c); -foo(a, b, { foo: 1, bar: '', hm: true }); -foo(function (x, y) { }, function (x) { }, function () { }); -function foo2(x, y, z) { return z; } +foo(a, b, { + foo: 1, + bar: '', + hm: true +}); +foo(function (x, y) { +}, function (x) { +}, function () { +}); +function foo2(x, y, z) { + return z; +} //function foo2(x: T, y: U, z: V): V { return z; } foo(a, a, a); foo(a, b, c); -foo(b, b, { foo: 1, bar: '', hm: '' }); +foo(b, b, { + foo: 1, + bar: '', + hm: '' +}); diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js index 6541cfaa231..32bad4dc3c3 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js @@ -29,14 +29,34 @@ foo(c, c, a); var a; var b; var c; -function foo(x, y, z) { return z; } +function foo(x, y, z) { + return z; +} //function foo(x: T, y: U, z: V): V { return z; } foo(1, 2, ''); -foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }); +foo({ + x: 1 +}, { + x: 1, + y: '' +}, { + x: 2, + y: 2, + z: true +}); foo(a, b, a); -foo(a, { foo: 1, bar: '', hm: true }, b); -foo(function (x, y) { }, function (x, y) { }, function () { }); -function foo2(x, y, z) { return z; } +foo(a, { + foo: 1, + bar: '', + hm: true +}, b); +foo(function (x, y) { +}, function (x, y) { +}, function () { +}); +function foo2(x, y, z) { + return z; +} //function foo2(x: T, y: U, z: V): V { return z; } foo(b, a, c); foo(c, c, a); diff --git a/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js b/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js index 7e923941386..04fb7b1dc25 100644 --- a/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js +++ b/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js @@ -25,10 +25,14 @@ i2 = a2; // no error //// [typeParameterCompatibilityAccrossDeclarations.js] define(["require", "exports"], function (require, exports) { var a = { - x: function (y) { return null; } + x: function (y) { + return null; + } }; var a2 = { - x: function (y) { return null; } + x: function (y) { + return null; + } }; var i; var i2; diff --git a/tests/baselines/reference/typeParameterConstraints1.js b/tests/baselines/reference/typeParameterConstraints1.js index 6ffefbcf8f1..49d347f576b 100644 --- a/tests/baselines/reference/typeParameterConstraints1.js +++ b/tests/baselines/reference/typeParameterConstraints1.js @@ -14,16 +14,29 @@ function foo12(test: T) { } function foo13(test: T) { } //// [typeParameterConstraints1.js] -function foo1(test) { } -function foo2(test) { } -function foo3(test) { } -function foo4(test) { } // valid -function foo5(test) { } // valid -function foo6(test) { } -function foo7(test) { } // valid -function foo8(test) { } -function foo9(test) { } -function foo10(test) { } -function foo11(test) { } -function foo12(test) { } -function foo13(test) { } +function foo1(test) { +} +function foo2(test) { +} +function foo3(test) { +} +function foo4(test) { +} // valid +function foo5(test) { +} // valid +function foo6(test) { +} +function foo7(test) { +} // valid +function foo8(test) { +} +function foo9(test) { +} +function foo10(test) { +} +function foo11(test) { +} +function foo12(test) { +} +function foo13(test) { +} diff --git a/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js b/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js index a14e010515b..85f86f7de76 100644 --- a/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js +++ b/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js @@ -30,8 +30,12 @@ var C2 = (function () { } return C2; })(); -function f() { } -function f2() { } +function f() { +} +function f2() { +} var a; -var b = function () { }; -var b2 = function () { }; +var b = function () { +}; +var b2 = function () { +}; diff --git a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js index 3cdb735adfb..fc0e10d41c9 100644 --- a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js +++ b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js @@ -29,11 +29,15 @@ var C2 = (function () { } return C2; })(); -function f() { } -function f2() { } +function f() { +} +function f2() { +} var a; -var b = function () { }; -var b2 = function () { }; +var b = function () { +}; +var b2 = function () { +}; var D = (function () { function D() { } diff --git a/tests/baselines/reference/typeParameterOrderReversal.js b/tests/baselines/reference/typeParameterOrderReversal.js index 40df6db0034..8c9185ba57c 100644 --- a/tests/baselines/reference/typeParameterOrderReversal.js +++ b/tests/baselines/reference/typeParameterOrderReversal.js @@ -15,8 +15,10 @@ tFirst(z); //// [typeParameterOrderReversal.js] // Only difference here is order of type parameters -function uFirst(x) { } -function tFirst(x) { } +function uFirst(x) { +} +function tFirst(x) { +} var z = null; // Both of these should be allowed uFirst(z); diff --git a/tests/baselines/reference/typeParameterUsedAsConstraint.js b/tests/baselines/reference/typeParameterUsedAsConstraint.js index b1c55343aa0..4649a53f8fc 100644 --- a/tests/baselines/reference/typeParameterUsedAsConstraint.js +++ b/tests/baselines/reference/typeParameterUsedAsConstraint.js @@ -66,18 +66,30 @@ var C6 = (function () { } return C6; })(); -function f() { } -function f2() { } -function f3() { } -function f4() { } -function f5() { } -function f6() { } -var e = function () { }; -var e2 = function () { }; -var e3 = function () { }; -var e4 = function () { }; -var e5 = function () { }; -var e6 = function () { }; +function f() { +} +function f2() { +} +function f3() { +} +function f4() { +} +function f5() { +} +function f6() { +} +var e = function () { +}; +var e2 = function () { +}; +var e3 = function () { +}; +var e4 = function () { +}; +var e5 = function () { +}; +var e6 = function () { +}; var a; var a2; var a3; diff --git a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js index c6c624f7e2b..a2f8aa2f9b7 100644 --- a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js +++ b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js @@ -78,26 +78,37 @@ interface I2 { //// [typeParametersAreIdenticalToThemselves.js] // type parameters from the same declaration are identical to themself -function foo1(x) { } -function foo2(x) { } +function foo1(x) { +} +function foo2(x) { +} function foo3(x, y) { - function inner(x) { } - function inner2(x) { } + function inner(x) { + } + function inner2(x) { + } } var C = (function () { function C() { } - C.prototype.foo1 = function (x) { }; - C.prototype.foo2 = function (a, x) { }; - C.prototype.foo3 = function (x) { }; - C.prototype.foo4 = function (x) { }; + C.prototype.foo1 = function (x) { + }; + C.prototype.foo2 = function (a, x) { + }; + C.prototype.foo3 = function (x) { + }; + C.prototype.foo4 = function (x) { + }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo1 = function (x) { }; - C2.prototype.foo2 = function (a, x) { }; - C2.prototype.foo3 = function (x) { }; + C2.prototype.foo1 = function (x) { + }; + C2.prototype.foo2 = function (a, x) { + }; + C2.prototype.foo3 = function (x) { + }; return C2; })(); diff --git a/tests/baselines/reference/typeParametersInStaticAccessors.js b/tests/baselines/reference/typeParametersInStaticAccessors.js index c621de910bc..411a4eac69d 100644 --- a/tests/baselines/reference/typeParametersInStaticAccessors.js +++ b/tests/baselines/reference/typeParametersInStaticAccessors.js @@ -9,12 +9,15 @@ var foo = (function () { function foo() { } Object.defineProperty(foo, "Foo", { - get: function () { return null; }, + get: function () { + return null; + }, enumerable: true, configurable: true }); Object.defineProperty(foo, "Bar", { - set: function (v) { }, + set: function (v) { + }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/typeQueryOnClass.js b/tests/baselines/reference/typeQueryOnClass.js index 1c8b2424a7e..a3ae0bd02c1 100644 --- a/tests/baselines/reference/typeQueryOnClass.js +++ b/tests/baselines/reference/typeQueryOnClass.js @@ -62,10 +62,14 @@ var C = (function () { var _this = this; this.x = x; this.ia = 1; - this.ib = function () { return _this.ia; }; + this.ib = function () { + return _this.ia; + }; } - C.foo = function (x) { }; - C.bar = function (x) { }; + C.foo = function (x) { + }; + C.bar = function (x) { + }; Object.defineProperty(C, "sc", { get: function () { return 1; @@ -82,7 +86,9 @@ var C = (function () { enumerable: true, configurable: true }); - C.prototype.baz = function (x) { return ''; }; + C.prototype.baz = function (x) { + return ''; + }; Object.defineProperty(C.prototype, "ic", { get: function () { return 1; @@ -100,7 +106,9 @@ var C = (function () { configurable: true }); C.sa = 1; - C.sb = function () { return 1; }; + C.sb = function () { + return 1; + }; return C; })(); var c; @@ -111,7 +119,8 @@ var D = (function () { function D(y) { this.y = y; } - D.prototype.foo = function () { }; + D.prototype.foo = function () { + }; return D; })(); var d; diff --git a/tests/baselines/reference/typeResolution.js b/tests/baselines/reference/typeResolution.js index 55a6beeceba..74102f5a0fd 100644 --- a/tests/baselines/reference/typeResolution.js +++ b/tests/baselines/reference/typeResolution.js @@ -224,21 +224,24 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn1_2_2 = function () { }; + ClassA.prototype.AisIn1_2_2 = function () { + }; return ClassA; })(); SubSubModule2.ClassA = ClassA; var ClassB = (function () { function ClassB() { } - ClassB.prototype.BisIn1_2_2 = function () { }; + ClassB.prototype.BisIn1_2_2 = function () { + }; return ClassB; })(); SubSubModule2.ClassB = ClassB; var ClassC = (function () { function ClassC() { } - ClassC.prototype.CisIn1_2_2 = function () { }; + ClassC.prototype.CisIn1_2_2 = function () { + }; return ClassC; })(); SubSubModule2.ClassC = ClassC; @@ -247,7 +250,8 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn1 = function () { }; + ClassA.prototype.AisIn1 = function () { + }; return ClassA; })(); var NotExportedModule; @@ -267,7 +271,8 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn2_3 = function () { }; + ClassA.prototype.AisIn2_3 = function () { + }; return ClassA; })(); SubModule3.ClassA = ClassA; diff --git a/tests/baselines/reference/typeResolution.js.map b/tests/baselines/reference/typeResolution.js.map index 8bbff8aa760..b4aa7040531 100644 --- a/tests/baselines/reference/typeResolution.js.map +++ b/tests/baselines/reference/typeResolution.js.map @@ -1,2 +1,2 @@ //// [typeResolution.js.map] -{"version":3,"file":"typeResolution.js","sourceRoot":"","sources":["typeResolution.ts"],"names":["TopLevelModule1","TopLevelModule1.SubModule1","TopLevelModule1.SubModule1.SubSubModule1","TopLevelModule1.SubModule1.SubSubModule1.ClassA","TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.ClassB","TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ","TopLevelModule1.SubModule1.ClassA","TopLevelModule1.SubModule1.ClassA.constructor","TopLevelModule1.SubModule1.ClassA.constructor.AA","TopLevelModule1.SubModule2","TopLevelModule1.SubModule2.SubSubModule2","TopLevelModule1.SubModule2.SubSubModule2.ClassA","TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassB","TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassC","TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2","TopLevelModule1.ClassA","TopLevelModule1.ClassA.constructor","TopLevelModule1.ClassA.AisIn1","TopLevelModule1.NotExportedModule","TopLevelModule1.NotExportedModule.ClassA","TopLevelModule1.NotExportedModule.ClassA.constructor","TopLevelModule2","TopLevelModule2.SubModule3","TopLevelModule2.SubModule3.ClassA","TopLevelModule2.SubModule3.ClassA.constructor","TopLevelModule2.SubModule3.ClassA.AisIn2_3"],"mappings":";IAAA,IAAc,eAAe,CAmG5B;IAnGD,WAAc,eAAe,EAAC,CAAC;QAC3BA,IAAcA,UAAUA,CAwEvBA;QAxEDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAcA,aAAaA,CAwD1BA;YAxDDA,WAAcA,aAAaA,EAACA,CAACA;gBACzBC;oBAAAC;oBAmBAC,CAACA;oBAlBUD,2BAAUA,GAAjBA;wBAEIE,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAnBDD,IAmBCA;gBAnBYA,oBAAMA,SAmBlBA,CAAAA;gBACDA;oBAAAI;oBAsBAC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAG/CA,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAGzDA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAtBDJ,IAsBCA;gBAtBYA,oBAAMA,SAsBlBA,CAAAA;gBAEDA;oBACIO;wBACIC;4BAEIC,AADAA,uCAAuCA;gCACnCA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAcA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACpCA,IAAIA,EAAqCA,CAACA;4BAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAC7DA,CAACA;oBACLD,CAACA;oBACLD,wBAACA;gBAADA,CAACA,AAVDP,IAUCA;YACLA,CAACA,EAxDaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAwD1BA;YAGDA,AADAA,0EAA0EA;;gBAEtEW;oBACIC;wBACIC,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;gBACLD,CAACA;gBACLD,aAACA;YAADA,CAACA,AAXDX,IAWCA;QACLA,CAACA,EAxEaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAwEvBA;QAEDA,IAAcA,UAAUA,CAWvBA;QAXDA,WAAcA,UAAUA,EAACA,CAACA;YACtBe,IAAcA,aAAaA,CAO1BA;YAPDA,WAAcA,aAAaA,EAACA,CAACA;gBAEzBC,AADAA,6DAA6DA;;oBAC7DC;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAC/CA;oBAAAI;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CJ,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAC/CA;oBAAAO;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA,cAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CP,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAEZA,JACvCA,CAACA,EAPaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAO1BA;YAE0CA,JAC/CA,CAACA,EAXaf,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAEDA;YAAA0B;YAEAC,CAACA;YADUD,uBAAMA,GAAbA,cAAkBE,CAACA;YACvBF,aAACA;QAADA,CAACA,AAFD1B,IAECA;QAMDA,IAAOA,iBAAiBA,CAEvBA;QAFDA,WAAOA,iBAAiBA,EAACA,CAACA;YACtB6B;gBAAAC;gBAAsBC,CAACA;gBAADD,aAACA;YAADA,CAACA,AAAvBD,IAAuBA;YAAVA,wBAAMA,SAAIA,CAAAA;QAC3BA,CAACA,EAFM7B,iBAAiBA,KAAjBA,iBAAiBA,QAEvBA;IACLA,CAACA,EAnGa,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAmG5B;IAED,IAAO,eAAe,CAMrB;IAND,WAAO,eAAe,EAAC,CAAC;QACpBgC,IAAcA,UAAUA,CAIvBA;QAJDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC;gBAAAC;gBAEAC,CAACA;gBADUD,yBAAQA,GAAfA,cAAoBE,CAACA;gBACzBF,aAACA;YAADA,CAACA,AAFDD,IAECA;YAFYA,iBAAMA,SAElBA,CAAAA;QACLA,CAACA,EAJaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAIvBA;IACLA,CAACA,EANM,eAAe,KAAf,eAAe,QAMrB"} \ No newline at end of file +{"version":3,"file":"typeResolution.js","sourceRoot":"","sources":["typeResolution.ts"],"names":["TopLevelModule1","TopLevelModule1.SubModule1","TopLevelModule1.SubModule1.SubSubModule1","TopLevelModule1.SubModule1.SubSubModule1.ClassA","TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.ClassB","TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ","TopLevelModule1.SubModule1.ClassA","TopLevelModule1.SubModule1.ClassA.constructor","TopLevelModule1.SubModule1.ClassA.constructor.AA","TopLevelModule1.SubModule2","TopLevelModule1.SubModule2.SubSubModule2","TopLevelModule1.SubModule2.SubSubModule2.ClassA","TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassB","TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassC","TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2","TopLevelModule1.ClassA","TopLevelModule1.ClassA.constructor","TopLevelModule1.ClassA.AisIn1","TopLevelModule1.NotExportedModule","TopLevelModule1.NotExportedModule.ClassA","TopLevelModule1.NotExportedModule.ClassA.constructor","TopLevelModule2","TopLevelModule2.SubModule3","TopLevelModule2.SubModule3.ClassA","TopLevelModule2.SubModule3.ClassA.constructor","TopLevelModule2.SubModule3.ClassA.AisIn2_3"],"mappings":";IAAA,IAAc,eAAe,CAmG5B;IAnGD,WAAc,eAAe,EAAC,CAAC;QAC3BA,IAAcA,UAAUA,CAwEvBA;QAxEDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAcA,aAAaA,CAwD1BA;YAxDDA,WAAcA,aAAaA,EAACA,CAACA;gBACzBC;oBAAAC;oBAmBAC,CAACA;oBAlBUD,2BAAUA,GAAjBA;wBAEIE,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAnBDD,IAmBCA;gBAnBYA,oBAAMA,SAmBlBA,CAAAA;gBACDA;oBAAAI;oBAsBAC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAG/CA,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAGzDA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAtBDJ,IAsBCA;gBAtBYA,oBAAMA,SAsBlBA,CAAAA;gBAEDA;oBACIO;wBACIC;4BAEIC,AADAA,uCAAuCA;gCACnCA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAcA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACpCA,IAAIA,EAAqCA,CAACA;4BAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAC7DA,CAACA;oBACLD,CAACA;oBACLD,wBAACA;gBAADA,CAACA,AAVDP,IAUCA;YACLA,CAACA,EAxDaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAwD1BA;YAGDA,AADAA,0EAA0EA;;gBAEtEW;oBACIC;wBACIC,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;gBACLD,CAACA;gBACLD,aAACA;YAADA,CAACA,AAXDX,IAWCA;QACLA,CAACA,EAxEaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAwEvBA;QAEDA,IAAcA,UAAUA,CAWvBA;QAXDA,WAAcA,UAAUA,EAACA,CAACA;YACtBe,IAAcA,aAAaA,CAO1BA;YAPDA,WAAcA,aAAaA,EAACA,CAACA;gBAEzBC,AADAA,6DAA6DA;;oBAC7DC;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAC/CA;oBAAAI;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CJ,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAC/CA;oBAAAO;oBAA8CC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CP,IAA+CA;gBAAlCA,oBAAMA,SAA4BA,CAAAA;gBAEZA,JACvCA,CAACA,EAPaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAO1BA;YAE0CA,JAC/CA,CAACA,EAXaf,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAEDA;YAAA0B;YAEAC,CAACA;YADUD,uBAAMA,GAAbA;YAAkBE,CAACA;YACvBF,aAACA;QAADA,CAACA,AAFD1B,IAECA;QAMDA,IAAOA,iBAAiBA,CAEvBA;QAFDA,WAAOA,iBAAiBA,EAACA,CAACA;YACtB6B;gBAAAC;gBAAsBC,CAACA;gBAADD,aAACA;YAADA,CAACA,AAAvBD,IAAuBA;YAAVA,wBAAMA,SAAIA,CAAAA;QAC3BA,CAACA,EAFM7B,iBAAiBA,KAAjBA,iBAAiBA,QAEvBA;IACLA,CAACA,EAnGa,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAmG5B;IAED,IAAO,eAAe,CAMrB;IAND,WAAO,eAAe,EAAC,CAAC;QACpBgC,IAAcA,UAAUA,CAIvBA;QAJDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC;gBAAAC;gBAEAC,CAACA;gBADUD,yBAAQA,GAAfA;gBAAoBE,CAACA;gBACzBF,aAACA;YAADA,CAACA,AAFDD,IAECA;YAFYA,iBAAMA,SAElBA,CAAAA;QACLA,CAACA,EAJaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAIvBA;IACLA,CAACA,EANM,eAAe,KAAf,eAAe,QAMrB"} \ No newline at end of file diff --git a/tests/baselines/reference/typeResolution.sourcemap.txt b/tests/baselines/reference/typeResolution.sourcemap.txt index a7d8bd170f1..54b2c44eae6 100644 --- a/tests/baselines/reference/typeResolution.sourcemap.txt +++ b/tests/baselines/reference/typeResolution.sourcemap.txt @@ -2176,36 +2176,39 @@ sourceFile:typeResolution.ts >>> } 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->export class ClassA { public AisIn1_2_2() { } 2 > } 1->Emitted(113, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) 2 >Emitted(113, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) --- ->>> ClassA.prototype.AisIn1_2_2 = function () { }; +>>> ClassA.prototype.AisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > AisIn1_2_2 3 > -4 > public AisIn1_2_2() { -5 > } 1->Emitted(114, 21) Source(79, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) 2 >Emitted(114, 48) Source(79, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) 3 >Emitted(114, 51) Source(79, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -4 >Emitted(114, 65) Source(79, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) -5 >Emitted(114, 66) Source(79, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public AisIn1_2_2() { +2 > } +1 >Emitted(115, 21) Source(79, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) +2 >Emitted(115, 22) Source(79, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) --- >>> return ClassA; -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +1-> 2 > } -1 >Emitted(115, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(115, 34) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +1->Emitted(116, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(116, 34) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2217,10 +2220,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassA { public AisIn1_2_2() { } } -1 >Emitted(116, 17) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(116, 18) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -3 >Emitted(116, 18) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(116, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(117, 17) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(117, 18) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +3 >Emitted(117, 18) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(117, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassA = ClassA; 1->^^^^^^^^^^^^^^^^ @@ -2231,57 +2234,60 @@ sourceFile:typeResolution.ts 2 > ClassA 3 > { public AisIn1_2_2() { } } 4 > -1->Emitted(117, 17) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(117, 37) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(117, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(117, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(118, 17) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(118, 37) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(118, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(118, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassB = (function () { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(118, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(119, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassB() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(119, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1->Emitted(120, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->export class ClassB { public BisIn1_2_2() { } 2 > } -1->Emitted(120, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) -2 >Emitted(120, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) +1->Emitted(121, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) +2 >Emitted(121, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) --- ->>> ClassB.prototype.BisIn1_2_2 = function () { }; +>>> ClassB.prototype.BisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > BisIn1_2_2 3 > -4 > public BisIn1_2_2() { -5 > } -1->Emitted(121, 21) Source(80, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(121, 48) Source(80, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(121, 51) Source(80, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -4 >Emitted(121, 65) Source(80, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) -5 >Emitted(121, 66) Source(80, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) +1->Emitted(122, 21) Source(80, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(122, 48) Source(80, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(122, 51) Source(80, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public BisIn1_2_2() { +2 > } +1 >Emitted(123, 21) Source(80, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) +2 >Emitted(123, 22) Source(80, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) --- >>> return ClassB; -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +1-> 2 > } -1 >Emitted(122, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(122, 34) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1->Emitted(124, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(124, 34) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2293,10 +2299,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassB { public BisIn1_2_2() { } } -1 >Emitted(123, 17) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(123, 18) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(123, 18) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(123, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(125, 17) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(125, 18) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(125, 18) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(125, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassB = ClassB; 1->^^^^^^^^^^^^^^^^ @@ -2307,57 +2313,60 @@ sourceFile:typeResolution.ts 2 > ClassB 3 > { public BisIn1_2_2() { } } 4 > -1->Emitted(124, 17) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(124, 37) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(124, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(124, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(126, 17) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(126, 37) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(126, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(126, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassC = (function () { 1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > -1 >Emitted(125, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(127, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassC() { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(126, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(128, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> } 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->export class ClassC { public CisIn1_2_2() { } 2 > } -1->Emitted(127, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) -2 >Emitted(127, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) +1->Emitted(129, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) +2 >Emitted(129, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) --- ->>> ClassC.prototype.CisIn1_2_2 = function () { }; +>>> ClassC.prototype.CisIn1_2_2 = function () { 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > CisIn1_2_2 3 > -4 > public CisIn1_2_2() { -5 > } -1->Emitted(128, 21) Source(81, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(128, 48) Source(81, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(128, 51) Source(81, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -4 >Emitted(128, 65) Source(81, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) -5 >Emitted(128, 66) Source(81, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) +1->Emitted(130, 21) Source(81, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(130, 48) Source(81, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(130, 51) Source(81, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public CisIn1_2_2() { +2 > } +1 >Emitted(131, 21) Source(81, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) +2 >Emitted(131, 22) Source(81, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) --- >>> return ClassC; -1 >^^^^^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +1-> 2 > } -1 >Emitted(129, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(129, 34) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(132, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(132, 34) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2369,10 +2378,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassC { public CisIn1_2_2() { } } -1 >Emitted(130, 17) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(130, 18) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(130, 18) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(130, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(133, 17) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(133, 18) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(133, 18) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(133, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassC = ClassC; 1->^^^^^^^^^^^^^^^^ @@ -2384,10 +2393,10 @@ sourceFile:typeResolution.ts 2 > ClassC 3 > { public CisIn1_2_2() { } } 4 > -1->Emitted(131, 17) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(131, 37) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(131, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(131, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(134, 17) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(134, 37) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(134, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(134, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> })(SubSubModule2 = SubModule2.SubSubModule2 || (SubModule2.SubSubModule2 = {})); 1->^^^^^^^^^^^^^^^^ @@ -2420,16 +2429,16 @@ sourceFile:typeResolution.ts > export interface InterfaceY { YisIn1_2_2(); } > interface NonExportedInterfaceQ { } > } -1->Emitted(132, 17) Source(83, 48) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(132, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(132, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(132, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -5 >Emitted(132, 29) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -6 >Emitted(132, 32) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -7 >Emitted(132, 56) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -8 >Emitted(132, 61) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -9 >Emitted(132, 85) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -10>Emitted(132, 93) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) +1->Emitted(135, 17) Source(83, 48) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(135, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(135, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(135, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +5 >Emitted(135, 29) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +6 >Emitted(135, 32) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +7 >Emitted(135, 56) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +8 >Emitted(135, 61) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +9 >Emitted(135, 85) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +10>Emitted(135, 93) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) --- >>> })(SubModule2 = TopLevelModule1.SubModule2 || (TopLevelModule1.SubModule2 = {})); 1 >^^^^^^^^^^^^ @@ -2466,16 +2475,16 @@ sourceFile:typeResolution.ts > > export interface InterfaceY { YisIn1_2(); } > } -1 >Emitted(133, 13) Source(86, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2) -2 >Emitted(133, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) -3 >Emitted(133, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) -4 >Emitted(133, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(133, 22) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(133, 25) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(133, 51) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -8 >Emitted(133, 56) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -9 >Emitted(133, 82) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -10>Emitted(133, 90) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(136, 13) Source(86, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2) +2 >Emitted(136, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) +3 >Emitted(136, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) +4 >Emitted(136, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(136, 22) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(136, 25) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(136, 51) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +8 >Emitted(136, 56) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +9 >Emitted(136, 82) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +10>Emitted(136, 90) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> var ClassA = (function () { 1 >^^^^^^^^ @@ -2483,50 +2492,53 @@ sourceFile:typeResolution.ts 1 > > > -1 >Emitted(134, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(137, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) --- >>> function ClassA() { 1->^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(135, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +1->Emitted(138, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> } 1->^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->class ClassA { > public AisIn1() { } > 2 > } -1->Emitted(136, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) -2 >Emitted(136, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) +1->Emitted(139, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) +2 >Emitted(139, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) --- ->>> ClassA.prototype.AisIn1 = function () { }; +>>> ClassA.prototype.AisIn1 = function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > AisIn1 3 > -4 > public AisIn1() { -5 > } -1->Emitted(137, 13) Source(90, 16) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(137, 36) Source(90, 22) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(137, 39) Source(90, 9) + SourceIndex(0) name (TopLevelModule1.ClassA) -4 >Emitted(137, 53) Source(90, 27) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) -5 >Emitted(137, 54) Source(90, 28) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) +1->Emitted(140, 13) Source(90, 16) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(140, 36) Source(90, 22) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(140, 39) Source(90, 9) + SourceIndex(0) name (TopLevelModule1.ClassA) +--- +>>> }; +1 >^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public AisIn1() { +2 > } +1 >Emitted(141, 13) Source(90, 27) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) +2 >Emitted(141, 14) Source(90, 28) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) --- >>> return ClassA; -1 >^^^^^^^^^^^^ +1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +1-> > 2 > } -1 >Emitted(138, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(138, 26) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) +1->Emitted(142, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(142, 26) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> })(); 1 >^^^^^^^^ @@ -2540,10 +2552,10 @@ sourceFile:typeResolution.ts 4 > class ClassA { > public AisIn1() { } > } -1 >Emitted(139, 9) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(139, 10) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(139, 10) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(139, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(143, 9) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(143, 10) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(143, 10) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(143, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> var NotExportedModule; 1->^^^^^^^^ @@ -2563,10 +2575,10 @@ sourceFile:typeResolution.ts 4 > { > export class ClassA { } > } -1->Emitted(140, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(140, 13) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(140, 30) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(140, 31) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(144, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(144, 13) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(144, 30) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(144, 31) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> (function (NotExportedModule) { 1->^^^^^^^^ @@ -2580,24 +2592,24 @@ sourceFile:typeResolution.ts 3 > NotExportedModule 4 > 5 > { -1->Emitted(141, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(141, 20) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(141, 37) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(141, 39) Source(97, 30) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(141, 40) Source(97, 31) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(145, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(145, 20) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(145, 37) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(145, 39) Source(97, 30) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(145, 40) Source(97, 31) + SourceIndex(0) name (TopLevelModule1) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(142, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(146, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(143, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(147, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) --- >>> } 1->^^^^^^^^^^^^^^^^ @@ -2605,16 +2617,16 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1->export class ClassA { 2 > } -1->Emitted(144, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) -2 >Emitted(144, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) +1->Emitted(148, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) +2 >Emitted(148, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(145, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(145, 30) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(149, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(149, 30) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -2626,10 +2638,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassA { } -1 >Emitted(146, 13) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(146, 14) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -3 >Emitted(146, 14) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(146, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1 >Emitted(150, 13) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(150, 14) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +3 >Emitted(150, 14) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +4 >Emitted(150, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> NotExportedModule.ClassA = ClassA; 1->^^^^^^^^^^^^ @@ -2641,10 +2653,10 @@ sourceFile:typeResolution.ts 2 > ClassA 3 > { } 4 > -1->Emitted(147, 13) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(147, 37) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(147, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(147, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(151, 13) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(151, 37) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(151, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +4 >Emitted(151, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> })(NotExportedModule || (NotExportedModule = {})); 1->^^^^^^^^ @@ -2665,13 +2677,13 @@ sourceFile:typeResolution.ts 7 > { > export class ClassA { } > } -1->Emitted(148, 9) Source(99, 5) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(148, 10) Source(99, 6) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(148, 12) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(148, 29) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(148, 34) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(148, 51) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(148, 59) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(152, 9) Source(99, 5) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(152, 10) Source(99, 6) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(152, 12) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(152, 29) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(152, 34) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(152, 51) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(152, 59) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> })(TopLevelModule1 = exports.TopLevelModule1 || (exports.TopLevelModule1 = {})); 1->^^^^ @@ -2792,15 +2804,15 @@ sourceFile:typeResolution.ts > export class ClassA { } > } > } -1->Emitted(149, 5) Source(100, 1) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(149, 6) Source(100, 2) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(149, 8) Source(1, 15) + SourceIndex(0) -4 >Emitted(149, 23) Source(1, 30) + SourceIndex(0) -5 >Emitted(149, 26) Source(1, 15) + SourceIndex(0) -6 >Emitted(149, 49) Source(1, 30) + SourceIndex(0) -7 >Emitted(149, 54) Source(1, 15) + SourceIndex(0) -8 >Emitted(149, 77) Source(1, 30) + SourceIndex(0) -9 >Emitted(149, 85) Source(100, 2) + SourceIndex(0) +1->Emitted(153, 5) Source(100, 1) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(153, 6) Source(100, 2) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(153, 8) Source(1, 15) + SourceIndex(0) +4 >Emitted(153, 23) Source(1, 30) + SourceIndex(0) +5 >Emitted(153, 26) Source(1, 15) + SourceIndex(0) +6 >Emitted(153, 49) Source(1, 30) + SourceIndex(0) +7 >Emitted(153, 54) Source(1, 15) + SourceIndex(0) +8 >Emitted(153, 77) Source(1, 30) + SourceIndex(0) +9 >Emitted(153, 85) Source(100, 2) + SourceIndex(0) --- >>> var TopLevelModule2; 1 >^^^^ @@ -2820,10 +2832,10 @@ sourceFile:typeResolution.ts > } > } > } -1 >Emitted(150, 5) Source(102, 1) + SourceIndex(0) -2 >Emitted(150, 9) Source(102, 8) + SourceIndex(0) -3 >Emitted(150, 24) Source(102, 23) + SourceIndex(0) -4 >Emitted(150, 25) Source(108, 2) + SourceIndex(0) +1 >Emitted(154, 5) Source(102, 1) + SourceIndex(0) +2 >Emitted(154, 9) Source(102, 8) + SourceIndex(0) +3 >Emitted(154, 24) Source(102, 23) + SourceIndex(0) +4 >Emitted(154, 25) Source(108, 2) + SourceIndex(0) --- >>> (function (TopLevelModule2) { 1->^^^^ @@ -2836,11 +2848,11 @@ sourceFile:typeResolution.ts 3 > TopLevelModule2 4 > 5 > { -1->Emitted(151, 5) Source(102, 1) + SourceIndex(0) -2 >Emitted(151, 16) Source(102, 8) + SourceIndex(0) -3 >Emitted(151, 31) Source(102, 23) + SourceIndex(0) -4 >Emitted(151, 33) Source(102, 24) + SourceIndex(0) -5 >Emitted(151, 34) Source(102, 25) + SourceIndex(0) +1->Emitted(155, 5) Source(102, 1) + SourceIndex(0) +2 >Emitted(155, 16) Source(102, 8) + SourceIndex(0) +3 >Emitted(155, 31) Source(102, 23) + SourceIndex(0) +4 >Emitted(155, 33) Source(102, 24) + SourceIndex(0) +5 >Emitted(155, 34) Source(102, 25) + SourceIndex(0) --- >>> var SubModule3; 1 >^^^^^^^^ @@ -2857,10 +2869,10 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } > } -1 >Emitted(152, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(152, 13) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(152, 23) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(152, 24) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) +1 >Emitted(156, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(156, 13) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(156, 23) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(156, 24) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) --- >>> (function (SubModule3) { 1->^^^^^^^^ @@ -2874,61 +2886,64 @@ sourceFile:typeResolution.ts 3 > SubModule3 4 > 5 > { -1->Emitted(153, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(153, 20) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(153, 30) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(153, 32) Source(103, 30) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(153, 33) Source(103, 31) + SourceIndex(0) name (TopLevelModule2) +1->Emitted(157, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(157, 20) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(157, 30) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(157, 32) Source(103, 30) + SourceIndex(0) name (TopLevelModule2) +5 >Emitted(157, 33) Source(103, 31) + SourceIndex(0) name (TopLevelModule2) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> > -1->Emitted(154, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(158, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ 2 > ^^-> 1-> -1->Emitted(155, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1->Emitted(159, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> } 1->^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->export class ClassA { > public AisIn2_3() { } > 2 > } -1->Emitted(156, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) -2 >Emitted(156, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) +1->Emitted(160, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) +2 >Emitted(160, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) --- ->>> ClassA.prototype.AisIn2_3 = function () { }; +>>> ClassA.prototype.AisIn2_3 = function () { 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^ 1-> 2 > AisIn2_3 3 > -4 > public AisIn2_3() { -5 > } -1->Emitted(157, 17) Source(105, 20) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(157, 42) Source(105, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(157, 45) Source(105, 13) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -4 >Emitted(157, 59) Source(105, 33) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) -5 >Emitted(157, 60) Source(105, 34) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) +1->Emitted(161, 17) Source(105, 20) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(161, 42) Source(105, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(161, 45) Source(105, 13) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +--- +>>> }; +1 >^^^^^^^^^^^^^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^-> +1 >public AisIn2_3() { +2 > } +1 >Emitted(162, 17) Source(105, 33) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) +2 >Emitted(162, 18) Source(105, 34) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) --- >>> return ClassA; -1 >^^^^^^^^^^^^^^^^ +1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1 > +1-> > 2 > } -1 >Emitted(158, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(158, 30) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1->Emitted(163, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(163, 30) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -2942,10 +2957,10 @@ sourceFile:typeResolution.ts 4 > export class ClassA { > public AisIn2_3() { } > } -1 >Emitted(159, 13) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(159, 14) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(159, 14) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(159, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1 >Emitted(164, 13) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(164, 14) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(164, 14) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) +4 >Emitted(164, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> SubModule3.ClassA = ClassA; 1->^^^^^^^^^^^^ @@ -2959,10 +2974,10 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } 4 > -1->Emitted(160, 13) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(160, 30) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(160, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(160, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(165, 13) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(165, 30) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(165, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +4 >Emitted(165, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> })(SubModule3 = TopLevelModule2.SubModule3 || (TopLevelModule2.SubModule3 = {})); 1->^^^^^^^^ @@ -2988,15 +3003,15 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } > } -1->Emitted(161, 9) Source(107, 5) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(161, 10) Source(107, 6) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(161, 12) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(161, 22) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(161, 25) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -6 >Emitted(161, 51) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -7 >Emitted(161, 56) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -8 >Emitted(161, 82) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -9 >Emitted(161, 90) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) +1->Emitted(166, 9) Source(107, 5) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(166, 10) Source(107, 6) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(166, 12) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(166, 22) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +5 >Emitted(166, 25) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +6 >Emitted(166, 51) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +7 >Emitted(166, 56) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +8 >Emitted(166, 82) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +9 >Emitted(166, 90) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) --- >>> })(TopLevelModule2 || (TopLevelModule2 = {})); 1 >^^^^ @@ -3020,13 +3035,13 @@ sourceFile:typeResolution.ts > } > } > } -1 >Emitted(162, 5) Source(108, 1) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(162, 6) Source(108, 2) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(162, 8) Source(102, 8) + SourceIndex(0) -4 >Emitted(162, 23) Source(102, 23) + SourceIndex(0) -5 >Emitted(162, 28) Source(102, 8) + SourceIndex(0) -6 >Emitted(162, 43) Source(102, 23) + SourceIndex(0) -7 >Emitted(162, 51) Source(108, 2) + SourceIndex(0) +1 >Emitted(167, 5) Source(108, 1) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(167, 6) Source(108, 2) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(167, 8) Source(102, 8) + SourceIndex(0) +4 >Emitted(167, 23) Source(102, 23) + SourceIndex(0) +5 >Emitted(167, 28) Source(102, 8) + SourceIndex(0) +6 >Emitted(167, 43) Source(102, 23) + SourceIndex(0) +7 >Emitted(167, 51) Source(108, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=typeResolution.js.map \ No newline at end of file diff --git a/tests/baselines/reference/typeVal.js b/tests/baselines/reference/typeVal.js index 264b40c5f16..7c1d506fbdc 100644 --- a/tests/baselines/reference/typeVal.js +++ b/tests/baselines/reference/typeVal.js @@ -9,5 +9,7 @@ I.I=4; //// [typeVal.js] -var I = { I: 3 }; +var I = { + I: 3 +}; I.I = 4; diff --git a/tests/baselines/reference/typedGenericPrototypeMember.js b/tests/baselines/reference/typedGenericPrototypeMember.js index e5ba2e0e75f..866bf500ded 100644 --- a/tests/baselines/reference/typedGenericPrototypeMember.js +++ b/tests/baselines/reference/typedGenericPrototypeMember.js @@ -10,7 +10,8 @@ List.prototype.add("abc"); // Valid because T is instantiated to any var List = (function () { function List() { } - List.prototype.add = function (item) { }; + List.prototype.add = function (item) { + }; return List; })(); List.prototype.add("abc"); // Valid because T is instantiated to any diff --git a/tests/baselines/reference/typeofANonExportedType.js b/tests/baselines/reference/typeofANonExportedType.js index bb41ddfab7a..7ce08d5f93a 100644 --- a/tests/baselines/reference/typeofANonExportedType.js +++ b/tests/baselines/reference/typeofANonExportedType.js @@ -54,7 +54,9 @@ export var r13: typeof foo; //// [typeofANonExportedType.js] var x = 1; exports.r1; -var y = { foo: '' }; +var y = { + foo: '' +}; exports.r2; var C = (function () { function C() { @@ -91,7 +93,8 @@ var E; exports.r10; exports.r11; exports.r12; -function foo() { } +function foo() { +} var foo; (function (foo) { foo.y = 1; diff --git a/tests/baselines/reference/typeofAnExportedType.js b/tests/baselines/reference/typeofAnExportedType.js index af6c405a3cf..20a0fe754e2 100644 --- a/tests/baselines/reference/typeofAnExportedType.js +++ b/tests/baselines/reference/typeofAnExportedType.js @@ -54,7 +54,9 @@ export var r13: typeof foo; //// [typeofAnExportedType.js] exports.x = 1; exports.r1; -exports.y = { foo: '' }; +exports.y = { + foo: '' +}; exports.r2; var C = (function () { function C() { @@ -93,7 +95,8 @@ var E = exports.E; exports.r10; exports.r11; exports.r12; -function foo() { } +function foo() { +} exports.foo = foo; var foo; (function (foo) { diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index 1cef22bf2eb..cbad0068372 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -31,8 +31,10 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C(x) { } - C.foo = function (x) { }; - C.bar = function (x) { }; + C.foo = function (x) { + }; + C.bar = function (x) { + }; return C; })(); var D = (function (_super) { @@ -40,8 +42,10 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.baz = function (x) { }; - D.prototype.foo = function () { }; + D.baz = function (x) { + }; + D.prototype.foo = function () { + }; return D; })(C); var d; diff --git a/tests/baselines/reference/typeofInterface.js b/tests/baselines/reference/typeofInterface.js index 1f0bf72eebe..49e194db7fe 100644 --- a/tests/baselines/reference/typeofInterface.js +++ b/tests/baselines/reference/typeofInterface.js @@ -12,4 +12,6 @@ var j: typeof k.foo = { a: "hello" }; //// [typeofInterface.js] var I; var k; -var j = { a: "hello" }; +var j = { + a: "hello" +}; diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.js b/tests/baselines/reference/typeofOperatorWithAnyOtherType.js index a497519f249..422d49ae11e 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.js @@ -78,9 +78,16 @@ z: typeof obj1.x; // typeof operator on any type var ANY; var ANY1; -var ANY2 = ["", ""]; +var ANY2 = [ + "", + "" +]; var obj; -var obj1 = { x: "a", y: function () { } }; +var obj1 = { + x: "a", + y: function () { + } +}; function foo() { var a; return a; diff --git a/tests/baselines/reference/typeofOperatorWithBooleanType.js b/tests/baselines/reference/typeofOperatorWithBooleanType.js index 82af3eac26f..884371f9440 100644 --- a/tests/baselines/reference/typeofOperatorWithBooleanType.js +++ b/tests/baselines/reference/typeofOperatorWithBooleanType.js @@ -53,11 +53,15 @@ z: typeof M.n; //// [typeofOperatorWithBooleanType.js] // typeof operator on boolean type var BOOLEAN; -function foo() { return true; } +function foo() { + return true; +} var A = (function () { function A() { } - A.foo = function () { return false; }; + A.foo = function () { + return false; + }; return A; })(); var M; @@ -69,7 +73,10 @@ var objA = new A(); var ResultIsString1 = typeof BOOLEAN; // boolean type literal var ResultIsString2 = typeof true; -var ResultIsString3 = typeof { x: true, y: false }; +var ResultIsString3 = typeof { + x: true, + y: false +}; // boolean type expressions var ResultIsString4 = typeof objA.a; var ResultIsString5 = typeof M.n; @@ -90,7 +97,10 @@ var x; var r; z: typeof BOOLEAN; r: typeof foo; -var y = { a: true, b: false }; +var y = { + a: true, + b: false +}; z: typeof y.a; z: typeof objA.a; z: typeof A.foo; diff --git a/tests/baselines/reference/typeofOperatorWithNumberType.js b/tests/baselines/reference/typeofOperatorWithNumberType.js index 14b45ab518f..51e657e4019 100644 --- a/tests/baselines/reference/typeofOperatorWithNumberType.js +++ b/tests/baselines/reference/typeofOperatorWithNumberType.js @@ -60,12 +60,19 @@ z: typeof M.n; //// [typeofOperatorWithNumberType.js] // typeof operator on number type var NUMBER; -var NUMBER1 = [1, 2]; -function foo() { return 1; } +var NUMBER1 = [ + 1, + 2 +]; +function foo() { + return 1; +} var A = (function () { function A() { } - A.foo = function () { return 1; }; + A.foo = function () { + return 1; + }; return A; })(); var M; @@ -78,8 +85,16 @@ var ResultIsString1 = typeof NUMBER; var ResultIsString2 = typeof NUMBER1; // number type literal var ResultIsString3 = typeof 1; -var ResultIsString4 = typeof { x: 1, y: 2 }; -var ResultIsString5 = typeof { x: 1, y: function (n) { return n; } }; +var ResultIsString4 = typeof { + x: 1, + y: 2 +}; +var ResultIsString5 = typeof { + x: 1, + y: function (n) { + return n; + } +}; // number type expressions var ResultIsString6 = typeof objA.a; var ResultIsString7 = typeof M.n; @@ -104,7 +119,10 @@ var x; z: typeof NUMBER; x: typeof NUMBER1; r: typeof foo; -var y = { a: 1, b: 2 }; +var y = { + a: 1, + b: 2 +}; z: typeof y.a; z: typeof objA.a; z: typeof A.foo; diff --git a/tests/baselines/reference/typeofOperatorWithStringType.js b/tests/baselines/reference/typeofOperatorWithStringType.js index 381205ff8c1..d5272844520 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.js +++ b/tests/baselines/reference/typeofOperatorWithStringType.js @@ -60,12 +60,19 @@ z: typeof M.n; //// [typeofOperatorWithStringType.js] // typeof operator on string type var STRING; -var STRING1 = ["", "abc"]; -function foo() { return "abc"; } +var STRING1 = [ + "", + "abc" +]; +function foo() { + return "abc"; +} var A = (function () { function A() { } - A.foo = function () { return ""; }; + A.foo = function () { + return ""; + }; return A; })(); var M; @@ -78,8 +85,16 @@ var ResultIsString1 = typeof STRING; var ResultIsString2 = typeof STRING1; // string type literal var ResultIsString3 = typeof ""; -var ResultIsString4 = typeof { x: "", y: "" }; -var ResultIsString5 = typeof { x: "", y: function (s) { return s; } }; +var ResultIsString4 = typeof { + x: "", + y: "" +}; +var ResultIsString5 = typeof { + x: "", + y: function (s) { + return s; + } +}; // string type expressions var ResultIsString6 = typeof objA.a; var ResultIsString7 = typeof M.n; @@ -104,7 +119,10 @@ var r; z: typeof STRING; x: typeof STRING1; r: typeof foo; -var y = { a: "", b: "" }; +var y = { + a: "", + b: "" +}; z: typeof y.a; z: typeof objA.a; z: typeof A.foo; diff --git a/tests/baselines/reference/typesWithDuplicateTypeParameters.js b/tests/baselines/reference/typesWithDuplicateTypeParameters.js index cc80d4d57b4..f81f59d5307 100644 --- a/tests/baselines/reference/typesWithDuplicateTypeParameters.js +++ b/tests/baselines/reference/typesWithDuplicateTypeParameters.js @@ -19,5 +19,7 @@ var C2 = (function () { } return C2; })(); -function f() { } -function f2() { } +function f() { +} +function f2() { +} diff --git a/tests/baselines/reference/typesWithOptionalProperty.js b/tests/baselines/reference/typesWithOptionalProperty.js index 7c791cd599f..2056fab37e3 100644 --- a/tests/baselines/reference/typesWithOptionalProperty.js +++ b/tests/baselines/reference/typesWithOptionalProperty.js @@ -33,9 +33,20 @@ a = i; //// [typesWithOptionalProperty.js] // basic uses of optional properties without errors var a; -var b = { foo: '' }; -var c = { foo: '', bar: 3 }; -var d = { foo: '', bar: 3, baz: function () { return ''; } }; +var b = { + foo: '' +}; +var c = { + foo: '', + bar: 3 +}; +var d = { + foo: '', + bar: 3, + baz: function () { + return ''; + } +}; var i; i = b; i = c; diff --git a/tests/baselines/reference/uncaughtCompilerError1.js b/tests/baselines/reference/uncaughtCompilerError1.js index a09f8c949d5..39369c8e899 100644 --- a/tests/baselines/reference/uncaughtCompilerError1.js +++ b/tests/baselines/reference/uncaughtCompilerError1.js @@ -18,10 +18,16 @@ function f() { function f() { if (lineTokens[index].trim() === '=' && index > 0 && token.type === '' && tokens[index - 1].type === 'attribute.name.html') { if (index === (tokens.length - 1)) { - return { appendText: '\"\"', advanceCount: 1 }; + return { + appendText: '\"\"', + advanceCount: 1 + }; } else if (tokens[index + 1].type !== 'attribute.value.html' && tokens[index + 1].type !== '') { - return { appendText: '\"\"', advanceCount: 1 }; + return { + appendText: '\"\"', + advanceCount: 1 + }; } return null; } diff --git a/tests/baselines/reference/undeclaredMethod.js b/tests/baselines/reference/undeclaredMethod.js index 2cef06cc593..b2795938632 100644 --- a/tests/baselines/reference/undeclaredMethod.js +++ b/tests/baselines/reference/undeclaredMethod.js @@ -19,7 +19,8 @@ var M; var C = (function () { function C() { } - C.prototype.salt = function () { }; + C.prototype.salt = function () { + }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/undeclaredModuleError.js b/tests/baselines/reference/undeclaredModuleError.js index 0764840cadf..e7e9b70ee7b 100644 --- a/tests/baselines/reference/undeclaredModuleError.js +++ b/tests/baselines/reference/undeclaredModuleError.js @@ -17,7 +17,8 @@ function instrumentFile(covFileDir: string, covFileName: string, originalFilePat //// [undeclaredModuleError.js] define(["require", "exports", 'fs'], function (require, exports, fs) { - function readdir(path, accept, callback) { } + function readdir(path, accept, callback) { + } function join() { var paths = []; for (var _i = 0; _i < arguments.length; _i++) { diff --git a/tests/baselines/reference/undefinedArgumentInference.js b/tests/baselines/reference/undefinedArgumentInference.js index 2e7501f23f0..ad74e9ebeb4 100644 --- a/tests/baselines/reference/undefinedArgumentInference.js +++ b/tests/baselines/reference/undefinedArgumentInference.js @@ -12,4 +12,7 @@ var z1 = foo1({ x: undefined, y: undefined }); function foo1(f1) { return undefined; } -var z1 = foo1({ x: undefined, y: undefined }); +var z1 = foo1({ + x: undefined, + y: undefined +}); diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index b1ef3e19edd..df87e7b0ad6 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -250,7 +250,8 @@ var D11 = (function (_super) { } return D11; })(Base); -function f() { } +function f() { +} var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/undefinedSymbolReferencedInArrayLiteral1.js b/tests/baselines/reference/undefinedSymbolReferencedInArrayLiteral1.js index f314f9ad111..61f248e56e7 100644 --- a/tests/baselines/reference/undefinedSymbolReferencedInArrayLiteral1.js +++ b/tests/baselines/reference/undefinedSymbolReferencedInArrayLiteral1.js @@ -9,8 +9,18 @@ var functions = [function() { //// [undefinedSymbolReferencedInArrayLiteral1.js] -var tokens = [{ startIndex: deltaOffset }]; -var functions = [function () { - [1, 2, 3].NonexistantMethod(); +var tokens = [ + { + startIndex: deltaOffset + } +]; +var functions = [ + function () { + [ + 1, + 2, + 3 + ].NonexistantMethod(); anotherNonExistingMethod(); - }]; + } +]; diff --git a/tests/baselines/reference/underscoreTest1.js b/tests/baselines/reference/underscoreTest1.js index ddd5201b858..bc6bf9b615a 100644 --- a/tests/baselines/reference/underscoreTest1.js +++ b/tests/baselines/reference/underscoreTest1.js @@ -904,73 +904,428 @@ _.template("Using 'with': <%= data.answer %>", { answer: 'no' }, { variable: 'da //// [underscoreTest1_underscore.js] //// [underscoreTest1_underscoreTests.js] /// -_.each([1, 2, 3], function (num) { return alert(num.toString()); }); -_.each({ one: 1, two: 2, three: 3 }, function (value, key) { return alert(value.toString()); }); -_.map([1, 2, 3], function (num) { return num * 3; }); -_.map({ one: 1, two: 2, three: 3 }, function (value, key) { return value * 3; }); -var sum = _.reduce([1, 2, 3], function (memo, num) { return memo + num; }, 0); -var list = [[0, 1], [2, 3], [4, 5]]; -var flat = _.reduceRight(list, function (a, b) { return a.concat(b); }, []); -var even = _.find([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -var evens = _.filter([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -var listOfPlays = [{ title: "Cymbeline", author: "Shakespeare", year: 1611 }, { title: "The Tempest", author: "Shakespeare", year: 1611 }, { title: "Other", author: "Not Shakespeare", year: 2012 }]; -_.where(listOfPlays, { author: "Shakespeare", year: 1611 }); -var odds = _.reject([1, 2, 3, 4, 5, 6], function (num) { return num % 2 == 0; }); -_.all([true, 1, null, 'yes'], _.identity); -_.any([null, 0, 'yes', false]); -_.contains([1, 2, 3], 3); -_.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); -var stooges = [{ name: 'moe', age: 40 }, { name: 'larry', age: 50 }, { name: 'curly', age: 60 }]; +_.each([ + 1, + 2, + 3 +], function (num) { + return alert(num.toString()); +}); +_.each({ + one: 1, + two: 2, + three: 3 +}, function (value, key) { + return alert(value.toString()); +}); +_.map([ + 1, + 2, + 3 +], function (num) { + return num * 3; +}); +_.map({ + one: 1, + two: 2, + three: 3 +}, function (value, key) { + return value * 3; +}); +var sum = _.reduce([ + 1, + 2, + 3 +], function (memo, num) { + return memo + num; +}, 0); +var list = [ + [ + 0, + 1 + ], + [ + 2, + 3 + ], + [ + 4, + 5 + ] +]; +var flat = _.reduceRight(list, function (a, b) { + return a.concat(b); +}, []); +var even = _.find([ + 1, + 2, + 3, + 4, + 5, + 6 +], function (num) { + return num % 2 == 0; +}); +var evens = _.filter([ + 1, + 2, + 3, + 4, + 5, + 6 +], function (num) { + return num % 2 == 0; +}); +var listOfPlays = [ + { + title: "Cymbeline", + author: "Shakespeare", + year: 1611 + }, + { + title: "The Tempest", + author: "Shakespeare", + year: 1611 + }, + { + title: "Other", + author: "Not Shakespeare", + year: 2012 + } +]; +_.where(listOfPlays, { + author: "Shakespeare", + year: 1611 +}); +var odds = _.reject([ + 1, + 2, + 3, + 4, + 5, + 6 +], function (num) { + return num % 2 == 0; +}); +_.all([ + true, + 1, + null, + 'yes' +], _.identity); +_.any([ + null, + 0, + 'yes', + false +]); +_.contains([ + 1, + 2, + 3 +], 3); +_.invoke([ + [ + 5, + 1, + 7 + ], + [ + 3, + 2, + 1 + ] +], 'sort'); +var stooges = [ + { + name: 'moe', + age: 40 + }, + { + name: 'larry', + age: 50 + }, + { + name: 'curly', + age: 60 + } +]; _.pluck(stooges, 'name'); -_.max(stooges, function (stooge) { return stooge.age; }); -var numbers = [10, 5, 100, 2, 1000]; +_.max(stooges, function (stooge) { + return stooge.age; +}); +var numbers = [ + 10, + 5, + 100, + 2, + 1000 +]; _.min(numbers); -_.sortBy([1, 2, 3, 4, 5, 6], function (num) { return Math.sin(num); }); +_.sortBy([ + 1, + 2, + 3, + 4, + 5, + 6 +], function (num) { + return 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(function (e, i, list) { return Math.floor(e); }); -_.groupBy([1.3, 2.1, 2.4], function (num) { return Math.floor(num); }); -_.groupBy(['one', 'two', 'three'], 'length'); -_.countBy([1, 2, 3, 4, 5], function (num) { return num % 2 == 0 ? 'even' : 'odd'; }); -_.shuffle([1, 2, 3, 4, 5, 6]); +_([ + 1.3, + 2.1, + 2.4 +]).groupBy(function (e, i, list) { + return Math.floor(e); +}); +_.groupBy([ + 1.3, + 2.1, + 2.4 +], function (num) { + return Math.floor(num); +}); +_.groupBy([ + 'one', + 'two', + 'three' +], 'length'); +_.countBy([ + 1, + 2, + 3, + 4, + 5 +], function (num) { + return num % 2 == 0 ? 'even' : 'odd'; +}); +_.shuffle([ + 1, + 2, + 3, + 4, + 5, + 6 +]); // (function(){ return _.toArray(arguments).slice(1); })(1, 2, 3, 4); -_.size({ one: 1, two: 2, three: 3 }); +_.size({ + one: 1, + two: 2, + three: 3 +}); /////////////////////////////////////////////////////////////////////////////////////// -_.first([5, 4, 3, 2, 1]); -_.initial([5, 4, 3, 2, 1]); -_.last([5, 4, 3, 2, 1]); -_.rest([5, 4, 3, 2, 1]); -_.compact([0, 1, false, 2, '', 3]); -_.flatten([1, 2, 3, 4]); -_.flatten([1, [2]]); +_.first([ + 5, + 4, + 3, + 2, + 1 +]); +_.initial([ + 5, + 4, + 3, + 2, + 1 +]); +_.last([ + 5, + 4, + 3, + 2, + 1 +]); +_.rest([ + 5, + 4, + 3, + 2, + 1 +]); +_.compact([ + 0, + 1, + false, + 2, + '', + 3 +]); +_.flatten([ + 1, + 2, + 3, + 4 +]); +_.flatten([ + 1, + [ + 2 + ] +]); // typescript doesn't like the elements being different -_.flatten([1, [2], [3, [[4]]]]); -_.flatten([1, [2], [3, [[4]]]], true); -_.without([1, 2, 1, 0, 3, 1, 4], 0, 1); -_.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); -_.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); -_.difference([1, 2, 3, 4, 5], [5, 2, 10]); -_.uniq([1, 2, 1, 3, 1, 4]); -_.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -_.object(['moe', 'larry', 'curly'], [30, 40, 50]); -_.object([['moe', 30], ['larry', 40], ['curly', 50]]); -_.indexOf([1, 2, 3], 2); -_.lastIndexOf([1, 2, 3, 1, 2, 3], 2); -_.sortedIndex([10, 20, 30, 40, 50], 35); +_.flatten([ + 1, + [ + 2 + ], + [ + 3, + [ + [ + 4 + ] + ] + ] +]); +_.flatten([ + 1, + [ + 2 + ], + [ + 3, + [ + [ + 4 + ] + ] + ] +], true); +_.without([ + 1, + 2, + 1, + 0, + 3, + 1, + 4 +], 0, 1); +_.union([ + 1, + 2, + 3 +], [ + 101, + 2, + 1, + 10 +], [ + 2, + 1 +]); +_.intersection([ + 1, + 2, + 3 +], [ + 101, + 2, + 1, + 10 +], [ + 2, + 1 +]); +_.difference([ + 1, + 2, + 3, + 4, + 5 +], [ + 5, + 2, + 10 +]); +_.uniq([ + 1, + 2, + 1, + 3, + 1, + 4 +]); +_.zip([ + 'moe', + 'larry', + 'curly' +], [ + 30, + 40, + 50 +], [ + true, + false, + false +]); +_.object([ + 'moe', + 'larry', + 'curly' +], [ + 30, + 40, + 50 +]); +_.object([ + [ + 'moe', + 30 + ], + [ + 'larry', + 40 + ], + [ + 'curly', + 50 + ] +]); +_.indexOf([ + 1, + 2, + 3 +], 2); +_.lastIndexOf([ + 1, + 2, + 3, + 1, + 2, + 3 +], 2); +_.sortedIndex([ + 10, + 20, + 30, + 40, + 50 +], 35); _.range(10); _.range(1, 11); _.range(0, 30, 5); _.range(0, 30, 5); _.range(0); /////////////////////////////////////////////////////////////////////////////////////// -var func = function (greeting) { return greeting + ': ' + this.name; }; +var func = function (greeting) { + return greeting + ': ' + this.name; +}; // need a second var otherwise typescript thinks func signature is the above func type, // instead of the newly returned _bind => func type. -var func2 = _.bind(func, { name: 'moe' }, 'hi'); +var func2 = _.bind(func, { + name: 'moe' +}, 'hi'); func2(); var buttonView = { label: 'underscore', - onClick: function () { alert('clicked: ' + this.label); }, - onHover: function () { alert('hovering: ' + this.label); } + onClick: function () { + alert('clicked: ' + this.label); + }, + onHover: function () { + alert('hovering: ' + this.label); + } }; _.bindAll(buttonView); $('#underscore_button').bind('click', buttonView.onClick); @@ -984,59 +1339,153 @@ var log = _.bind(function (message) { } }, Date); _.delay(log, 1000, 'logged later'); -_.defer(function () { alert('deferred'); }); -var updatePosition = function () { return alert('updating position...'); }; +_.defer(function () { + alert('deferred'); +}); +var updatePosition = function () { + return alert('updating position...'); +}; var throttled = _.throttle(updatePosition, 100); $(null).scroll(throttled); -var calculateLayout = function () { return alert('calculating layout...'); }; +var calculateLayout = function () { + return alert('calculating layout...'); +}; var lazyLayout = _.debounce(calculateLayout, 300); $(null).resize(lazyLayout); -var createApplication = function () { return alert('creating application...'); }; +var createApplication = function () { + return alert('creating application...'); +}; var initialize = _.once(createApplication); initialize(); initialize(); var notes; -var render = function () { return alert("rendering..."); }; +var render = function () { + return alert("rendering..."); +}; var renderNotes = _.after(notes.length, render); -_.each(notes, function (note) { return note.asyncSave({ success: renderNotes }); }); -var hello = function (name) { return "hello: " + name; }; -hello = _.wrap(hello, function (func, arg) { return "before, " + func(arg) + ", after"; }); +_.each(notes, function (note) { + return note.asyncSave({ + success: renderNotes + }); +}); +var hello = function (name) { + return "hello: " + name; +}; +hello = _.wrap(hello, function (func, arg) { + return "before, " + func(arg) + ", after"; +}); hello("moe"); -var greet = function (name) { return "hi: " + name; }; -var exclaim = function (statement) { return statement + "!"; }; +var greet = function (name) { + return "hi: " + name; +}; +var exclaim = function (statement) { + return statement + "!"; +}; var welcome = _.compose(exclaim, greet); welcome('moe'); /////////////////////////////////////////////////////////////////////////////////////// -_.keys({ one: 1, two: 2, three: 3 }); -_.values({ one: 1, two: 2, three: 3 }); -_.pairs({ one: 1, two: 2, three: 3 }); -_.invert({ Moe: "Moses", Larry: "Louis", Curly: "Jerome" }); +_.keys({ + one: 1, + two: 2, + three: 3 +}); +_.values({ + one: 1, + two: 2, + three: 3 +}); +_.pairs({ + one: 1, + two: 2, + three: 3 +}); +_.invert({ + Moe: "Moses", + Larry: "Louis", + Curly: "Jerome" +}); _.functions(_); -_.extend({ name: 'moe' }, { age: 50 }); -_.pick({ name: 'moe', age: 50, userid: 'moe1' }, 'name', 'age'); -_.omit({ name: 'moe', age: 50, userid: 'moe1' }, 'userid'); -var iceCream = { flavor: "chocolate" }; -_.defaults(iceCream, { flavor: "vanilla", sprinkles: "lots" }); -_.clone({ name: 'moe' }); -_.chain([1, 2, 3, 200]) - .filter(function (num) { return num % 2 == 0; }) - .tap(alert) - .map(function (num) { return num * num; }) - .value(); -_.has({ a: 1, b: 2, c: 3 }, "b"); -var moe = { name: 'moe', luckyNumbers: [13, 27, 34] }; -var clone = { name: 'moe', luckyNumbers: [13, 27, 34] }; +_.extend({ + name: 'moe' +}, { + age: 50 +}); +_.pick({ + name: 'moe', + age: 50, + userid: 'moe1' +}, 'name', 'age'); +_.omit({ + name: 'moe', + age: 50, + userid: 'moe1' +}, 'userid'); +var iceCream = { + flavor: "chocolate" +}; +_.defaults(iceCream, { + flavor: "vanilla", + sprinkles: "lots" +}); +_.clone({ + name: 'moe' +}); +_.chain([ + 1, + 2, + 3, + 200 +]).filter(function (num) { + return num % 2 == 0; +}).tap(alert).map(function (num) { + return num * num; +}).value(); +_.has({ + a: 1, + b: 2, + c: 3 +}, "b"); +var moe = { + name: 'moe', + luckyNumbers: [ + 13, + 27, + 34 + ] +}; +var clone = { + name: 'moe', + luckyNumbers: [ + 13, + 27, + 34 + ] +}; moe == clone; _.isEqual(moe, clone); -_.isEmpty([1, 2, 3]); +_.isEmpty([ + 1, + 2, + 3 +]); _.isEmpty({}); _.isElement($('body')[0]); -(function () { return _.isArray(arguments); })(); -_.isArray([1, 2, 3]); +(function () { + return _.isArray(arguments); +})(); +_.isArray([ + 1, + 2, + 3 +]); _.isObject({}); _.isObject(1); // (() => { return _.isArguments(arguments); })(1, 2, 3); -_.isArguments([1, 2, 3]); +_.isArguments([ + 1, + 2, + 3 +]); _.isFunction(alert); _.isString("moe"); _.isNumber(8.4 * 5); @@ -1053,10 +1502,14 @@ _.isNull(undefined); _.isUndefined(null.missingVariable); /////////////////////////////////////////////////////////////////////////////////////// var underscore = _.noConflict(); -var moe2 = { name: 'moe' }; +var moe2 = { + name: 'moe' +}; moe2 === _.identity(moe); var genie; -_.times(3, function (n) { genie.grantWishNumber(n); }); +_.times(3, function (n) { + genie.grantWishNumber(n); +}); _.random(0, 100); _.mixin({ capitalize: function (string) { @@ -1066,20 +1519,43 @@ _.mixin({ _("fabio").capitalize(); _.uniqueId('contact_'); _.escape('Curly, Larry & Moe'); -var object = { cheese: 'crumpets', stuff: function () { return 'nonsense'; } }; +var object = { + cheese: 'crumpets', + stuff: function () { + return 'nonsense'; + } +}; _.result(object, 'cheese'); _.result(object, 'stuff'); var compiled = _.template("hello: <%= name %>"); -compiled({ name: 'moe' }); +compiled({ + name: 'moe' +}); var list2 = "<% _.each(people, function(name) { %>
  • <%= name %>
  • <% }); %>"; -_.template(list2, { people: ['moe', 'curly', 'larry'] }); +_.template(list2, { + people: [ + 'moe', + 'curly', + 'larry' + ] +}); var template = _.template("<%- value %>"); -template({ value: '