diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 704812b018510..17077c6798733 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -865,6 +865,11 @@ namespace ts { case SyntaxKind.ClassExpression: case SyntaxKind.InterfaceDeclaration: if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & SymbolFlags.Type)) { + if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { + // ignore type parameters not declared in this container + result = undefined; + break; + } if (lastLocation && getModifierFlags(lastLocation) & ModifierFlags.Static) { // TypeScript 1.0 spec (April 2014): 3.4.1 // The scope of a type parameter extends over the entire declaration with which the type @@ -1015,6 +1020,16 @@ namespace ts { return result; } + function isTypeParameterSymbolDeclaredInContainer(symbol: Symbol, container: Node) { + for (const decl of symbol.declarations) { + if (decl.kind === SyntaxKind.TypeParameter && decl.parent === container) { + return true; + } + } + + return false; + } + function checkAndReportErrorForMissingPrefix(errorLocation: Node, name: string, nameArg: string | Identifier): boolean { if ((errorLocation.kind === SyntaxKind.Identifier && (isTypeReferenceIdentifier(errorLocation)) || isInTypeQuery(errorLocation))) { return false; @@ -2336,7 +2351,7 @@ namespace ts { else if (!(flags & TypeFormatFlags.InTypeAlias) && type.aliasSymbol && isSymbolAccessible(type.aliasSymbol, enclosingDeclaration, SymbolFlags.Type, /*shouldComputeAliasesToMakeVisible*/ false).accessibility === SymbolAccessibility.Accessible) { const typeArguments = type.aliasTypeArguments; - writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, typeArguments ? typeArguments.length : 0, nextFlags); + writeSymbolTypeReference(type.aliasSymbol, typeArguments, 0, length(typeArguments), nextFlags); } else if (type.flags & TypeFlags.UnionOrIntersection) { writeUnionOrIntersectionType(type, nextFlags); @@ -2671,6 +2686,13 @@ namespace ts { writeSpace(writer); buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack); } + const defaultType = getDefaultFromTypeParameter(tp); + if (defaultType) { + writeSpace(writer); + writePunctuation(writer, SyntaxKind.EqualsToken); + writeSpace(writer); + buildTypeDisplay(defaultType, writer, enclosingDeclaration, flags, symbolStack); + } } function buildParameterDisplay(p: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, symbolStack?: Symbol[]) { @@ -3870,9 +3892,9 @@ namespace ts { } function getConstructorsForTypeArguments(type: Type, typeArgumentNodes: TypeNode[]): Signature[] { - const typeArgCount = typeArgumentNodes ? typeArgumentNodes.length : 0; + const typeArgCount = length(typeArgumentNodes); return filter(getSignaturesOfType(type, SignatureKind.Construct), - sig => (sig.typeParameters ? sig.typeParameters.length : 0) === typeArgCount); + sig => typeArgCount >= getMinTypeArgumentCount(sig.typeParameters) && typeArgCount <= length(sig.typeParameters)); } function getInstantiatedConstructorsForTypeArguments(type: Type, typeArgumentNodes: TypeNode[]): Signature[] { @@ -4470,12 +4492,13 @@ namespace ts { } const baseTypeNode = getBaseTypeNodeOfClass(classType); const typeArguments = map(baseTypeNode.typeArguments, getTypeFromTypeNode); - const typeArgCount = typeArguments ? typeArguments.length : 0; + const typeArgCount = length(typeArguments); const result: Signature[] = []; for (const baseSig of baseSignatures) { - const typeParamCount = baseSig.typeParameters ? baseSig.typeParameters.length : 0; - if (typeParamCount === typeArgCount) { - const sig = typeParamCount ? createSignatureInstantiation(baseSig, typeArguments) : cloneSignature(baseSig); + const minTypeArgumentCount = getMinTypeArgumentCount(baseSig.typeParameters); + const typeParamCount = length(baseSig.typeParameters); + if (typeArgCount >= minTypeArgumentCount && typeArgCount <= typeParamCount) { + const sig = typeParamCount ? createSignatureInstantiation(baseSig, fillMissingTypeArguments(typeArguments, baseSig.typeParameters, minTypeArgumentCount)) : cloneSignature(baseSig); sig.typeParameters = classType.localTypeParameters; sig.resolvedReturnType = classType; result.push(sig); @@ -4952,6 +4975,29 @@ namespace ts { return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(type, type)); } + /** + * Gets the default type for a type parameter. + * + * If the type parameter is the result of an instantiation, this gets the instantiated + * default type of its target. If the type parameter has no default type, `undefined` + * is returned. + * + * This function *does not* perform a circularity check. + */ + function getDefaultFromTypeParameter(typeParameter: TypeParameter): Type | undefined { + if (!typeParameter.default) { + if (typeParameter.target) { + const targetDefault = getDefaultFromTypeParameter(typeParameter.target); + typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType; + } + else { + const defaultDeclaration = typeParameter.symbol && forEach(typeParameter.symbol.declarations, decl => isTypeParameter(decl) && decl.default); + typeParameter.default = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType; + } + } + return typeParameter.default === noConstraintType ? undefined : typeParameter.default; + } + /** * For a type parameter, return the base constraint of the type parameter. For the string, number, * boolean, and symbol primitive types, return the corresponding object types. Otherwise return the @@ -5241,6 +5287,55 @@ namespace ts { } } + /** + * Gets the minimum number of type arguments needed to satisfy all non-optional type + * parameters. + */ + function getMinTypeArgumentCount(typeParameters: TypeParameter[] | undefined): number { + let minTypeArgumentCount = 0; + if (typeParameters) { + for (let i = 0; i < typeParameters.length; i++) { + if (!getDefaultFromTypeParameter(typeParameters[i])) { + minTypeArgumentCount = i + 1; + } + } + } + return minTypeArgumentCount; + } + + /** + * Fill in default types for unsupplied type arguments. If `typeArguments` is undefined + * when a default type is supplied, a new array will be created and returned. + * + * @param typeArguments The supplied type arguments. + * @param typeParameters The requested type parameters. + * @param minTypeArgumentCount The minimum number of required type arguments. + */ + function fillMissingTypeArguments(typeArguments: Type[] | undefined, typeParameters: TypeParameter[] | undefined, minTypeArgumentCount: number) { + const numTypeParameters = length(typeParameters); + if (numTypeParameters) { + const numTypeArguments = length(typeArguments); + if (numTypeArguments >= minTypeArgumentCount && numTypeArguments <= numTypeParameters) { + if (!typeArguments) { + typeArguments = []; + } + + // Map an unsatisfied type parameter with a default type. + // If a type parameter does not have a default type, or if the default type + // is a forward reference, the empty object type is used. + for (let i = numTypeArguments; i < numTypeParameters; i++) { + typeArguments[i] = emptyObjectType; + } + for (let i = numTypeArguments; i < numTypeParameters; i++) { + const mapper = createTypeMapper(typeParameters, typeArguments); + const defaultType = getDefaultFromTypeParameter(typeParameters[i]); + typeArguments[i] = defaultType ? instantiateType(defaultType, mapper) : emptyObjectType; + } + } + } + return typeArguments; + } + function getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature { const links = getNodeLinks(declaration); if (!links.resolvedSignature) { @@ -5440,6 +5535,7 @@ namespace ts { } function getSignatureInstantiation(signature: Signature, typeArguments: Type[]): Signature { + typeArguments = fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters)); const instantiations = signature.instantiations || (signature.instantiations = createMap()); const id = getTypeListId(typeArguments); let instantiation = instantiations.get(id); @@ -5597,7 +5693,7 @@ namespace ts { } function getTypeReferenceArity(type: TypeReference): number { - return type.target.typeParameters ? type.target.typeParameters.length : 0; + return length(type.target.typeParameters); } // Get type from reference to class or interface @@ -5605,14 +5701,23 @@ namespace ts { const type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol)); const typeParameters = type.localTypeParameters; if (typeParameters) { - if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) { - error(node, Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, /*enclosingDeclaration*/ undefined, TypeFormatFlags.WriteArrayAsGenericType), typeParameters.length); + const numTypeArguments = length(node.typeArguments); + const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); + if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) { + error(node, + minTypeArgumentCount === typeParameters.length + ? Diagnostics.Generic_type_0_requires_1_type_argument_s + : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, + typeToString(type, /*enclosingDeclaration*/ undefined, TypeFormatFlags.WriteArrayAsGenericType), + minTypeArgumentCount, + typeParameters.length); return unknownType; } // In a type reference, the outer type parameters of the referenced class or interface are automatically // supplied as type arguments and the type reference only specifies arguments for the local type parameters // of the class or interface. - return createTypeReference(type, concatenate(type.outerTypeParameters, map(node.typeArguments, getTypeFromTypeNode))); + const typeArguments = concatenate(type.outerTypeParameters, fillMissingTypeArguments(map(node.typeArguments, getTypeFromTypeNode), typeParameters, minTypeArgumentCount)); + return createTypeReference(type, typeArguments); } if (node.typeArguments) { error(node, Diagnostics.Type_0_is_not_generic, typeToString(type)); @@ -5628,7 +5733,7 @@ namespace ts { const id = getTypeListId(typeArguments); let instantiation = links.instantiations.get(id); if (!instantiation) { - links.instantiations.set(id, instantiation = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, typeArguments))); + links.instantiations.set(id, instantiation = instantiateTypeNoAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters))))); } return instantiation; } @@ -5640,8 +5745,16 @@ namespace ts { const type = getDeclaredTypeOfSymbol(symbol); const typeParameters = getSymbolLinks(symbol).typeParameters; if (typeParameters) { - if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) { - error(node, Diagnostics.Generic_type_0_requires_1_type_argument_s, symbolToString(symbol), typeParameters.length); + const numTypeArguments = length(node.typeArguments); + const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); + if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) { + error(node, + minTypeArgumentCount === typeParameters.length + ? Diagnostics.Generic_type_0_requires_1_type_argument_s + : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, + symbolToString(symbol), + minTypeArgumentCount, + typeParameters.length); return unknownType; } const typeArguments = map(node.typeArguments, getTypeFromTypeNode); @@ -5779,7 +5892,7 @@ namespace ts { error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name); return arity ? emptyGenericType : emptyObjectType; } - if (((type).typeParameters ? (type).typeParameters.length : 0) !== arity) { + if (length((type).typeParameters) !== arity) { error(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity); return arity ? emptyGenericType : emptyObjectType; } @@ -6695,6 +6808,16 @@ namespace ts { return createTypeMapper(sources, undefined); } + /** + * Maps forward-references to later types parameters to the empty object type. + * This is used during inference when instantiating type parameter defaults. + */ + function createBackreferenceMapper(typeParameters: TypeParameter[], index: number) { + const mapper: TypeMapper = t => indexOf(typeParameters, t) >= index ? emptyObjectType : t; + mapper.mappedTypes = typeParameters; + return mapper; + } + function getInferenceMapper(context: InferenceContext): TypeMapper { if (!context.mapper) { const mapper: TypeMapper = t => { @@ -8428,7 +8551,7 @@ namespace ts { // the constraints with a common set of type arguments to get relatable entities in places where // type parameters occur in the constraints. The complexity of doing that doesn't seem worthwhile, // particularly as we're comparing erased versions of the signatures below. - if ((source.typeParameters ? source.typeParameters.length : 0) !== (target.typeParameters ? target.typeParameters.length : 0)) { + if (length(source.typeParameters) !== length(target.typeParameters)) { return Ternary.False; } // Spec 1.0 Section 3.8.3 & 3.8.4: @@ -9251,11 +9374,24 @@ namespace ts { inferenceSucceeded = !!unionOrSuperType; } else { - // Infer the empty object type when no inferences were made. It is important to remember that - // in this case, inference still succeeds, meaning there is no error for not having inference - // candidates. An inference error only occurs when there are *conflicting* candidates, i.e. + // Infer either the default or the empty object type when no inferences were + // made. It is important to remember that in this case, inference still + // succeeds, meaning there is no error for not having inference candidates. An + // inference error only occurs when there are *conflicting* candidates, i.e. // candidates with no common supertype. - inferredType = emptyObjectType; + const defaultType = getDefaultFromTypeParameter(context.signature.typeParameters[index]); + if (defaultType) { + // Instantiate the default type. Any forward reference to a type + // parameter should be instantiated to the empty object type. + inferredType = instantiateType(defaultType, + combineTypeMappers( + createBackreferenceMapper(context.signature.typeParameters, index), + getInferenceMapper(context))); + } + else { + inferredType = emptyObjectType; + } + inferenceSucceeded = true; } context.inferredTypes[index] = inferredType; @@ -13024,8 +13160,10 @@ namespace ts { // If the user supplied type arguments, but the number of type arguments does not match // the declared number of type parameters, the call has an incorrect arity. + const numTypeParameters = length(signature.typeParameters); + const minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters); const hasRightNumberOfTypeArgs = !typeArguments || - (signature.typeParameters && typeArguments.length === signature.typeParameters.length); + (typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters); if (!hasRightNumberOfTypeArgs) { return false; } @@ -13147,7 +13285,7 @@ namespace ts { const typeParameters = signature.typeParameters; let typeArgumentsAreAssignable = true; let mapper: TypeMapper; - for (let i = 0; i < typeParameters.length; i++) { + for (let i = 0; i < typeArgumentNodes.length; i++) { if (typeArgumentsAreAssignable /* so far */) { const constraint = getConstraintOfTypeParameter(typeParameters[i]); if (constraint) { @@ -13722,15 +13860,15 @@ namespace ts { while (true) { candidate = originalCandidate; if (candidate.typeParameters) { - let typeArgumentTypes: Type[]; + let typeArgumentTypes: Type[] | undefined; if (typeArguments) { - typeArgumentTypes = map(typeArguments, getTypeFromTypeNode); + typeArgumentTypes = fillMissingTypeArguments(map(typeArguments, getTypeFromTypeNode), candidate.typeParameters, getMinTypeArgumentCount(candidate.typeParameters)); typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, /*reportErrors*/ false); } else { inferTypeArguments(node, candidate, args, excludeArgument, inferenceContext); - typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined; typeArgumentTypes = inferenceContext.inferredTypes; + typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined; } if (!typeArgumentsAreValid) { break; @@ -15700,11 +15838,16 @@ namespace ts { } checkSourceElement(node.constraint); + checkSourceElement(node.default); const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node)); if (!hasNonCircularBaseConstraint(typeParameter)) { error(node.constraint, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(typeParameter)); } - getConstraintOfTypeParameter(getDeclaredTypeOfTypeParameter(getSymbolOfNode(node))); + const constraintType = getConstraintOfTypeParameter(typeParameter); + const defaultType = getDefaultFromTypeParameter(typeParameter); + if (constraintType && defaultType) { + checkTypeAssignableTo(defaultType, getTypeWithThisArgument(constraintType, defaultType), node.default, Diagnostics.Type_0_does_not_satisfy_the_constraint_1); + } if (produceDiagnostics) { checkTypeNameIsReserved(node.name, Diagnostics.Type_parameter_name_cannot_be_0); } @@ -16297,6 +16440,7 @@ namespace ts { } function checkTypeArgumentConstraints(typeParameters: TypeParameter[], typeArgumentNodes: TypeNode[]): boolean { + const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); let typeArguments: Type[]; let mapper: TypeMapper; let result = true; @@ -16304,7 +16448,7 @@ namespace ts { const constraint = getConstraintOfTypeParameter(typeParameters[i]); if (constraint) { if (!typeArguments) { - typeArguments = map(typeArgumentNodes, getTypeFromTypeNode); + typeArguments = fillMissingTypeArguments(map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, minTypeArgumentCount); mapper = createTypeMapper(typeParameters, typeArguments); } const typeArgument = typeArguments[i]; @@ -18545,14 +18689,23 @@ namespace ts { } } - /** Check each type parameter and check that type parameters have no duplicate type parameter declarations */ + /** + * Check each type parameter and check that type parameters have no duplicate type parameter declarations + */ function checkTypeParameters(typeParameterDeclarations: TypeParameterDeclaration[]) { if (typeParameterDeclarations) { + let seenDefault = false; for (let i = 0; i < typeParameterDeclarations.length; i++) { const node = typeParameterDeclarations[i]; checkTypeParameter(node); if (produceDiagnostics) { + if (node.default) { + seenDefault = true; + } + else if (seenDefault) { + error(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters); + } for (let j = 0; j < i; j++) { if (typeParameterDeclarations[j].symbol === node.symbol) { error(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); @@ -18564,21 +18717,71 @@ namespace ts { } /** Check that type parameter lists are identical across multiple declarations */ - function checkTypeParameterListsIdentical(node: ClassLikeDeclaration | InterfaceDeclaration, symbol: Symbol) { + function checkTypeParameterListsIdentical(symbol: Symbol) { if (symbol.declarations.length === 1) { return; } - let firstDecl: ClassLikeDeclaration | InterfaceDeclaration; - for (const declaration of symbol.declarations) { - if (declaration.kind === SyntaxKind.ClassDeclaration || declaration.kind === SyntaxKind.InterfaceDeclaration) { - if (!firstDecl) { - firstDecl = declaration; + + const links = getSymbolLinks(symbol); + if (!links.typeParametersChecked) { + links.typeParametersChecked = true; + const declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol); + if (declarations.length <= 1) { + return; + } + + const type = getDeclaredTypeOfSymbol(symbol); + if (!areTypeParametersIdentical(declarations, type.localTypeParameters)) { + // Report an error on every conflicting declaration. + const name = symbolToString(symbol); + for (const declaration of declarations) { + error(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name); + } + } + } + } + + function areTypeParametersIdentical(declarations: (ClassDeclaration | InterfaceDeclaration)[], typeParameters: TypeParameter[]) { + const maxTypeArgumentCount = length(typeParameters); + const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); + + for (const declaration of declarations) { + // If this declaration has too few or too many type parameters, we report an error + const numTypeParameters = length(declaration.typeParameters); + if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) { + return false; + } + + for (let i = 0; i < numTypeParameters; i++) { + const source = declaration.typeParameters[i]; + const target = typeParameters[i]; + + // If the type parameter node does not have the same as the resolved type + // parameter at this position, we report an error. + if (source.name.text !== target.symbol.name) { + return false; } - else if (!areTypeParametersIdentical(firstDecl.typeParameters, node.typeParameters)) { - error(node.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, node.name.text); + + // If the type parameter node does not have an identical constraint as the resolved + // type parameter at this position, we report an error. + const sourceConstraint = source.constraint && getTypeFromTypeNode(source.constraint); + const targetConstraint = getConstraintFromTypeParameter(target); + if ((sourceConstraint || targetConstraint) && + (!sourceConstraint || !targetConstraint || !isTypeIdenticalTo(sourceConstraint, targetConstraint))) { + return false; + } + + // If the type parameter node has a default and it is not identical to the default + // for the type parameter at this position, we report an error. + const sourceDefault = source.default && getTypeFromTypeNode(source.default); + const targetDefault = getDefaultFromTypeParameter(target); + if (sourceDefault && targetDefault && !isTypeIdenticalTo(sourceDefault, targetDefault)) { + return false; } } } + + return true; } function checkClassExpression(node: ClassExpression): Type { @@ -18618,7 +18821,7 @@ namespace ts { const type = getDeclaredTypeOfSymbol(symbol); const typeWithThis = getTypeWithThisArgument(type); const staticType = getTypeOfSymbol(symbol); - checkTypeParameterListsIdentical(node, symbol); + checkTypeParameterListsIdentical(symbol); checkClassForDuplicateDeclarations(node); // Only check for reserved static identifiers on non-ambient context. @@ -18726,6 +18929,11 @@ namespace ts { return forEach(symbol.declarations, d => isClassLike(d) ? d : undefined); } + function getClassOrInterfaceDeclarationsOfSymbol(symbol: Symbol) { + return filter(symbol.declarations, (d: Declaration): d is ClassDeclaration | InterfaceDeclaration => + d.kind === SyntaxKind.ClassDeclaration || d.kind === SyntaxKind.InterfaceDeclaration); + } + function checkKindsOfPropertyMemberOverrides(type: InterfaceType, baseType: BaseType): void { // TypeScript 1.0 spec (April 2014): 8.2.3 @@ -18827,35 +19035,6 @@ namespace ts { return kind === SyntaxKind.GetAccessor || kind === SyntaxKind.SetAccessor; } - function areTypeParametersIdentical(list1: TypeParameterDeclaration[], list2: TypeParameterDeclaration[]) { - if (!list1 && !list2) { - return true; - } - if (!list1 || !list2 || list1.length !== list2.length) { - return false; - } - // TypeScript 1.0 spec (April 2014): - // When a generic interface has multiple declarations, all declarations must have identical type parameter - // lists, i.e. identical type parameter names with identical constraints in identical order. - for (let i = 0; i < list1.length; i++) { - const tp1 = list1[i]; - const tp2 = list2[i]; - if (tp1.name.text !== tp2.name.text) { - return false; - } - if (!tp1.constraint && !tp2.constraint) { - continue; - } - if (!tp1.constraint || !tp2.constraint) { - return false; - } - if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) { - return false; - } - } - return true; - } - function checkInheritedPropertiesAreIdentical(type: InterfaceType, typeNode: Node): boolean { const baseTypes = getBaseTypes(type); if (baseTypes.length < 2) { @@ -18902,7 +19081,7 @@ namespace ts { checkExportsOnMergedDeclarations(node); const symbol = getSymbolOfNode(node); - checkTypeParameterListsIdentical(node, symbol); + checkTypeParameterListsIdentical(symbol); // Only check this symbol once const firstInterfaceDecl = getDeclarationOfKind(symbol, SyntaxKind.InterfaceDeclaration); diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index f737c5e086df5..97d31cdf57ac7 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -1010,6 +1010,23 @@ namespace ts { emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError); } } + if (node.default && !isPrivateMethodTypeParameter(node)) { + write(" = "); + if (node.parent.kind === SyntaxKind.FunctionType || + node.parent.kind === SyntaxKind.ConstructorType || + (node.parent.parent && node.parent.parent.kind === SyntaxKind.TypeLiteral)) { + Debug.assert(node.parent.kind === SyntaxKind.MethodDeclaration || + node.parent.kind === SyntaxKind.MethodSignature || + node.parent.kind === SyntaxKind.FunctionType || + node.parent.kind === SyntaxKind.ConstructorType || + node.parent.kind === SyntaxKind.CallSignature || + node.parent.kind === SyntaxKind.ConstructSignature); + emitType(node.default); + } + else { + emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.default, getTypeParameterConstraintVisibilityError); + } + } function getTypeParameterConstraintVisibilityError(): SymbolAccessibilityDiagnostic { // Type parameter constraints are named by user so we should always be able to name it diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ec6067751a28f..eacae49fb80eb 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2059,6 +2059,14 @@ "category": "Error", "code": 2705 }, + "Required type parameters may not follow optional type parameters.": { + "category": "Error", + "code": 2706 + }, + "Generic type '{0}' requires between {1} and {2} type arguments.": { + "category": "Error", + "code": 2707 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index c5439aa051b7b..7e627568facfd 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -66,6 +66,7 @@ namespace ts { case SyntaxKind.TypeParameter: return visitNode(cbNode, (node).name) || visitNode(cbNode, (node).constraint) || + visitNode(cbNode, (node).default) || visitNode(cbNode, (node).expression); case SyntaxKind.ShorthandPropertyAssignment: return visitNodes(cbNodes, node.decorators) || @@ -2102,6 +2103,10 @@ namespace ts { } } + if (parseOptional(SyntaxKind.EqualsToken)) { + node.default = parseType(); + } + return finishNode(node); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index bdc4eea98da09..804ec1972bf9a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -624,6 +624,7 @@ kind: SyntaxKind.TypeParameter; name: Identifier; constraint?: TypeNode; + default?: TypeNode; // For error recovery purposes. expression?: Expression; @@ -2736,6 +2737,7 @@ isDiscriminantProperty?: boolean; // True if discriminant synthetic property resolvedExports?: SymbolTable; // Resolved exports of module exportsChecked?: boolean; // True if exports of external module have been checked + typeParametersChecked?: boolean; // True if type parameters of merged class and interface declarations have been checked. isDeclarationWithCollidingName?: boolean; // True if symbol is block scoped redeclaration bindingElement?: BindingElement; // Binding element associated with property symbol exportsSomeValue?: boolean; // True if module exports some value (not just types) @@ -3060,12 +3062,15 @@ // Type parameters (TypeFlags.TypeParameter) export interface TypeParameter extends TypeVariable { constraint: Type; // Constraint + default?: Type; /* @internal */ target?: TypeParameter; // Instantiation target /* @internal */ mapper?: TypeMapper; // Instantiation mapper /* @internal */ isThisType?: boolean; + /* @internal */ + resolvedDefaultType?: Type; } // Indexed access types (TypeFlags.IndexedAccess) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 39d53a9a9c053..3d0e9535aad0e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -24,6 +24,20 @@ namespace ts { return undefined; } + export function findDeclaration(symbol: Symbol, predicate: (node: Declaration) => node is T): T | undefined; + export function findDeclaration(symbol: Symbol, predicate: (node: Declaration) => boolean): Declaration | undefined; + export function findDeclaration(symbol: Symbol, predicate: (node: Declaration) => boolean): Declaration | undefined { + const declarations = symbol.declarations; + if (declarations) { + for (const declaration of declarations) { + if (predicate(declaration)) { + return declaration; + } + } + } + return undefined; + } + export interface StringSymbolWriter extends SymbolWriter { string(): string; } diff --git a/src/lib/es2015.promise.d.ts b/src/lib/es2015.promise.d.ts index b1e736100c57c..208e5c1cdc254 100644 --- a/src/lib/es2015.promise.d.ts +++ b/src/lib/es2015.promise.d.ts @@ -1,4 +1,3 @@ - interface PromiseConstructor { /** * A reference to the prototype. diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 936db0cdfb550..8f29deb67db77 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1310,39 +1310,7 @@ interface PromiseLike { * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then( - onfulfilled?: ((value: T) => T | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => T | PromiseLike) | undefined | null): PromiseLike; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled: ((value: T) => T | PromiseLike) | undefined | null, - onrejected: (reason: any) => TResult | PromiseLike): PromiseLike; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled: (value: T) => TResult | PromiseLike, - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): PromiseLike; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled: (value: T) => TResult1 | PromiseLike, - onrejected: (reason: any) => TResult2 | PromiseLike): PromiseLike; + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } /** @@ -1355,45 +1323,14 @@ interface Promise { * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then(onfulfilled?: ((value: T) => T | PromiseLike) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike) | undefined | null): Promise; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled: ((value: T) => T | PromiseLike) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike): Promise; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; - - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => T | PromiseLike) | undefined | null): Promise; + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected: (reason: any) => TResult | PromiseLike): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } interface ArrayLike { diff --git a/src/services/services.ts b/src/services/services.ts index 2b1d414f4c3f0..d1fc644371464 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -397,6 +397,7 @@ namespace ts { parameters: Symbol[]; thisParameter: Symbol; resolvedReturnType: Type; + minTypeArgumentCount: number; minArgumentCount: number; hasRestParameter: boolean; hasLiteralTypes: boolean; diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt index 5fa332339124a..a5334d5b9d736 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt @@ -6,7 +6,7 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1 tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. Type 'Thenable' is not assignable to type 'PromiseLike'. Types of property 'then' are incompatible. - Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): PromiseLike; (onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): PromiseLike; }'. + Type '() => void' is not assignable to type '(onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. Type 'void' is not assignable to type 'PromiseLike'. tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. @@ -37,7 +37,7 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1 !!! error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. !!! error TS1055: Type 'Thenable' is not assignable to type 'PromiseLike'. !!! error TS1055: Types of property 'then' are incompatible. -!!! error TS1055: Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): PromiseLike; (onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): PromiseLike; }'. +!!! error TS1055: Type '() => void' is not assignable to type '(onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. !!! error TS1055: Type 'void' is not assignable to type 'PromiseLike'. async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise diff --git a/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt b/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt index 617f7b1502f64..35b130f7d6ccb 100644 --- a/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt +++ b/tests/baselines/reference/constructSignaturesWithOverloads2.errors.txt @@ -1,7 +1,8 @@ +tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts(27,11): error TS2428: All declarations of 'I' must have identical type parameters. tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts(32,11): error TS2428: All declarations of 'I' must have identical type parameters. -==== tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts (1 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts (2 errors) ==== // No errors expected for basic overloads of construct signatures with merged declarations // clodules @@ -29,6 +30,8 @@ tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSig // merged interfaces interface I { + ~ +!!! error TS2428: All declarations of 'I' must have identical type parameters. new (x: number, y?: string): C; new (x: number, y: string): C; } diff --git a/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt b/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt index 7b47fee05afda..942ead52be39f 100644 --- a/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt +++ b/tests/baselines/reference/extendedInterfacesWithDuplicateTypeParameters.errors.txt @@ -1,9 +1,10 @@ tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts(1,42): error TS2300: Duplicate identifier 'A'. +tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts(5,11): error TS2428: All declarations of 'InterfaceWithSomeTypars' must have identical type parameters. tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts(9,11): error TS2428: All declarations of 'InterfaceWithSomeTypars' must have identical type parameters. tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts(9,38): error TS2300: Duplicate identifier 'C'. -==== tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts (3 errors) ==== +==== tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts (4 errors) ==== interface InterfaceWithMultipleTypars { // should error ~ !!! error TS2300: Duplicate identifier 'A'. @@ -11,6 +12,8 @@ tests/cases/compiler/extendedInterfacesWithDuplicateTypeParameters.ts(9,38): err } interface InterfaceWithSomeTypars { // should not error + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2428: All declarations of 'InterfaceWithSomeTypars' must have identical type parameters. bar(): void; } diff --git a/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt b/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt index 8d9ebb8d276a5..963613b9c2dd2 100644 --- a/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt +++ b/tests/baselines/reference/genericAndNonGenericInterfaceWithTheSameName.errors.txt @@ -1,12 +1,17 @@ +tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(3,11): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(7,11): error TS2428: All declarations of 'A' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(12,15): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(16,15): error TS2428: All declarations of 'A' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(34,22): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts(40,22): error TS2428: All declarations of 'A' must have identical type parameters. -==== tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts (3 errors) ==== +==== tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts (6 errors) ==== // generic and non-generic interfaces with the same name do not merge interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. foo: string; } @@ -18,6 +23,8 @@ tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterf module M { interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. bar: T; } @@ -42,6 +49,8 @@ tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterf module M3 { export interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. foo: string; } } diff --git a/tests/baselines/reference/genericDefaults.js b/tests/baselines/reference/genericDefaults.js new file mode 100644 index 0000000000000..45d889fc49c5a --- /dev/null +++ b/tests/baselines/reference/genericDefaults.js @@ -0,0 +1,1005 @@ +//// [genericDefaults.ts] +interface A { a: number; } +interface B { b: number; } +interface C { c: number; } +interface D { d: number; } +interface AB { a: number; b: number; } +interface BC { b: number; c: number; } + +declare const a: A; +declare const b: B; +declare const c: C; +declare const d: D; +declare const ab: AB; +declare const bc: BC; +declare const x: any; + +// function without type parameters +declare function f00(a?: A): A; +// no inference +f00(); +f00(a); + +// function with a type parameter without a default +declare function f01(a?: T): T; +// inference +f01(); +f01(a); +// no inference, fully supplied +f01(); +f01(a); + +// function with a type paramter with a default +declare function f02(a?: T): T; +// inference +f02(); +f02(a); +f02(b); +// no inference, fully supplied +f02(); +f02(a); +f02(); +f02(b); + +// function with a type parameter with a default that refers to itself +declare function f03(a?: T): T; +// inference +f03(); +f03(a); +f03(b); +// no inference, fully supplied +f03(); +f03(a); +f03(); +f03(b); + +// function with a type paramter without a default and a type parameter with a default +declare function f04(a?: T, b?: U): [T, U]; +// inference +f04(); +f04(a); +f04(a, b); +f04(a, c); +// no inference, partially supplied +f04(); +f04(a); +f04(a, b); +// no inference, fully supplied +f04(); +f04(a); +f04(a, b); +f04(); +f04(a); +f04(a, c); + +// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter +declare function f05(a?: T, b?: U): [T, U]; +// inference +f05(); +f05(a); +f05(a, a); +f05(a, b); +// no inference, partially supplied +f05(); +f05(a); +f05(a, a); +// no inference, fully supplied +f05(); +f05(a); +f05(a, b); + +// function with a type parameter with a default that refers to an earlier type parameter with a default +declare function f06(a?: T, b?: U): [T, U]; +// inference +f06(); +f06(a); +f06(a, a); +f06(a, b); +f06(b, a); +f06(b, b); +// no inference, partially supplied +f06(); +f06(a); +f06(a, a); +f06(); +f06(b); +f06(b, b); +// no inference, fully supplied +f06(); +f06(a); +f06(a, b); +f06(); +f06(b); +f06(b, c); + +// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter with a default +declare function f07(a?: T, b?: U, c?: V): [T, U, V]; +// inference +f07(); +f07(a, b); +f07(a, c); +f07(a, b, b); +f07(a, b, c); +f07(a, c, b); +f07(a, c, c); +// no inference, partially supplied +f07(); +f07(a); +f07(a, b); +f07(a, b, b); +f07(); +f07(a); +f07(a, b); +f07(a, b, b); +f07(); +f07(a); +f07(a, c); +f07(a, c, c); +// no inference, fully supplied +f07(); +f07(a); +f07(a, b); +f07(a, b, c); +f07(); +f07(a); +f07(a, c); +f07(a, c, d); + +// function with a type parameter with a default that refers to an earlier type parameter with a constraint +declare function f08(a?: T, b?: U): [T, U]; +// inference +f08(); +f08(a); +f08(a, a); +f08(a, b); +// no inference, partially supplied +f08(); +f08(a); +f08(a, a); +// no inference, fully supplied +f08(); +f08(a); +f08(a, b); + +// function with a type parameter with a constraint and a default that refers to an earlier type parameter +declare function f09(a?: T, b?: U): [T, U]; +// inference +f09(); +f09(a); +f09(a, a); +f09(a, ab); +// no inference, partially supplied +f09(); +f09(a); +f09(a, a); +f09(a, ab); +// no inference, fully supplied +f09(); +f09(a); +f09(a, ab); + +// function with a type parameter with a constraint and a default that refers to an earlier type parameter with a constraint +declare function f10(a?: T, b?: U): [T, U]; +// inference +f10(); +f10(a); +f10(a, a); +f10(a, ab); +// no inference, partially supplied +f10(); +f10(a); +f10(a, a); +f10(a, ab); +// no inference, fully supplied +f10(); +f10(a); +f10(a, a); +f10(a, ab); +f10(); +f10(a); +f10(a, ab); + +// function with a type parameter with a default that refers to an earier type parameter in a union +declare function f11(a?: T, b?: U): [T, U]; +// inference +f11(); +f11(a); +f11(a, a); +f11(a, b); +f11(a, c); +// no inference, partially supplied +f11(); +f11(a); +f11(a, a); +f11(a, b); +// no inference, fully supplied +f11(); +f11(a); +f11(a, c); + +// function with a type parameter with a default that refers to an earlier type parameter in an intersection +declare function f12(a?: T, b?: U): [T, U]; +// inference +f12(); +f12(a); +f12(a, a); +f12(a, b); +f12(a, c); +// no inference, partially supplied +f12(); +f12(a); +f12(a, ab); +// no inference, fully supplied +f12(); +f12(a); +f12(a, c); + +// function with a type parameter with a default that refers to a later type parameter with a default +declare function f13(a?: T, b?: U): [T, U]; +// inference +f13(); +f13(a); +f13(a, b); +f13(a, c); +// no inference, partially supplied +f13(); +f13(a); +f13(a, b); +// no inference, fully supplied +f13(); +f13(a); +f13(a, c); +f13(a, c); + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default +declare function f14(a?: T, b?: U, c?: V): [T, U, V]; +// inference +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +f14(a, b, d); +// no inference, partially supplied +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +// no inference fully supplied +f14(); +f14(a); +f14(a, b); +f14(a, b, d); + +// function with two type parameters with defaults that mutually refer to each other +declare function f15(a?: T, b?: U): [T, U]; +// inference +f15(); +f15(a); +f15(a, b); +// no inference, partially supplied +f15(); +f15(a); +f15(a, a); +// no inference, fully supplied +f15(); +f15(a); +f15(a, b); + +// function with a type parameter without a default and two type parameters with defaults that mutually refer to each other +declare function f16(a?: T, b?: U, c?: V): [T, U, V]; +// no inference +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +// no inference, partially supplied +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +// no inference, fully supplied +f16(); +f16(a); +f16(a, b); +f16(a, b, d); + +// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union +declare function f17(a?: T, b?: U): [T, U]; +// inference +f17(); +f17(a); +f17(a, a); +f17(a, b); +f17(a, c); +// no inference, partially supplied +f17(); +f17(a); +f17(a, a); +f17(a, b); +// no inference, fully supplied +f17(); +f17(a); +f17(a, c); + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union +declare function f18(a?: T, b?: U, c?: V): [T, U, V]; +// inference +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +// no inference, partially supplied +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +// no inference, fully supplied +f18(); +f18(a); +f18(a, b); +f18(a, b, d); + +// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection +declare function f19(a?: T, b?: U): [T, U]; +// inference +f19(); +f19(a); +f19(a, a); +f19(a, b); +f19(a, ab); +f19(a, c); +// no inference, partially supplied +f19(); +f19(a); +f19(a, ab); +// no inference, fully supplied +f19(); +f19(a); +f19(a, c); + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection +declare function f20(a?: T, b?: U, c?: V): [T, U, V]; +// inference +f20(); +f20(a); +f20(a, b); +f20(a, b, c); +// no inference, partially supplied +f20(); +f20(a); +f20(a, b); +f20(a, b, bc); +f20(); +f20(a); +f20(a, b); +f20(a, b, bc); +// no inference, fully supplied +f20(); +f20(a); +f20(a, b); +f20(a, b, d); + +interface i00 { a: T; } +const i00c00 = (x).a; +const i00c01 = (>x).a; + +interface i01 { a: [T, U]; } +const i01c00 = (>x).a; +const i01c01 = (>x).a; + +interface i02 { a: [T, U]; } +const i02c00 = (>x).a; +const i02c01 = (>x).a; +const i02c02 = (>x).a; +const i02c03 = (>x).a; +const i02c04 = (>x).a; + +interface i03 { a: [T, U]; } +const i03c00 = (>x).a; +const i03c01 = (>x).a; +const i03c02 = (>x).a; +const i03c03 = (>x).a; +const i03c04 = (>x).a; + +interface i04 {} +interface i04 {} +interface i04 {} +interface i04 {} + +interface i05 { a: T; } +const i05c00 = (x).a; +const i05c01 = (>x).a; + +interface i06 { a: [T, U]; } +const i06c00 = (x).a; +const i06c01 = (>x).a; +const i06c02 = (>x).a; + +interface i07 { a: A; } +interface i07 { b: A; } +const i07c00 = (x).a; +const i07c01 = (x).b; +const i07c02 = (>x).a; +const i07c03 = (>x).b; + +interface Base01 { a: T; } +interface Base01Constructor { new (a?: T): Base01; } + +declare const Base01: Base01Constructor; +const Base01c00 = new Base01(); +const Base01c01 = new Base01(1); +const Base01c02 = new Base01(); +const Base01c03 = new Base01(1); + +declare class Derived01 extends Base01 { } +const Derived01c00 = new Derived01(); +const Derived01c01 = new Derived01(1); +const Derived01c02 = new Derived01(); +const Derived01c03 = new Derived01(1); + +declare class Derived02 extends Base01 { } +const Derived02c00 = new Derived02(); +const Derived02c01 = new Derived02(1); +const Derived02c02 = new Derived02(); +const Derived02c03 = new Derived02(1); + +type t00 = { a: T; } +const t00c00 = (x).a; +const t00c01 = (>x).a; + +type t01 = { a: [T, U]; } +const t01c00 = (>x).a; +const t01c01 = (>x).a; + +type t02 = { a: [T, U]; } +const t02c00 = (>x).a; +const t02c01 = (>x).a; +const t02c02 = (>x).a; +const t02c03 = (>x).a; +const t02c04 = (>x).a; + +type t03 = { a: [T, U]; } +const t03c00 = (>x).a; +const t03c01 = (>x).a; +const t03c02 = (>x).a; +const t03c03 = (>x).a; +const t03c04 = (>x).a; + + +//// [genericDefaults.js] +// no inference +f00(); +f00(a); +// inference +f01(); +f01(a); +// no inference, fully supplied +f01(); +f01(a); +// inference +f02(); +f02(a); +f02(b); +// no inference, fully supplied +f02(); +f02(a); +f02(); +f02(b); +// inference +f03(); +f03(a); +f03(b); +// no inference, fully supplied +f03(); +f03(a); +f03(); +f03(b); +// inference +f04(); +f04(a); +f04(a, b); +f04(a, c); +// no inference, partially supplied +f04(); +f04(a); +f04(a, b); +// no inference, fully supplied +f04(); +f04(a); +f04(a, b); +f04(); +f04(a); +f04(a, c); +// inference +f05(); +f05(a); +f05(a, a); +f05(a, b); +// no inference, partially supplied +f05(); +f05(a); +f05(a, a); +// no inference, fully supplied +f05(); +f05(a); +f05(a, b); +// inference +f06(); +f06(a); +f06(a, a); +f06(a, b); +f06(b, a); +f06(b, b); +// no inference, partially supplied +f06(); +f06(a); +f06(a, a); +f06(); +f06(b); +f06(b, b); +// no inference, fully supplied +f06(); +f06(a); +f06(a, b); +f06(); +f06(b); +f06(b, c); +// inference +f07(); +f07(a, b); +f07(a, c); +f07(a, b, b); +f07(a, b, c); +f07(a, c, b); +f07(a, c, c); +// no inference, partially supplied +f07(); +f07(a); +f07(a, b); +f07(a, b, b); +f07(); +f07(a); +f07(a, b); +f07(a, b, b); +f07(); +f07(a); +f07(a, c); +f07(a, c, c); +// no inference, fully supplied +f07(); +f07(a); +f07(a, b); +f07(a, b, c); +f07(); +f07(a); +f07(a, c); +f07(a, c, d); +// inference +f08(); +f08(a); +f08(a, a); +f08(a, b); +// no inference, partially supplied +f08(); +f08(a); +f08(a, a); +// no inference, fully supplied +f08(); +f08(a); +f08(a, b); +// inference +f09(); +f09(a); +f09(a, a); +f09(a, ab); +// no inference, partially supplied +f09(); +f09(a); +f09(a, a); +f09(a, ab); +// no inference, fully supplied +f09(); +f09(a); +f09(a, ab); +// inference +f10(); +f10(a); +f10(a, a); +f10(a, ab); +// no inference, partially supplied +f10(); +f10(a); +f10(a, a); +f10(a, ab); +// no inference, fully supplied +f10(); +f10(a); +f10(a, a); +f10(a, ab); +f10(); +f10(a); +f10(a, ab); +// inference +f11(); +f11(a); +f11(a, a); +f11(a, b); +f11(a, c); +// no inference, partially supplied +f11(); +f11(a); +f11(a, a); +f11(a, b); +// no inference, fully supplied +f11(); +f11(a); +f11(a, c); +// inference +f12(); +f12(a); +f12(a, a); +f12(a, b); +f12(a, c); +// no inference, partially supplied +f12(); +f12(a); +f12(a, ab); +// no inference, fully supplied +f12(); +f12(a); +f12(a, c); +// inference +f13(); +f13(a); +f13(a, b); +f13(a, c); +// no inference, partially supplied +f13(); +f13(a); +f13(a, b); +// no inference, fully supplied +f13(); +f13(a); +f13(a, c); +f13(a, c); +// inference +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +f14(a, b, d); +// no inference, partially supplied +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +// no inference fully supplied +f14(); +f14(a); +f14(a, b); +f14(a, b, d); +// inference +f15(); +f15(a); +f15(a, b); +// no inference, partially supplied +f15(); +f15(a); +f15(a, a); +// no inference, fully supplied +f15(); +f15(a); +f15(a, b); +// no inference +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +// no inference, partially supplied +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +// no inference, fully supplied +f16(); +f16(a); +f16(a, b); +f16(a, b, d); +// inference +f17(); +f17(a); +f17(a, a); +f17(a, b); +f17(a, c); +// no inference, partially supplied +f17(); +f17(a); +f17(a, a); +f17(a, b); +// no inference, fully supplied +f17(); +f17(a); +f17(a, c); +// inference +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +// no inference, partially supplied +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +// no inference, fully supplied +f18(); +f18(a); +f18(a, b); +f18(a, b, d); +// inference +f19(); +f19(a); +f19(a, a); +f19(a, b); +f19(a, ab); +f19(a, c); +// no inference, partially supplied +f19(); +f19(a); +f19(a, ab); +// no inference, fully supplied +f19(); +f19(a); +f19(a, c); +// inference +f20(); +f20(a); +f20(a, b); +f20(a, b, c); +// no inference, partially supplied +f20(); +f20(a); +f20(a, b); +f20(a, b, bc); +f20(); +f20(a); +f20(a, b); +f20(a, b, bc); +// no inference, fully supplied +f20(); +f20(a); +f20(a, b); +f20(a, b, d); +var i00c00 = x.a; +var i00c01 = x.a; +var i01c00 = x.a; +var i01c01 = x.a; +var i02c00 = x.a; +var i02c01 = x.a; +var i02c02 = x.a; +var i02c03 = x.a; +var i02c04 = x.a; +var i03c00 = x.a; +var i03c01 = x.a; +var i03c02 = x.a; +var i03c03 = x.a; +var i03c04 = x.a; +var i05c00 = x.a; +var i05c01 = x.a; +var i06c00 = x.a; +var i06c01 = x.a; +var i06c02 = x.a; +var i07c00 = x.a; +var i07c01 = x.b; +var i07c02 = x.a; +var i07c03 = x.b; +var Base01c00 = new Base01(); +var Base01c01 = new Base01(1); +var Base01c02 = new Base01(); +var Base01c03 = new Base01(1); +var Derived01c00 = new Derived01(); +var Derived01c01 = new Derived01(1); +var Derived01c02 = new Derived01(); +var Derived01c03 = new Derived01(1); +var Derived02c00 = new Derived02(); +var Derived02c01 = new Derived02(1); +var Derived02c02 = new Derived02(); +var Derived02c03 = new Derived02(1); +var t00c00 = x.a; +var t00c01 = x.a; +var t01c00 = x.a; +var t01c01 = x.a; +var t02c00 = x.a; +var t02c01 = x.a; +var t02c02 = x.a; +var t02c03 = x.a; +var t02c04 = x.a; +var t03c00 = x.a; +var t03c01 = x.a; +var t03c02 = x.a; +var t03c03 = x.a; +var t03c04 = x.a; + + +//// [genericDefaults.d.ts] +interface A { + a: number; +} +interface B { + b: number; +} +interface C { + c: number; +} +interface D { + d: number; +} +interface AB { + a: number; + b: number; +} +interface BC { + b: number; + c: number; +} +declare const a: A; +declare const b: B; +declare const c: C; +declare const d: D; +declare const ab: AB; +declare const bc: BC; +declare const x: any; +declare function f00(a?: A): A; +declare function f01(a?: T): T; +declare function f02(a?: T): T; +declare function f03(a?: T): T; +declare function f04(a?: T, b?: U): [T, U]; +declare function f05(a?: T, b?: U): [T, U]; +declare function f06(a?: T, b?: U): [T, U]; +declare function f07(a?: T, b?: U, c?: V): [T, U, V]; +declare function f08(a?: T, b?: U): [T, U]; +declare function f09(a?: T, b?: U): [T, U]; +declare function f10(a?: T, b?: U): [T, U]; +declare function f11(a?: T, b?: U): [T, U]; +declare function f12(a?: T, b?: U): [T, U]; +declare function f13(a?: T, b?: U): [T, U]; +declare function f14(a?: T, b?: U, c?: V): [T, U, V]; +declare function f15(a?: T, b?: U): [T, U]; +declare function f16(a?: T, b?: U, c?: V): [T, U, V]; +declare function f17(a?: T, b?: U): [T, U]; +declare function f18(a?: T, b?: U, c?: V): [T, U, V]; +declare function f19(a?: T, b?: U): [T, U]; +declare function f20(a?: T, b?: U, c?: V): [T, U, V]; +interface i00 { + a: T; +} +declare const i00c00: number; +declare const i00c01: number; +interface i01 { + a: [T, U]; +} +declare const i01c00: [number, number]; +declare const i01c01: [number, string]; +interface i02 { + a: [T, U]; +} +declare const i02c00: [number, number]; +declare const i02c01: [1, 1]; +declare const i02c02: [number, number]; +declare const i02c03: [1, number]; +declare const i02c04: [number, 1]; +interface i03 { + a: [T, U]; +} +declare const i03c00: [number, number]; +declare const i03c01: [1, 1]; +declare const i03c02: [number, number]; +declare const i03c03: [1, 1]; +declare const i03c04: [number, 1]; +interface i04 { +} +interface i04 { +} +interface i04 { +} +interface i04 { +} +interface i05 { + a: T; +} +declare const i05c00: {}; +declare const i05c01: number; +interface i06 { + a: [T, U]; +} +declare const i06c00: [{}, {}]; +declare const i06c01: [number, number]; +declare const i06c02: [number, string]; +interface i07 { + a: A; +} +interface i07 { + b: A; +} +declare const i07c00: A; +declare const i07c01: number; +declare const i07c02: A; +declare const i07c03: B; +interface Base01 { + a: T; +} +interface Base01Constructor { + new (a?: T): Base01; +} +declare const Base01: Base01Constructor; +declare const Base01c00: Base01; +declare const Base01c01: Base01; +declare const Base01c02: Base01; +declare const Base01c03: Base01; +declare class Derived01 extends Base01 { +} +declare const Derived01c00: Derived01<{}>; +declare const Derived01c01: Derived01; +declare const Derived01c02: Derived01; +declare const Derived01c03: Derived01; +declare class Derived02 extends Base01 { +} +declare const Derived02c00: Derived02; +declare const Derived02c01: Derived02; +declare const Derived02c02: Derived02; +declare const Derived02c03: Derived02; +declare type t00 = { + a: T; +}; +declare const t00c00: number; +declare const t00c01: number; +declare type t01 = { + a: [T, U]; +}; +declare const t01c00: [number, number]; +declare const t01c01: [number, string]; +declare type t02 = { + a: [T, U]; +}; +declare const t02c00: [number, number]; +declare const t02c01: [1, 1]; +declare const t02c02: [number, number]; +declare const t02c03: [1, number]; +declare const t02c04: [number, 1]; +declare type t03 = { + a: [T, U]; +}; +declare const t03c00: [number, number]; +declare const t03c01: [1, 1]; +declare const t03c02: [number, number]; +declare const t03c03: [1, 1]; +declare const t03c04: [number, 1]; diff --git a/tests/baselines/reference/genericDefaults.symbols b/tests/baselines/reference/genericDefaults.symbols new file mode 100644 index 0000000000000..2250e9ea95a8a --- /dev/null +++ b/tests/baselines/reference/genericDefaults.symbols @@ -0,0 +1,2257 @@ +=== tests/cases/compiler/genericDefaults.ts === +interface A { a: number; } +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(A.a, Decl(genericDefaults.ts, 0, 13)) + +interface B { b: number; } +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>b : Symbol(B.b, Decl(genericDefaults.ts, 1, 13)) + +interface C { c: number; } +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>c : Symbol(C.c, Decl(genericDefaults.ts, 2, 13)) + +interface D { d: number; } +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>d : Symbol(D.d, Decl(genericDefaults.ts, 3, 13)) + +interface AB { a: number; b: number; } +>AB : Symbol(AB, Decl(genericDefaults.ts, 3, 26)) +>a : Symbol(AB.a, Decl(genericDefaults.ts, 4, 14)) +>b : Symbol(AB.b, Decl(genericDefaults.ts, 4, 25)) + +interface BC { b: number; c: number; } +>BC : Symbol(BC, Decl(genericDefaults.ts, 4, 38)) +>b : Symbol(BC.b, Decl(genericDefaults.ts, 5, 14)) +>c : Symbol(BC.c, Decl(genericDefaults.ts, 5, 25)) + +declare const a: A; +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +declare const b: B; +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +declare const c: C; +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +declare const d: D; +>d : Symbol(d, Decl(genericDefaults.ts, 10, 13)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) + +declare const ab: AB; +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) +>AB : Symbol(AB, Decl(genericDefaults.ts, 3, 26)) + +declare const bc: BC; +>bc : Symbol(bc, Decl(genericDefaults.ts, 12, 13)) +>BC : Symbol(BC, Decl(genericDefaults.ts, 4, 38)) + +declare const x: any; +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) + +// function without type parameters +declare function f00(a?: A): A; +>f00 : Symbol(f00, Decl(genericDefaults.ts, 13, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 16, 21)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +// no inference +f00(); +>f00 : Symbol(f00, Decl(genericDefaults.ts, 13, 21)) + +f00(a); +>f00 : Symbol(f00, Decl(genericDefaults.ts, 13, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +// function with a type parameter without a default +declare function f01(a?: T): T; +>f01 : Symbol(f01, Decl(genericDefaults.ts, 19, 7)) +>T : Symbol(T, Decl(genericDefaults.ts, 22, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 22, 24)) +>T : Symbol(T, Decl(genericDefaults.ts, 22, 21)) +>T : Symbol(T, Decl(genericDefaults.ts, 22, 21)) + +// inference +f01(); +>f01 : Symbol(f01, Decl(genericDefaults.ts, 19, 7)) + +f01(a); +>f01 : Symbol(f01, Decl(genericDefaults.ts, 19, 7)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +// no inference, fully supplied +f01(); +>f01 : Symbol(f01, Decl(genericDefaults.ts, 19, 7)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f01(a); +>f01 : Symbol(f01, Decl(genericDefaults.ts, 19, 7)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +// function with a type paramter with a default +declare function f02(a?: T): T; +>f02 : Symbol(f02, Decl(genericDefaults.ts, 28, 10)) +>T : Symbol(T, Decl(genericDefaults.ts, 31, 21)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 31, 28)) +>T : Symbol(T, Decl(genericDefaults.ts, 31, 21)) +>T : Symbol(T, Decl(genericDefaults.ts, 31, 21)) + +// inference +f02(); +>f02 : Symbol(f02, Decl(genericDefaults.ts, 28, 10)) + +f02(a); +>f02 : Symbol(f02, Decl(genericDefaults.ts, 28, 10)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f02(b); +>f02 : Symbol(f02, Decl(genericDefaults.ts, 28, 10)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, fully supplied +f02(); +>f02 : Symbol(f02, Decl(genericDefaults.ts, 28, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f02(a); +>f02 : Symbol(f02, Decl(genericDefaults.ts, 28, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f02(); +>f02 : Symbol(f02, Decl(genericDefaults.ts, 28, 10)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f02(b); +>f02 : Symbol(f02, Decl(genericDefaults.ts, 28, 10)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// function with a type parameter with a default that refers to itself +declare function f03(a?: T): T; +>f03 : Symbol(f03, Decl(genericDefaults.ts, 40, 10)) +>T : Symbol(T, Decl(genericDefaults.ts, 43, 21)) +>T : Symbol(T, Decl(genericDefaults.ts, 43, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 43, 28)) +>T : Symbol(T, Decl(genericDefaults.ts, 43, 21)) +>T : Symbol(T, Decl(genericDefaults.ts, 43, 21)) + +// inference +f03(); +>f03 : Symbol(f03, Decl(genericDefaults.ts, 40, 10)) + +f03(a); +>f03 : Symbol(f03, Decl(genericDefaults.ts, 40, 10)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f03(b); +>f03 : Symbol(f03, Decl(genericDefaults.ts, 40, 10)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, fully supplied +f03(); +>f03 : Symbol(f03, Decl(genericDefaults.ts, 40, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f03(a); +>f03 : Symbol(f03, Decl(genericDefaults.ts, 40, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f03(); +>f03 : Symbol(f03, Decl(genericDefaults.ts, 40, 10)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f03(b); +>f03 : Symbol(f03, Decl(genericDefaults.ts, 40, 10)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// function with a type paramter without a default and a type parameter with a default +declare function f04(a?: T, b?: U): [T, U]; +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>T : Symbol(T, Decl(genericDefaults.ts, 55, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 55, 23)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 55, 31)) +>T : Symbol(T, Decl(genericDefaults.ts, 55, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 55, 37)) +>U : Symbol(U, Decl(genericDefaults.ts, 55, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 55, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 55, 23)) + +// inference +f04(); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) + +f04(a); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f04(a, b); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f04(a, c); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f04(); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f04(a); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f04(a, b); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, fully supplied +f04(); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f04(a); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f04(a, b); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f04(); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f04(a); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f04(a, c); +>f04 : Symbol(f04, Decl(genericDefaults.ts, 52, 10)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter +declare function f05(a?: T, b?: U): [T, U]; +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 74, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 74, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 74, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 74, 31)) +>T : Symbol(T, Decl(genericDefaults.ts, 74, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 74, 37)) +>U : Symbol(U, Decl(genericDefaults.ts, 74, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 74, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 74, 23)) + +// inference +f05(); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) + +f05(a); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f05(a, a); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f05(a, b); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, partially supplied +f05(); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f05(a); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f05(a, a); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +// no inference, fully supplied +f05(); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f05(a); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f05(a, b); +>f05 : Symbol(f05, Decl(genericDefaults.ts, 71, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// function with a type parameter with a default that refers to an earlier type parameter with a default +declare function f06(a?: T, b?: U): [T, U]; +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 90, 21)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>U : Symbol(U, Decl(genericDefaults.ts, 90, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 90, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 90, 35)) +>T : Symbol(T, Decl(genericDefaults.ts, 90, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 90, 41)) +>U : Symbol(U, Decl(genericDefaults.ts, 90, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 90, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 90, 27)) + +// inference +f06(); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) + +f06(a); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f06(a, a); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f06(a, b); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f06(b, a); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f06(b, b); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, partially supplied +f06(); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f06(a); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f06(a, a); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f06(); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f06(b); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f06(b, b); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, fully supplied +f06(); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f06(a); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f06(a, b); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f06(); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f06(b); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f06(b, c); +>f06 : Symbol(f06, Decl(genericDefaults.ts, 87, 16)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter with a default +declare function f07(a?: T, b?: U, c?: V): [T, U, V]; +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 114, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 114, 23)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>V : Symbol(V, Decl(genericDefaults.ts, 114, 30)) +>U : Symbol(U, Decl(genericDefaults.ts, 114, 23)) +>a : Symbol(a, Decl(genericDefaults.ts, 114, 38)) +>T : Symbol(T, Decl(genericDefaults.ts, 114, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 114, 44)) +>U : Symbol(U, Decl(genericDefaults.ts, 114, 23)) +>c : Symbol(c, Decl(genericDefaults.ts, 114, 51)) +>V : Symbol(V, Decl(genericDefaults.ts, 114, 30)) +>T : Symbol(T, Decl(genericDefaults.ts, 114, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 114, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 114, 30)) + +// inference +f07(); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) + +f07(a, b); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f07(a, c); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f07(a, b, b); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f07(a, b, c); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f07(a, c, b); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f07(a, c, c); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f07(); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f07(a); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f07(a, b); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f07(a, b, b); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f07(); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f07(a); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f07(a, b); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f07(a, b, b); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f07(); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f07(a); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f07(a, c); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f07(a, c, c); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, fully supplied +f07(); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f07(a); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f07(a, b); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f07(a, b, c); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f07(); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f07(a); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f07(a, c); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f07(a, c, d); +>f07 : Symbol(f07, Decl(genericDefaults.ts, 111, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) +>d : Symbol(d, Decl(genericDefaults.ts, 10, 13)) + +// function with a type parameter with a default that refers to an earlier type parameter with a constraint +declare function f08(a?: T, b?: U): [T, U]; +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>T : Symbol(T, Decl(genericDefaults.ts, 147, 21)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>U : Symbol(U, Decl(genericDefaults.ts, 147, 33)) +>T : Symbol(T, Decl(genericDefaults.ts, 147, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 147, 41)) +>T : Symbol(T, Decl(genericDefaults.ts, 147, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 147, 47)) +>U : Symbol(U, Decl(genericDefaults.ts, 147, 33)) +>T : Symbol(T, Decl(genericDefaults.ts, 147, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 147, 33)) + +// inference +f08(); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) + +f08(a); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f08(a, a); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f08(a, b); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, partially supplied +f08(); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f08(a); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f08(a, a); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +// no inference, fully supplied +f08(); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f08(a); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f08(a, b); +>f08 : Symbol(f08, Decl(genericDefaults.ts, 144, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// function with a type parameter with a constraint and a default that refers to an earlier type parameter +declare function f09(a?: T, b?: U): [T, U]; +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 163, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 163, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 163, 21)) +>T : Symbol(T, Decl(genericDefaults.ts, 163, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 163, 41)) +>T : Symbol(T, Decl(genericDefaults.ts, 163, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 163, 47)) +>U : Symbol(U, Decl(genericDefaults.ts, 163, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 163, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 163, 23)) + +// inference +f09(); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) + +f09(a); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f09(a, a); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f09(a, ab); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +// no inference, partially supplied +f09(); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f09(a); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f09(a, a); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f09(a, ab); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +// no inference, fully supplied +f09(); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>AB : Symbol(AB, Decl(genericDefaults.ts, 3, 26)) + +f09(a); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>AB : Symbol(AB, Decl(genericDefaults.ts, 3, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f09(a, ab); +>f09 : Symbol(f09, Decl(genericDefaults.ts, 160, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>AB : Symbol(AB, Decl(genericDefaults.ts, 3, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +// function with a type parameter with a constraint and a default that refers to an earlier type parameter with a constraint +declare function f10(a?: T, b?: U): [T, U]; +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>T : Symbol(T, Decl(genericDefaults.ts, 180, 21)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>U : Symbol(U, Decl(genericDefaults.ts, 180, 33)) +>T : Symbol(T, Decl(genericDefaults.ts, 180, 21)) +>T : Symbol(T, Decl(genericDefaults.ts, 180, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 180, 51)) +>T : Symbol(T, Decl(genericDefaults.ts, 180, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 180, 57)) +>U : Symbol(U, Decl(genericDefaults.ts, 180, 33)) +>T : Symbol(T, Decl(genericDefaults.ts, 180, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 180, 33)) + +// inference +f10(); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) + +f10(a); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f10(a, a); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f10(a, ab); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +// no inference, partially supplied +f10(); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f10(a); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f10(a, a); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f10(a, ab); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +// no inference, fully supplied +f10(); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f10(a); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f10(a, a); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f10(a, ab); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +f10(); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>AB : Symbol(AB, Decl(genericDefaults.ts, 3, 26)) + +f10(a); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>AB : Symbol(AB, Decl(genericDefaults.ts, 3, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f10(a, ab); +>f10 : Symbol(f10, Decl(genericDefaults.ts, 177, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>AB : Symbol(AB, Decl(genericDefaults.ts, 3, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +// function with a type parameter with a default that refers to an earier type parameter in a union +declare function f11(a?: T, b?: U): [T, U]; +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>T : Symbol(T, Decl(genericDefaults.ts, 201, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 201, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 201, 21)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 201, 35)) +>T : Symbol(T, Decl(genericDefaults.ts, 201, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 201, 41)) +>U : Symbol(U, Decl(genericDefaults.ts, 201, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 201, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 201, 23)) + +// inference +f11(); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) + +f11(a); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f11(a, a); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f11(a, b); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f11(a, c); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f11(); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f11(a); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f11(a, a); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f11(a, b); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, fully supplied +f11(); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f11(a); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f11(a, c); +>f11 : Symbol(f11, Decl(genericDefaults.ts, 198, 18)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// function with a type parameter with a default that refers to an earlier type parameter in an intersection +declare function f12(a?: T, b?: U): [T, U]; +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 219, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 219, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 219, 21)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 219, 35)) +>T : Symbol(T, Decl(genericDefaults.ts, 219, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 219, 41)) +>U : Symbol(U, Decl(genericDefaults.ts, 219, 23)) +>T : Symbol(T, Decl(genericDefaults.ts, 219, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 219, 23)) + +// inference +f12(); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) + +f12(a); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f12(a, a); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f12(a, b); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f12(a, c); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f12(); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f12(a); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f12(a, ab); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +// no inference, fully supplied +f12(); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f12(a); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f12(a, c); +>f12 : Symbol(f12, Decl(genericDefaults.ts, 216, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// function with a type parameter with a default that refers to a later type parameter with a default +declare function f13(a?: T, b?: U): [T, U]; +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 236, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 236, 27)) +>U : Symbol(U, Decl(genericDefaults.ts, 236, 27)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 236, 35)) +>T : Symbol(T, Decl(genericDefaults.ts, 236, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 236, 41)) +>U : Symbol(U, Decl(genericDefaults.ts, 236, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 236, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 236, 27)) + +// inference +f13(); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) + +f13(a); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f13(a, b); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f13(a, c); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f13(); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f13(a); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f13(a, b); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, fully supplied +f13(); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f13(a); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f13(a, c); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f13(a, c); +>f13 : Symbol(f13, Decl(genericDefaults.ts, 233, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default +declare function f14(a?: T, b?: U, c?: V): [T, U, V]; +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 253, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 253, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 253, 30)) +>V : Symbol(V, Decl(genericDefaults.ts, 253, 30)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 253, 38)) +>T : Symbol(T, Decl(genericDefaults.ts, 253, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 253, 44)) +>U : Symbol(U, Decl(genericDefaults.ts, 253, 23)) +>c : Symbol(c, Decl(genericDefaults.ts, 253, 51)) +>V : Symbol(V, Decl(genericDefaults.ts, 253, 30)) +>T : Symbol(T, Decl(genericDefaults.ts, 253, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 253, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 253, 30)) + +// inference +f14(); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) + +f14(a); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f14(a, b); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f14(a, b, c); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f14(a, b, d); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>d : Symbol(d, Decl(genericDefaults.ts, 10, 13)) + +// no inference, partially supplied +f14(); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f14(a); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f14(a, b); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f14(a, b, c); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f14(); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f14(a); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f14(a, b); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f14(a, b, c); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference fully supplied +f14(); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) + +f14(a); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f14(a, b); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f14(a, b, d); +>f14 : Symbol(f14, Decl(genericDefaults.ts, 250, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>d : Symbol(d, Decl(genericDefaults.ts, 10, 13)) + +// function with two type parameters with defaults that mutually refer to each other +declare function f15(a?: T, b?: U): [T, U]; +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>T : Symbol(T, Decl(genericDefaults.ts, 276, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 276, 27)) +>U : Symbol(U, Decl(genericDefaults.ts, 276, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 276, 21)) +>a : Symbol(a, Decl(genericDefaults.ts, 276, 35)) +>T : Symbol(T, Decl(genericDefaults.ts, 276, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 276, 41)) +>U : Symbol(U, Decl(genericDefaults.ts, 276, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 276, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 276, 27)) + +// inference +f15(); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) + +f15(a); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f15(a, b); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, partially supplied +f15(); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f15(a); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f15(a, a); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +// no inference, fully supplied +f15(); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f15(a); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f15(a, b); +>f15 : Symbol(f15, Decl(genericDefaults.ts, 273, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// function with a type parameter without a default and two type parameters with defaults that mutually refer to each other +declare function f16(a?: T, b?: U, c?: V): [T, U, V]; +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 291, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 291, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 291, 30)) +>V : Symbol(V, Decl(genericDefaults.ts, 291, 30)) +>U : Symbol(U, Decl(genericDefaults.ts, 291, 23)) +>a : Symbol(a, Decl(genericDefaults.ts, 291, 38)) +>T : Symbol(T, Decl(genericDefaults.ts, 291, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 291, 44)) +>U : Symbol(U, Decl(genericDefaults.ts, 291, 23)) +>c : Symbol(c, Decl(genericDefaults.ts, 291, 51)) +>V : Symbol(V, Decl(genericDefaults.ts, 291, 30)) +>T : Symbol(T, Decl(genericDefaults.ts, 291, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 291, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 291, 30)) + +// no inference +f16(); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) + +f16(a); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f16(a, b); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f16(a, b, b); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, partially supplied +f16(); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f16(a); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f16(a, b); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f16(a, b, b); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f16(); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f16(a); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f16(a, b); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f16(a, b, b); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, fully supplied +f16(); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) + +f16(a); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f16(a, b); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f16(a, b, d); +>f16 : Symbol(f16, Decl(genericDefaults.ts, 288, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>d : Symbol(d, Decl(genericDefaults.ts, 10, 13)) + +// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union +declare function f17(a?: T, b?: U): [T, U]; +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>T : Symbol(T, Decl(genericDefaults.ts, 313, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 313, 27)) +>U : Symbol(U, Decl(genericDefaults.ts, 313, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 313, 21)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 313, 39)) +>T : Symbol(T, Decl(genericDefaults.ts, 313, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 313, 45)) +>U : Symbol(U, Decl(genericDefaults.ts, 313, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 313, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 313, 27)) + +// inference +f17(); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) + +f17(a); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f17(a, a); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f17(a, b); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f17(a, c); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f17(); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f17(a); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f17(a, a); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f17(a, b); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +// no inference, fully supplied +f17(); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f17(a); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f17(a, c); +>f17 : Symbol(f17, Decl(genericDefaults.ts, 310, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union +declare function f18(a?: T, b?: U, c?: V): [T, U, V]; +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 331, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 331, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 331, 30)) +>V : Symbol(V, Decl(genericDefaults.ts, 331, 30)) +>U : Symbol(U, Decl(genericDefaults.ts, 331, 23)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 331, 42)) +>T : Symbol(T, Decl(genericDefaults.ts, 331, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 331, 48)) +>U : Symbol(U, Decl(genericDefaults.ts, 331, 23)) +>c : Symbol(c, Decl(genericDefaults.ts, 331, 55)) +>V : Symbol(V, Decl(genericDefaults.ts, 331, 30)) +>T : Symbol(T, Decl(genericDefaults.ts, 331, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 331, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 331, 30)) + +// inference +f18(); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) + +f18(a); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f18(a, b); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f18(a, b, b); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f18(a, b, c); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f18(); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f18(a); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f18(a, b); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f18(a, b, b); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f18(a, b, c); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +f18(); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f18(a); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f18(a, b); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f18(a, b, b); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f18(a, b, c); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, fully supplied +f18(); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) + +f18(a); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f18(a, b); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f18(a, b, d); +>f18 : Symbol(f18, Decl(genericDefaults.ts, 328, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>d : Symbol(d, Decl(genericDefaults.ts, 10, 13)) + +// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection +declare function f19(a?: T, b?: U): [T, U]; +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>T : Symbol(T, Decl(genericDefaults.ts, 356, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 356, 27)) +>U : Symbol(U, Decl(genericDefaults.ts, 356, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 356, 21)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 356, 39)) +>T : Symbol(T, Decl(genericDefaults.ts, 356, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 356, 45)) +>U : Symbol(U, Decl(genericDefaults.ts, 356, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 356, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 356, 27)) + +// inference +f19(); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) + +f19(a); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f19(a, a); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f19(a, b); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f19(a, ab); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +f19(a, c); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f19(); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f19(a); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f19(a, ab); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>ab : Symbol(ab, Decl(genericDefaults.ts, 11, 13)) + +// no inference, fully supplied +f19(); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) + +f19(a); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f19(a, c); +>f19 : Symbol(f19, Decl(genericDefaults.ts, 353, 22)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection +declare function f20(a?: T, b?: U, c?: V): [T, U, V]; +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 374, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 374, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 374, 30)) +>V : Symbol(V, Decl(genericDefaults.ts, 374, 30)) +>U : Symbol(U, Decl(genericDefaults.ts, 374, 23)) +>C : Symbol(C, Decl(genericDefaults.ts, 1, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 374, 42)) +>T : Symbol(T, Decl(genericDefaults.ts, 374, 21)) +>b : Symbol(b, Decl(genericDefaults.ts, 374, 48)) +>U : Symbol(U, Decl(genericDefaults.ts, 374, 23)) +>c : Symbol(c, Decl(genericDefaults.ts, 374, 55)) +>V : Symbol(V, Decl(genericDefaults.ts, 374, 30)) +>T : Symbol(T, Decl(genericDefaults.ts, 374, 21)) +>U : Symbol(U, Decl(genericDefaults.ts, 374, 23)) +>V : Symbol(V, Decl(genericDefaults.ts, 374, 30)) + +// inference +f20(); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) + +f20(a); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f20(a, b); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f20(a, b, c); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>c : Symbol(c, Decl(genericDefaults.ts, 9, 13)) + +// no inference, partially supplied +f20(); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +f20(a); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f20(a, b); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f20(a, b, bc); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>bc : Symbol(bc, Decl(genericDefaults.ts, 12, 13)) + +f20(); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) + +f20(a); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f20(a, b); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f20(a, b, bc); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>bc : Symbol(bc, Decl(genericDefaults.ts, 12, 13)) + +// no inference, fully supplied +f20(); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) + +f20(a); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) + +f20(a, b); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) + +f20(a, b, d); +>f20 : Symbol(f20, Decl(genericDefaults.ts, 371, 16)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>D : Symbol(D, Decl(genericDefaults.ts, 2, 26)) +>a : Symbol(a, Decl(genericDefaults.ts, 7, 13)) +>b : Symbol(b, Decl(genericDefaults.ts, 8, 13)) +>d : Symbol(d, Decl(genericDefaults.ts, 10, 13)) + +interface i00 { a: T; } +>i00 : Symbol(i00, Decl(genericDefaults.ts, 393, 22)) +>T : Symbol(T, Decl(genericDefaults.ts, 395, 14)) +>a : Symbol(i00.a, Decl(genericDefaults.ts, 395, 27)) +>T : Symbol(T, Decl(genericDefaults.ts, 395, 14)) + +const i00c00 = (x).a; +>i00c00 : Symbol(i00c00, Decl(genericDefaults.ts, 396, 5)) +>(x).a : Symbol(i00.a, Decl(genericDefaults.ts, 395, 27)) +>i00 : Symbol(i00, Decl(genericDefaults.ts, 393, 22)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i00.a, Decl(genericDefaults.ts, 395, 27)) + +const i00c01 = (>x).a; +>i00c01 : Symbol(i00c01, Decl(genericDefaults.ts, 397, 5)) +>(>x).a : Symbol(i00.a, Decl(genericDefaults.ts, 395, 27)) +>i00 : Symbol(i00, Decl(genericDefaults.ts, 393, 22)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i00.a, Decl(genericDefaults.ts, 395, 27)) + +interface i01 { a: [T, U]; } +>i01 : Symbol(i01, Decl(genericDefaults.ts, 397, 34)) +>T : Symbol(T, Decl(genericDefaults.ts, 399, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 399, 16)) +>T : Symbol(T, Decl(genericDefaults.ts, 399, 14)) +>a : Symbol(i01.a, Decl(genericDefaults.ts, 399, 25)) +>T : Symbol(T, Decl(genericDefaults.ts, 399, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 399, 16)) + +const i01c00 = (>x).a; +>i01c00 : Symbol(i01c00, Decl(genericDefaults.ts, 400, 5)) +>(>x).a : Symbol(i01.a, Decl(genericDefaults.ts, 399, 25)) +>i01 : Symbol(i01, Decl(genericDefaults.ts, 397, 34)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i01.a, Decl(genericDefaults.ts, 399, 25)) + +const i01c01 = (>x).a; +>i01c01 : Symbol(i01c01, Decl(genericDefaults.ts, 401, 5)) +>(>x).a : Symbol(i01.a, Decl(genericDefaults.ts, 399, 25)) +>i01 : Symbol(i01, Decl(genericDefaults.ts, 397, 34)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i01.a, Decl(genericDefaults.ts, 399, 25)) + +interface i02 { a: [T, U]; } +>i02 : Symbol(i02, Decl(genericDefaults.ts, 401, 42)) +>T : Symbol(T, Decl(genericDefaults.ts, 403, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 403, 31)) +>T : Symbol(T, Decl(genericDefaults.ts, 403, 14)) +>a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) +>T : Symbol(T, Decl(genericDefaults.ts, 403, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 403, 31)) + +const i02c00 = (>x).a; +>i02c00 : Symbol(i02c00, Decl(genericDefaults.ts, 404, 5)) +>(>x).a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) +>i02 : Symbol(i02, Decl(genericDefaults.ts, 401, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) + +const i02c01 = (>x).a; +>i02c01 : Symbol(i02c01, Decl(genericDefaults.ts, 405, 5)) +>(>x).a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) +>i02 : Symbol(i02, Decl(genericDefaults.ts, 401, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) + +const i02c02 = (>x).a; +>i02c02 : Symbol(i02c02, Decl(genericDefaults.ts, 406, 5)) +>(>x).a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) +>i02 : Symbol(i02, Decl(genericDefaults.ts, 401, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) + +const i02c03 = (>x).a; +>i02c03 : Symbol(i02c03, Decl(genericDefaults.ts, 407, 5)) +>(>x).a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) +>i02 : Symbol(i02, Decl(genericDefaults.ts, 401, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) + +const i02c04 = (>x).a; +>i02c04 : Symbol(i02c04, Decl(genericDefaults.ts, 408, 5)) +>(>x).a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) +>i02 : Symbol(i02, Decl(genericDefaults.ts, 401, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i02.a, Decl(genericDefaults.ts, 403, 40)) + +interface i03 { a: [T, U]; } +>i03 : Symbol(i03, Decl(genericDefaults.ts, 408, 37)) +>T : Symbol(T, Decl(genericDefaults.ts, 410, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 410, 31)) +>T : Symbol(T, Decl(genericDefaults.ts, 410, 14)) +>T : Symbol(T, Decl(genericDefaults.ts, 410, 14)) +>a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) +>T : Symbol(T, Decl(genericDefaults.ts, 410, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 410, 31)) + +const i03c00 = (>x).a; +>i03c00 : Symbol(i03c00, Decl(genericDefaults.ts, 411, 5)) +>(>x).a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) +>i03 : Symbol(i03, Decl(genericDefaults.ts, 408, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) + +const i03c01 = (>x).a; +>i03c01 : Symbol(i03c01, Decl(genericDefaults.ts, 412, 5)) +>(>x).a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) +>i03 : Symbol(i03, Decl(genericDefaults.ts, 408, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) + +const i03c02 = (>x).a; +>i03c02 : Symbol(i03c02, Decl(genericDefaults.ts, 413, 5)) +>(>x).a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) +>i03 : Symbol(i03, Decl(genericDefaults.ts, 408, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) + +const i03c03 = (>x).a; +>i03c03 : Symbol(i03c03, Decl(genericDefaults.ts, 414, 5)) +>(>x).a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) +>i03 : Symbol(i03, Decl(genericDefaults.ts, 408, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) + +const i03c04 = (>x).a; +>i03c04 : Symbol(i03c04, Decl(genericDefaults.ts, 415, 5)) +>(>x).a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) +>i03 : Symbol(i03, Decl(genericDefaults.ts, 408, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i03.a, Decl(genericDefaults.ts, 410, 50)) + +interface i04 {} +>i04 : Symbol(i04, Decl(genericDefaults.ts, 415, 37), Decl(genericDefaults.ts, 417, 16), Decl(genericDefaults.ts, 418, 19), Decl(genericDefaults.ts, 419, 28)) + +interface i04 {} +>i04 : Symbol(i04, Decl(genericDefaults.ts, 415, 37), Decl(genericDefaults.ts, 417, 16), Decl(genericDefaults.ts, 418, 19), Decl(genericDefaults.ts, 419, 28)) +>T : Symbol(T, Decl(genericDefaults.ts, 418, 14), Decl(genericDefaults.ts, 419, 14), Decl(genericDefaults.ts, 420, 14)) + +interface i04 {} +>i04 : Symbol(i04, Decl(genericDefaults.ts, 415, 37), Decl(genericDefaults.ts, 417, 16), Decl(genericDefaults.ts, 418, 19), Decl(genericDefaults.ts, 419, 28)) +>T : Symbol(T, Decl(genericDefaults.ts, 418, 14), Decl(genericDefaults.ts, 419, 14), Decl(genericDefaults.ts, 420, 14)) + +interface i04 {} +>i04 : Symbol(i04, Decl(genericDefaults.ts, 415, 37), Decl(genericDefaults.ts, 417, 16), Decl(genericDefaults.ts, 418, 19), Decl(genericDefaults.ts, 419, 28)) +>T : Symbol(T, Decl(genericDefaults.ts, 418, 14), Decl(genericDefaults.ts, 419, 14), Decl(genericDefaults.ts, 420, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 420, 25)) + +interface i05 { a: T; } +>i05 : Symbol(i05, Decl(genericDefaults.ts, 420, 40)) +>T : Symbol(T, Decl(genericDefaults.ts, 422, 14)) +>T : Symbol(T, Decl(genericDefaults.ts, 422, 14)) +>a : Symbol(i05.a, Decl(genericDefaults.ts, 422, 22)) +>T : Symbol(T, Decl(genericDefaults.ts, 422, 14)) + +const i05c00 = (x).a; +>i05c00 : Symbol(i05c00, Decl(genericDefaults.ts, 423, 5)) +>(x).a : Symbol(i05.a, Decl(genericDefaults.ts, 422, 22)) +>i05 : Symbol(i05, Decl(genericDefaults.ts, 420, 40)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i05.a, Decl(genericDefaults.ts, 422, 22)) + +const i05c01 = (>x).a; +>i05c01 : Symbol(i05c01, Decl(genericDefaults.ts, 424, 5)) +>(>x).a : Symbol(i05.a, Decl(genericDefaults.ts, 422, 22)) +>i05 : Symbol(i05, Decl(genericDefaults.ts, 420, 40)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i05.a, Decl(genericDefaults.ts, 422, 22)) + +interface i06 { a: [T, U]; } +>i06 : Symbol(i06, Decl(genericDefaults.ts, 424, 34)) +>T : Symbol(T, Decl(genericDefaults.ts, 426, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 426, 20)) +>U : Symbol(U, Decl(genericDefaults.ts, 426, 20)) +>T : Symbol(T, Decl(genericDefaults.ts, 426, 14)) +>a : Symbol(i06.a, Decl(genericDefaults.ts, 426, 29)) +>T : Symbol(T, Decl(genericDefaults.ts, 426, 14)) +>U : Symbol(U, Decl(genericDefaults.ts, 426, 20)) + +const i06c00 = (x).a; +>i06c00 : Symbol(i06c00, Decl(genericDefaults.ts, 427, 5)) +>(x).a : Symbol(i06.a, Decl(genericDefaults.ts, 426, 29)) +>i06 : Symbol(i06, Decl(genericDefaults.ts, 424, 34)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i06.a, Decl(genericDefaults.ts, 426, 29)) + +const i06c01 = (>x).a; +>i06c01 : Symbol(i06c01, Decl(genericDefaults.ts, 428, 5)) +>(>x).a : Symbol(i06.a, Decl(genericDefaults.ts, 426, 29)) +>i06 : Symbol(i06, Decl(genericDefaults.ts, 424, 34)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i06.a, Decl(genericDefaults.ts, 426, 29)) + +const i06c02 = (>x).a; +>i06c02 : Symbol(i06c02, Decl(genericDefaults.ts, 429, 5)) +>(>x).a : Symbol(i06.a, Decl(genericDefaults.ts, 426, 29)) +>i06 : Symbol(i06, Decl(genericDefaults.ts, 424, 34)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i06.a, Decl(genericDefaults.ts, 426, 29)) + +interface i07 { a: A; } +>i07 : Symbol(i07, Decl(genericDefaults.ts, 429, 42), Decl(genericDefaults.ts, 431, 23)) +>a : Symbol(i07.a, Decl(genericDefaults.ts, 431, 15)) +>A : Symbol(A, Decl(genericDefaults.ts, 0, 0)) + +interface i07 { b: A; } +>i07 : Symbol(i07, Decl(genericDefaults.ts, 429, 42), Decl(genericDefaults.ts, 431, 23)) +>A : Symbol(A, Decl(genericDefaults.ts, 432, 14)) +>b : Symbol(i07.b, Decl(genericDefaults.ts, 432, 27)) +>A : Symbol(A, Decl(genericDefaults.ts, 432, 14)) + +const i07c00 = (x).a; +>i07c00 : Symbol(i07c00, Decl(genericDefaults.ts, 433, 5)) +>(x).a : Symbol(i07.a, Decl(genericDefaults.ts, 431, 15)) +>i07 : Symbol(i07, Decl(genericDefaults.ts, 429, 42), Decl(genericDefaults.ts, 431, 23)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i07.a, Decl(genericDefaults.ts, 431, 15)) + +const i07c01 = (x).b; +>i07c01 : Symbol(i07c01, Decl(genericDefaults.ts, 434, 5)) +>(x).b : Symbol(i07.b, Decl(genericDefaults.ts, 432, 27)) +>i07 : Symbol(i07, Decl(genericDefaults.ts, 429, 42), Decl(genericDefaults.ts, 431, 23)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>b : Symbol(i07.b, Decl(genericDefaults.ts, 432, 27)) + +const i07c02 = (>x).a; +>i07c02 : Symbol(i07c02, Decl(genericDefaults.ts, 435, 5)) +>(>x).a : Symbol(i07.a, Decl(genericDefaults.ts, 431, 15)) +>i07 : Symbol(i07, Decl(genericDefaults.ts, 429, 42), Decl(genericDefaults.ts, 431, 23)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(i07.a, Decl(genericDefaults.ts, 431, 15)) + +const i07c03 = (>x).b; +>i07c03 : Symbol(i07c03, Decl(genericDefaults.ts, 436, 5)) +>(>x).b : Symbol(i07.b, Decl(genericDefaults.ts, 432, 27)) +>i07 : Symbol(i07, Decl(genericDefaults.ts, 429, 42), Decl(genericDefaults.ts, 431, 23)) +>B : Symbol(B, Decl(genericDefaults.ts, 0, 26)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>b : Symbol(i07.b, Decl(genericDefaults.ts, 432, 27)) + +interface Base01 { a: T; } +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) +>T : Symbol(T, Decl(genericDefaults.ts, 438, 17)) +>a : Symbol(Base01.a, Decl(genericDefaults.ts, 438, 21)) +>T : Symbol(T, Decl(genericDefaults.ts, 438, 17)) + +interface Base01Constructor { new (a?: T): Base01; } +>Base01Constructor : Symbol(Base01Constructor, Decl(genericDefaults.ts, 438, 29)) +>T : Symbol(T, Decl(genericDefaults.ts, 439, 35)) +>a : Symbol(a, Decl(genericDefaults.ts, 439, 47)) +>T : Symbol(T, Decl(genericDefaults.ts, 439, 35)) +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) +>T : Symbol(T, Decl(genericDefaults.ts, 439, 35)) + +declare const Base01: Base01Constructor; +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) +>Base01Constructor : Symbol(Base01Constructor, Decl(genericDefaults.ts, 438, 29)) + +const Base01c00 = new Base01(); +>Base01c00 : Symbol(Base01c00, Decl(genericDefaults.ts, 442, 5)) +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) + +const Base01c01 = new Base01(1); +>Base01c01 : Symbol(Base01c01, Decl(genericDefaults.ts, 443, 5)) +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) + +const Base01c02 = new Base01(); +>Base01c02 : Symbol(Base01c02, Decl(genericDefaults.ts, 444, 5)) +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) + +const Base01c03 = new Base01(1); +>Base01c03 : Symbol(Base01c03, Decl(genericDefaults.ts, 445, 5)) +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) + +declare class Derived01 extends Base01 { } +>Derived01 : Symbol(Derived01, Decl(genericDefaults.ts, 445, 40)) +>T : Symbol(T, Decl(genericDefaults.ts, 447, 24)) +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) +>T : Symbol(T, Decl(genericDefaults.ts, 447, 24)) + +const Derived01c00 = new Derived01(); +>Derived01c00 : Symbol(Derived01c00, Decl(genericDefaults.ts, 448, 5)) +>Derived01 : Symbol(Derived01, Decl(genericDefaults.ts, 445, 40)) + +const Derived01c01 = new Derived01(1); +>Derived01c01 : Symbol(Derived01c01, Decl(genericDefaults.ts, 449, 5)) +>Derived01 : Symbol(Derived01, Decl(genericDefaults.ts, 445, 40)) + +const Derived01c02 = new Derived01(); +>Derived01c02 : Symbol(Derived01c02, Decl(genericDefaults.ts, 450, 5)) +>Derived01 : Symbol(Derived01, Decl(genericDefaults.ts, 445, 40)) + +const Derived01c03 = new Derived01(1); +>Derived01c03 : Symbol(Derived01c03, Decl(genericDefaults.ts, 451, 5)) +>Derived01 : Symbol(Derived01, Decl(genericDefaults.ts, 445, 40)) + +declare class Derived02 extends Base01 { } +>Derived02 : Symbol(Derived02, Decl(genericDefaults.ts, 451, 46)) +>T : Symbol(T, Decl(genericDefaults.ts, 453, 24)) +>Base01 : Symbol(Base01, Decl(genericDefaults.ts, 436, 29), Decl(genericDefaults.ts, 441, 13)) +>T : Symbol(T, Decl(genericDefaults.ts, 453, 24)) + +const Derived02c00 = new Derived02(); +>Derived02c00 : Symbol(Derived02c00, Decl(genericDefaults.ts, 454, 5)) +>Derived02 : Symbol(Derived02, Decl(genericDefaults.ts, 451, 46)) + +const Derived02c01 = new Derived02(1); +>Derived02c01 : Symbol(Derived02c01, Decl(genericDefaults.ts, 455, 5)) +>Derived02 : Symbol(Derived02, Decl(genericDefaults.ts, 451, 46)) + +const Derived02c02 = new Derived02(); +>Derived02c02 : Symbol(Derived02c02, Decl(genericDefaults.ts, 456, 5)) +>Derived02 : Symbol(Derived02, Decl(genericDefaults.ts, 451, 46)) + +const Derived02c03 = new Derived02(1); +>Derived02c03 : Symbol(Derived02c03, Decl(genericDefaults.ts, 457, 5)) +>Derived02 : Symbol(Derived02, Decl(genericDefaults.ts, 451, 46)) + +type t00 = { a: T; } +>t00 : Symbol(t00, Decl(genericDefaults.ts, 457, 46)) +>T : Symbol(T, Decl(genericDefaults.ts, 459, 9)) +>a : Symbol(a, Decl(genericDefaults.ts, 459, 24)) +>T : Symbol(T, Decl(genericDefaults.ts, 459, 9)) + +const t00c00 = (x).a; +>t00c00 : Symbol(t00c00, Decl(genericDefaults.ts, 460, 5)) +>(x).a : Symbol(a, Decl(genericDefaults.ts, 459, 24)) +>t00 : Symbol(t00, Decl(genericDefaults.ts, 457, 46)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 459, 24)) + +const t00c01 = (>x).a; +>t00c01 : Symbol(t00c01, Decl(genericDefaults.ts, 461, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 459, 24)) +>t00 : Symbol(t00, Decl(genericDefaults.ts, 457, 46)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 459, 24)) + +type t01 = { a: [T, U]; } +>t01 : Symbol(t01, Decl(genericDefaults.ts, 461, 34)) +>T : Symbol(T, Decl(genericDefaults.ts, 463, 9)) +>U : Symbol(U, Decl(genericDefaults.ts, 463, 11)) +>T : Symbol(T, Decl(genericDefaults.ts, 463, 9)) +>a : Symbol(a, Decl(genericDefaults.ts, 463, 22)) +>T : Symbol(T, Decl(genericDefaults.ts, 463, 9)) +>U : Symbol(U, Decl(genericDefaults.ts, 463, 11)) + +const t01c00 = (>x).a; +>t01c00 : Symbol(t01c00, Decl(genericDefaults.ts, 464, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 463, 22)) +>t01 : Symbol(t01, Decl(genericDefaults.ts, 461, 34)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 463, 22)) + +const t01c01 = (>x).a; +>t01c01 : Symbol(t01c01, Decl(genericDefaults.ts, 465, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 463, 22)) +>t01 : Symbol(t01, Decl(genericDefaults.ts, 461, 34)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 463, 22)) + +type t02 = { a: [T, U]; } +>t02 : Symbol(t02, Decl(genericDefaults.ts, 465, 42)) +>T : Symbol(T, Decl(genericDefaults.ts, 467, 9)) +>U : Symbol(U, Decl(genericDefaults.ts, 467, 26)) +>T : Symbol(T, Decl(genericDefaults.ts, 467, 9)) +>a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) +>T : Symbol(T, Decl(genericDefaults.ts, 467, 9)) +>U : Symbol(U, Decl(genericDefaults.ts, 467, 26)) + +const t02c00 = (>x).a; +>t02c00 : Symbol(t02c00, Decl(genericDefaults.ts, 468, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) +>t02 : Symbol(t02, Decl(genericDefaults.ts, 465, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) + +const t02c01 = (>x).a; +>t02c01 : Symbol(t02c01, Decl(genericDefaults.ts, 469, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) +>t02 : Symbol(t02, Decl(genericDefaults.ts, 465, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) + +const t02c02 = (>x).a; +>t02c02 : Symbol(t02c02, Decl(genericDefaults.ts, 470, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) +>t02 : Symbol(t02, Decl(genericDefaults.ts, 465, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) + +const t02c03 = (>x).a; +>t02c03 : Symbol(t02c03, Decl(genericDefaults.ts, 471, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) +>t02 : Symbol(t02, Decl(genericDefaults.ts, 465, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) + +const t02c04 = (>x).a; +>t02c04 : Symbol(t02c04, Decl(genericDefaults.ts, 472, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) +>t02 : Symbol(t02, Decl(genericDefaults.ts, 465, 42)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 467, 37)) + +type t03 = { a: [T, U]; } +>t03 : Symbol(t03, Decl(genericDefaults.ts, 472, 37)) +>T : Symbol(T, Decl(genericDefaults.ts, 474, 9)) +>U : Symbol(U, Decl(genericDefaults.ts, 474, 26)) +>T : Symbol(T, Decl(genericDefaults.ts, 474, 9)) +>T : Symbol(T, Decl(genericDefaults.ts, 474, 9)) +>a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) +>T : Symbol(T, Decl(genericDefaults.ts, 474, 9)) +>U : Symbol(U, Decl(genericDefaults.ts, 474, 26)) + +const t03c00 = (>x).a; +>t03c00 : Symbol(t03c00, Decl(genericDefaults.ts, 475, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) +>t03 : Symbol(t03, Decl(genericDefaults.ts, 472, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) + +const t03c01 = (>x).a; +>t03c01 : Symbol(t03c01, Decl(genericDefaults.ts, 476, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) +>t03 : Symbol(t03, Decl(genericDefaults.ts, 472, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) + +const t03c02 = (>x).a; +>t03c02 : Symbol(t03c02, Decl(genericDefaults.ts, 477, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) +>t03 : Symbol(t03, Decl(genericDefaults.ts, 472, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) + +const t03c03 = (>x).a; +>t03c03 : Symbol(t03c03, Decl(genericDefaults.ts, 478, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) +>t03 : Symbol(t03, Decl(genericDefaults.ts, 472, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) + +const t03c04 = (>x).a; +>t03c04 : Symbol(t03c04, Decl(genericDefaults.ts, 479, 5)) +>(>x).a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) +>t03 : Symbol(t03, Decl(genericDefaults.ts, 472, 37)) +>x : Symbol(x, Decl(genericDefaults.ts, 13, 13)) +>a : Symbol(a, Decl(genericDefaults.ts, 474, 47)) + diff --git a/tests/baselines/reference/genericDefaults.types b/tests/baselines/reference/genericDefaults.types new file mode 100644 index 0000000000000..cd6c2d58e4acf --- /dev/null +++ b/tests/baselines/reference/genericDefaults.types @@ -0,0 +1,2608 @@ +=== tests/cases/compiler/genericDefaults.ts === +interface A { a: number; } +>A : A +>a : number + +interface B { b: number; } +>B : B +>b : number + +interface C { c: number; } +>C : C +>c : number + +interface D { d: number; } +>D : D +>d : number + +interface AB { a: number; b: number; } +>AB : AB +>a : number +>b : number + +interface BC { b: number; c: number; } +>BC : BC +>b : number +>c : number + +declare const a: A; +>a : A +>A : A + +declare const b: B; +>b : B +>B : B + +declare const c: C; +>c : C +>C : C + +declare const d: D; +>d : D +>D : D + +declare const ab: AB; +>ab : AB +>AB : AB + +declare const bc: BC; +>bc : BC +>BC : BC + +declare const x: any; +>x : any + +// function without type parameters +declare function f00(a?: A): A; +>f00 : (a?: A) => A +>a : A +>A : A +>A : A + +// no inference +f00(); +>f00() : A +>f00 : (a?: A) => A + +f00(a); +>f00(a) : A +>f00 : (a?: A) => A +>a : A + +// function with a type parameter without a default +declare function f01(a?: T): T; +>f01 : (a?: T) => T +>T : T +>a : T +>T : T +>T : T + +// inference +f01(); +>f01() : {} +>f01 : (a?: T) => T + +f01(a); +>f01(a) : A +>f01 : (a?: T) => T +>a : A + +// no inference, fully supplied +f01(); +>f01() : A +>f01 : (a?: T) => T +>A : A + +f01(a); +>f01(a) : A +>f01 : (a?: T) => T +>A : A +>a : A + +// function with a type paramter with a default +declare function f02(a?: T): T; +>f02 : (a?: T) => T +>T : T +>A : A +>a : T +>T : T +>T : T + +// inference +f02(); +>f02() : A +>f02 : (a?: T) => T + +f02(a); +>f02(a) : A +>f02 : (a?: T) => T +>a : A + +f02(b); +>f02(b) : B +>f02 : (a?: T) => T +>b : B + +// no inference, fully supplied +f02(); +>f02() : A +>f02 : (a?: T) => T +>A : A + +f02(a); +>f02(a) : A +>f02 : (a?: T) => T +>A : A +>a : A + +f02(); +>f02() : B +>f02 : (a?: T) => T +>B : B + +f02(b); +>f02(b) : B +>f02 : (a?: T) => T +>B : B +>b : B + +// function with a type parameter with a default that refers to itself +declare function f03(a?: T): T; +>f03 : (a?: T) => T +>T : T +>T : T +>a : T +>T : T +>T : T + +// inference +f03(); +>f03() : {} +>f03 : (a?: T) => T + +f03(a); +>f03(a) : A +>f03 : (a?: T) => T +>a : A + +f03(b); +>f03(b) : B +>f03 : (a?: T) => T +>b : B + +// no inference, fully supplied +f03(); +>f03() : A +>f03 : (a?: T) => T +>A : A + +f03(a); +>f03(a) : A +>f03 : (a?: T) => T +>A : A +>a : A + +f03(); +>f03() : B +>f03 : (a?: T) => T +>B : B + +f03(b); +>f03(b) : B +>f03 : (a?: T) => T +>B : B +>b : B + +// function with a type paramter without a default and a type parameter with a default +declare function f04(a?: T, b?: U): [T, U]; +>f04 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>B : B +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f04(); +>f04() : [{}, B] +>f04 : (a?: T, b?: U) => [T, U] + +f04(a); +>f04(a) : [A, B] +>f04 : (a?: T, b?: U) => [T, U] +>a : A + +f04(a, b); +>f04(a, b) : [A, B] +>f04 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +f04(a, c); +>f04(a, c) : [A, C] +>f04 : (a?: T, b?: U) => [T, U] +>a : A +>c : C + +// no inference, partially supplied +f04(); +>f04() : [A, B] +>f04 : (a?: T, b?: U) => [T, U] +>A : A + +f04(a); +>f04(a) : [A, B] +>f04 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f04(a, b); +>f04(a, b) : [A, B] +>f04 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>b : B + +// no inference, fully supplied +f04(); +>f04() : [A, B] +>f04 : (a?: T, b?: U) => [T, U] +>A : A +>B : B + +f04(a); +>f04(a) : [A, B] +>f04 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A + +f04(a, b); +>f04(a, b) : [A, B] +>f04 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A +>b : B + +f04(); +>f04() : [A, C] +>f04 : (a?: T, b?: U) => [T, U] +>A : A +>C : C + +f04(a); +>f04(a) : [A, C] +>f04 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A + +f04(a, c); +>f04(a, c) : [A, C] +>f04 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A +>c : C + +// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter +declare function f05(a?: T, b?: U): [T, U]; +>f05 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>T : T +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f05(); +>f05() : [{}, {}] +>f05 : (a?: T, b?: U) => [T, U] + +f05(a); +>f05(a) : [A, A] +>f05 : (a?: T, b?: U) => [T, U] +>a : A + +f05(a, a); +>f05(a, a) : [A, A] +>f05 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f05(a, b); +>f05(a, b) : [A, B] +>f05 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +// no inference, partially supplied +f05(); +>f05() : [A, A] +>f05 : (a?: T, b?: U) => [T, U] +>A : A + +f05(a); +>f05(a) : [A, A] +>f05 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f05(a, a); +>f05(a, a) : [A, A] +>f05 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>a : A + +// no inference, fully supplied +f05(); +>f05() : [A, B] +>f05 : (a?: T, b?: U) => [T, U] +>A : A +>B : B + +f05(a); +>f05(a) : [A, B] +>f05 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A + +f05(a, b); +>f05(a, b) : [A, B] +>f05 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A +>b : B + +// function with a type parameter with a default that refers to an earlier type parameter with a default +declare function f06(a?: T, b?: U): [T, U]; +>f06 : (a?: T, b?: U) => [T, U] +>T : T +>A : A +>U : U +>T : T +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f06(); +>f06() : [A, A] +>f06 : (a?: T, b?: U) => [T, U] + +f06(a); +>f06(a) : [A, A] +>f06 : (a?: T, b?: U) => [T, U] +>a : A + +f06(a, a); +>f06(a, a) : [A, A] +>f06 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f06(a, b); +>f06(a, b) : [A, B] +>f06 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +f06(b, a); +>f06(b, a) : [B, A] +>f06 : (a?: T, b?: U) => [T, U] +>b : B +>a : A + +f06(b, b); +>f06(b, b) : [B, B] +>f06 : (a?: T, b?: U) => [T, U] +>b : B +>b : B + +// no inference, partially supplied +f06(); +>f06() : [A, A] +>f06 : (a?: T, b?: U) => [T, U] +>A : A + +f06(a); +>f06(a) : [A, A] +>f06 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f06(a, a); +>f06(a, a) : [A, A] +>f06 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>a : A + +f06(); +>f06() : [B, B] +>f06 : (a?: T, b?: U) => [T, U] +>B : B + +f06(b); +>f06(b) : [B, B] +>f06 : (a?: T, b?: U) => [T, U] +>B : B +>b : B + +f06(b, b); +>f06(b, b) : [B, B] +>f06 : (a?: T, b?: U) => [T, U] +>B : B +>b : B +>b : B + +// no inference, fully supplied +f06(); +>f06() : [A, B] +>f06 : (a?: T, b?: U) => [T, U] +>A : A +>B : B + +f06(a); +>f06(a) : [A, B] +>f06 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A + +f06(a, b); +>f06(a, b) : [A, B] +>f06 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A +>b : B + +f06(); +>f06() : [B, C] +>f06 : (a?: T, b?: U) => [T, U] +>B : B +>C : C + +f06(b); +>f06(b) : [B, C] +>f06 : (a?: T, b?: U) => [T, U] +>B : B +>C : C +>b : B + +f06(b, c); +>f06(b, c) : [B, C] +>f06 : (a?: T, b?: U) => [T, U] +>B : B +>C : C +>b : B +>c : C + +// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter with a default +declare function f07(a?: T, b?: U, c?: V): [T, U, V]; +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>T : T +>U : U +>B : B +>V : V +>U : U +>a : T +>T : T +>b : U +>U : U +>c : V +>V : V +>T : T +>U : U +>V : V + +// inference +f07(); +>f07() : [{}, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] + +f07(a, b); +>f07(a, b) : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B + +f07(a, c); +>f07(a, c) : [A, C, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>c : C + +f07(a, b, b); +>f07(a, b, b) : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B +>b : B + +f07(a, b, c); +>f07(a, b, c) : [A, B, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B +>c : C + +f07(a, c, b); +>f07(a, c, b) : [A, C, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>c : C +>b : B + +f07(a, c, c); +>f07(a, c, c) : [A, C, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>c : C +>c : C + +// no inference, partially supplied +f07(); +>f07() : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A + +f07(a); +>f07(a) : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A + +f07(a, b); +>f07(a, b) : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B + +f07(a, b, b); +>f07(a, b, b) : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B +>b : B + +f07(); +>f07() : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B + +f07(a); +>f07(a) : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A + +f07(a, b); +>f07(a, b) : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B + +f07(a, b, b); +>f07(a, b, b) : [A, B, B] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B +>b : B + +f07(); +>f07() : [A, C, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>C : C + +f07(a); +>f07(a) : [A, C, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>C : C +>a : A + +f07(a, c); +>f07(a, c) : [A, C, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>C : C +>a : A +>c : C + +f07(a, c, c); +>f07(a, c, c) : [A, C, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>C : C +>a : A +>c : C +>c : C + +// no inference, fully supplied +f07(); +>f07() : [A, B, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>C : C + +f07(a); +>f07(a) : [A, B, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>C : C +>a : A + +f07(a, b); +>f07(a, b) : [A, B, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>C : C +>a : A +>b : B + +f07(a, b, c); +>f07(a, b, c) : [A, B, C] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>C : C +>a : A +>b : B +>c : C + +f07(); +>f07() : [A, C, A] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>C : C +>A : A + +f07(a); +>f07(a) : [A, C, A] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>C : C +>A : A +>a : A + +f07(a, c); +>f07(a, c) : [A, C, D] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>C : C +>D : D +>a : A +>c : C + +f07(a, c, d); +>f07(a, c, d) : [A, C, D] +>f07 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>C : C +>D : D +>a : A +>c : C +>d : D + +// function with a type parameter with a default that refers to an earlier type parameter with a constraint +declare function f08(a?: T, b?: U): [T, U]; +>f08 : (a?: T, b?: U) => [T, U] +>T : T +>A : A +>U : U +>T : T +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f08(); +>f08() : [A, A] +>f08 : (a?: T, b?: U) => [T, U] + +f08(a); +>f08(a) : [A, A] +>f08 : (a?: T, b?: U) => [T, U] +>a : A + +f08(a, a); +>f08(a, a) : [A, A] +>f08 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f08(a, b); +>f08(a, b) : [A, B] +>f08 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +// no inference, partially supplied +f08(); +>f08() : [A, A] +>f08 : (a?: T, b?: U) => [T, U] +>A : A + +f08(a); +>f08(a) : [A, A] +>f08 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f08(a, a); +>f08(a, a) : [A, A] +>f08 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>a : A + +// no inference, fully supplied +f08(); +>f08() : [A, B] +>f08 : (a?: T, b?: U) => [T, U] +>A : A +>B : B + +f08(a); +>f08(a) : [A, B] +>f08 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A + +f08(a, b); +>f08(a, b) : [A, B] +>f08 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A +>b : B + +// function with a type parameter with a constraint and a default that refers to an earlier type parameter +declare function f09(a?: T, b?: U): [T, U]; +>f09 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>T : T +>T : T +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f09(); +>f09() : [{}, {}] +>f09 : (a?: T, b?: U) => [T, U] + +f09(a); +>f09(a) : [A, A] +>f09 : (a?: T, b?: U) => [T, U] +>a : A + +f09(a, a); +>f09(a, a) : [A, A] +>f09 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f09(a, ab); +>f09(a, ab) : [A, AB] +>f09 : (a?: T, b?: U) => [T, U] +>a : A +>ab : AB + +// no inference, partially supplied +f09(); +>f09() : [A, A] +>f09 : (a?: T, b?: U) => [T, U] +>A : A + +f09(a); +>f09(a) : [A, A] +>f09 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f09(a, a); +>f09(a, a) : [A, A] +>f09 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>a : A + +f09(a, ab); +>f09(a, ab) : [A, A] +>f09 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>ab : AB + +// no inference, fully supplied +f09(); +>f09() : [A, AB] +>f09 : (a?: T, b?: U) => [T, U] +>A : A +>AB : AB + +f09(a); +>f09(a) : [A, AB] +>f09 : (a?: T, b?: U) => [T, U] +>A : A +>AB : AB +>a : A + +f09(a, ab); +>f09(a, ab) : [A, AB] +>f09 : (a?: T, b?: U) => [T, U] +>A : A +>AB : AB +>a : A +>ab : AB + +// function with a type parameter with a constraint and a default that refers to an earlier type parameter with a constraint +declare function f10(a?: T, b?: U): [T, U]; +>f10 : (a?: T, b?: U) => [T, U] +>T : T +>A : A +>U : U +>T : T +>T : T +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f10(); +>f10() : [A, A] +>f10 : (a?: T, b?: U) => [T, U] + +f10(a); +>f10(a) : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>a : A + +f10(a, a); +>f10(a, a) : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f10(a, ab); +>f10(a, ab) : [A, AB] +>f10 : (a?: T, b?: U) => [T, U] +>a : A +>ab : AB + +// no inference, partially supplied +f10(); +>f10() : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>A : A + +f10(a); +>f10(a) : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f10(a, a); +>f10(a, a) : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>a : A + +f10(a, ab); +>f10(a, ab) : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>ab : AB + +// no inference, fully supplied +f10(); +>f10() : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>A : A + +f10(a); +>f10(a) : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>A : A +>a : A + +f10(a, a); +>f10(a, a) : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>A : A +>a : A +>a : A + +f10(a, ab); +>f10(a, ab) : [A, A] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>A : A +>a : A +>ab : AB + +f10(); +>f10() : [A, AB] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>AB : AB + +f10(a); +>f10(a) : [A, AB] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>AB : AB +>a : A + +f10(a, ab); +>f10(a, ab) : [A, AB] +>f10 : (a?: T, b?: U) => [T, U] +>A : A +>AB : AB +>a : A +>ab : AB + +// function with a type parameter with a default that refers to an earier type parameter in a union +declare function f11(a?: T, b?: U): [T, U]; +>f11 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>T : T +>B : B +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f11(); +>f11() : [{}, {} | B] +>f11 : (a?: T, b?: U) => [T, U] + +f11(a); +>f11(a) : [A, A | B] +>f11 : (a?: T, b?: U) => [T, U] +>a : A + +f11(a, a); +>f11(a, a) : [A, A] +>f11 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f11(a, b); +>f11(a, b) : [A, B] +>f11 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +f11(a, c); +>f11(a, c) : [A, C] +>f11 : (a?: T, b?: U) => [T, U] +>a : A +>c : C + +// no inference, partially supplied +f11(); +>f11() : [A, A | B] +>f11 : (a?: T, b?: U) => [T, U] +>A : A + +f11(a); +>f11(a) : [A, A | B] +>f11 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f11(a, a); +>f11(a, a) : [A, A | B] +>f11 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>a : A + +f11(a, b); +>f11(a, b) : [A, A | B] +>f11 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>b : B + +// no inference, fully supplied +f11(); +>f11() : [A, C] +>f11 : (a?: T, b?: U) => [T, U] +>A : A +>C : C + +f11(a); +>f11(a) : [A, C] +>f11 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A + +f11(a, c); +>f11(a, c) : [A, C] +>f11 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A +>c : C + +// function with a type parameter with a default that refers to an earlier type parameter in an intersection +declare function f12(a?: T, b?: U): [T, U]; +>f12 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>T : T +>B : B +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f12(); +>f12() : [{}, {} & B] +>f12 : (a?: T, b?: U) => [T, U] + +f12(a); +>f12(a) : [A, A & B] +>f12 : (a?: T, b?: U) => [T, U] +>a : A + +f12(a, a); +>f12(a, a) : [A, A] +>f12 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f12(a, b); +>f12(a, b) : [A, B] +>f12 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +f12(a, c); +>f12(a, c) : [A, C] +>f12 : (a?: T, b?: U) => [T, U] +>a : A +>c : C + +// no inference, partially supplied +f12(); +>f12() : [A, A & B] +>f12 : (a?: T, b?: U) => [T, U] +>A : A + +f12(a); +>f12(a) : [A, A & B] +>f12 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f12(a, ab); +>f12(a, ab) : [A, A & B] +>f12 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>ab : AB + +// no inference, fully supplied +f12(); +>f12() : [A, C] +>f12 : (a?: T, b?: U) => [T, U] +>A : A +>C : C + +f12(a); +>f12(a) : [A, C] +>f12 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A + +f12(a, c); +>f12(a, c) : [A, C] +>f12 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A +>c : C + +// function with a type parameter with a default that refers to a later type parameter with a default +declare function f13(a?: T, b?: U): [T, U]; +>f13 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>U : U +>B : B +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f13(); +>f13() : [{}, B] +>f13 : (a?: T, b?: U) => [T, U] + +f13(a); +>f13(a) : [A, B] +>f13 : (a?: T, b?: U) => [T, U] +>a : A + +f13(a, b); +>f13(a, b) : [A, B] +>f13 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +f13(a, c); +>f13(a, c) : [A, C] +>f13 : (a?: T, b?: U) => [T, U] +>a : A +>c : C + +// no inference, partially supplied +f13(); +>f13() : [A, B] +>f13 : (a?: T, b?: U) => [T, U] +>A : A + +f13(a); +>f13(a) : [A, B] +>f13 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f13(a, b); +>f13(a, b) : [A, B] +>f13 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>b : B + +// no inference, fully supplied +f13(); +>f13() : [A, C] +>f13 : (a?: T, b?: U) => [T, U] +>A : A +>C : C + +f13(a); +>f13(a) : [A, C] +>f13 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A + +f13(a, c); +>f13(a, c) : [A, C] +>f13 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A +>c : C + +f13(a, c); +>f13(a, c) : [A, C] +>f13 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A +>c : C + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default +declare function f14(a?: T, b?: U, c?: V): [T, U, V]; +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>T : T +>U : U +>V : V +>V : V +>C : C +>a : T +>T : T +>b : U +>U : U +>c : V +>V : V +>T : T +>U : U +>V : V + +// inference +f14(); +>f14() : [{}, {}, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] + +f14(a); +>f14(a) : [A, {}, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A + +f14(a, b); +>f14(a, b) : [A, B, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B + +f14(a, b, c); +>f14(a, b, c) : [A, B, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B +>c : C + +f14(a, b, d); +>f14(a, b, d) : [A, B, D] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B +>d : D + +// no inference, partially supplied +f14(); +>f14() : [A, {}, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A + +f14(a); +>f14(a) : [A, {}, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A + +f14(a, b); +>f14(a, b) : [A, {}, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B + +f14(a, b, c); +>f14(a, b, c) : [A, {}, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B +>c : C + +f14(); +>f14() : [A, B, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B + +f14(a); +>f14(a) : [A, B, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A + +f14(a, b); +>f14(a, b) : [A, B, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B + +f14(a, b, c); +>f14(a, b, c) : [A, B, C] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B +>c : C + +// no inference fully supplied +f14(); +>f14() : [A, B, D] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D + +f14(a); +>f14(a) : [A, B, D] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A + +f14(a, b); +>f14(a, b) : [A, B, D] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A +>b : B + +f14(a, b, d); +>f14(a, b, d) : [A, B, D] +>f14 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A +>b : B +>d : D + +// function with two type parameters with defaults that mutually refer to each other +declare function f15(a?: T, b?: U): [T, U]; +>f15 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>U : U +>T : T +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f15(); +>f15() : [{}, {}] +>f15 : (a?: T, b?: U) => [T, U] + +f15(a); +>f15(a) : [A, A] +>f15 : (a?: T, b?: U) => [T, U] +>a : A + +f15(a, b); +>f15(a, b) : [A, B] +>f15 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +// no inference, partially supplied +f15(); +>f15() : [A, A] +>f15 : (a?: T, b?: U) => [T, U] +>A : A + +f15(a); +>f15(a) : [A, A] +>f15 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f15(a, a); +>f15(a, a) : [A, A] +>f15 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>a : A + +// no inference, fully supplied +f15(); +>f15() : [A, B] +>f15 : (a?: T, b?: U) => [T, U] +>A : A +>B : B + +f15(a); +>f15(a) : [A, B] +>f15 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A + +f15(a, b); +>f15(a, b) : [A, B] +>f15 : (a?: T, b?: U) => [T, U] +>A : A +>B : B +>a : A +>b : B + +// function with a type parameter without a default and two type parameters with defaults that mutually refer to each other +declare function f16(a?: T, b?: U, c?: V): [T, U, V]; +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>T : T +>U : U +>V : V +>V : V +>U : U +>a : T +>T : T +>b : U +>U : U +>c : V +>V : V +>T : T +>U : U +>V : V + +// no inference +f16(); +>f16() : [{}, {}, {}] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] + +f16(a); +>f16(a) : [A, {}, {}] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A + +f16(a, b); +>f16(a, b) : [A, B, B] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B + +f16(a, b, b); +>f16(a, b, b) : [A, B, B] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B +>b : B + +// no inference, partially supplied +f16(); +>f16() : [A, {}, {}] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A + +f16(a); +>f16(a) : [A, {}, {}] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A + +f16(a, b); +>f16(a, b) : [A, {}, {}] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B + +f16(a, b, b); +>f16(a, b, b) : [A, {}, {}] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B +>b : B + +f16(); +>f16() : [A, B, B] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B + +f16(a); +>f16(a) : [A, B, B] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A + +f16(a, b); +>f16(a, b) : [A, B, B] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B + +f16(a, b, b); +>f16(a, b, b) : [A, B, B] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B +>b : B + +// no inference, fully supplied +f16(); +>f16() : [A, B, D] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D + +f16(a); +>f16(a) : [A, B, D] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A + +f16(a, b); +>f16(a, b) : [A, B, D] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A +>b : B + +f16(a, b, d); +>f16(a, b, d) : [A, B, D] +>f16 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A +>b : B +>d : D + +// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union +declare function f17(a?: T, b?: U): [T, U]; +>f17 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>U : U +>T : T +>B : B +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f17(); +>f17() : [{}, {} | B] +>f17 : (a?: T, b?: U) => [T, U] + +f17(a); +>f17(a) : [A, A | B] +>f17 : (a?: T, b?: U) => [T, U] +>a : A + +f17(a, a); +>f17(a, a) : [A, A] +>f17 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f17(a, b); +>f17(a, b) : [A, B] +>f17 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +f17(a, c); +>f17(a, c) : [A, C] +>f17 : (a?: T, b?: U) => [T, U] +>a : A +>c : C + +// no inference, partially supplied +f17(); +>f17() : [A, A | B] +>f17 : (a?: T, b?: U) => [T, U] +>A : A + +f17(a); +>f17(a) : [A, A | B] +>f17 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f17(a, a); +>f17(a, a) : [A, A | B] +>f17 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>a : A + +f17(a, b); +>f17(a, b) : [A, A | B] +>f17 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>b : B + +// no inference, fully supplied +f17(); +>f17() : [A, C] +>f17 : (a?: T, b?: U) => [T, U] +>A : A +>C : C + +f17(a); +>f17(a) : [A, C] +>f17 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A + +f17(a, c); +>f17(a, c) : [A, C] +>f17 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A +>c : C + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union +declare function f18(a?: T, b?: U, c?: V): [T, U, V]; +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>T : T +>U : U +>V : V +>V : V +>U : U +>C : C +>a : T +>T : T +>b : U +>U : U +>c : V +>V : V +>T : T +>U : U +>V : V + +// inference +f18(); +>f18() : [{}, {}, {} | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + +f18(a); +>f18(a) : [A, {}, {} | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A + +f18(a, b); +>f18(a, b) : [A, B, B | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B + +f18(a, b, b); +>f18(a, b, b) : [A, B, B] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B +>b : B + +f18(a, b, c); +>f18(a, b, c) : [A, B, C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B +>c : C + +// no inference, partially supplied +f18(); +>f18() : [A, {}, {} | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A + +f18(a); +>f18(a) : [A, {}, {} | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A + +f18(a, b); +>f18(a, b) : [A, {}, {} | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B + +f18(a, b, b); +>f18(a, b, b) : [A, {}, {} | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B +>b : B + +f18(a, b, c); +>f18(a, b, c) : [A, {}, {} | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B +>c : C + +f18(); +>f18() : [A, B, B | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B + +f18(a); +>f18(a) : [A, B, B | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A + +f18(a, b); +>f18(a, b) : [A, B, B | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B + +f18(a, b, b); +>f18(a, b, b) : [A, B, B | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B +>b : B + +f18(a, b, c); +>f18(a, b, c) : [A, B, B | C] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B +>c : C + +// no inference, fully supplied +f18(); +>f18() : [A, B, D] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D + +f18(a); +>f18(a) : [A, B, D] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A + +f18(a, b); +>f18(a, b) : [A, B, D] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A +>b : B + +f18(a, b, d); +>f18(a, b, d) : [A, B, D] +>f18 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A +>b : B +>d : D + +// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection +declare function f19(a?: T, b?: U): [T, U]; +>f19 : (a?: T, b?: U) => [T, U] +>T : T +>U : U +>U : U +>T : T +>B : B +>a : T +>T : T +>b : U +>U : U +>T : T +>U : U + +// inference +f19(); +>f19() : [{}, {} & B] +>f19 : (a?: T, b?: U) => [T, U] + +f19(a); +>f19(a) : [A, A & B] +>f19 : (a?: T, b?: U) => [T, U] +>a : A + +f19(a, a); +>f19(a, a) : [A, A] +>f19 : (a?: T, b?: U) => [T, U] +>a : A +>a : A + +f19(a, b); +>f19(a, b) : [A, B] +>f19 : (a?: T, b?: U) => [T, U] +>a : A +>b : B + +f19(a, ab); +>f19(a, ab) : [A, AB] +>f19 : (a?: T, b?: U) => [T, U] +>a : A +>ab : AB + +f19(a, c); +>f19(a, c) : [A, C] +>f19 : (a?: T, b?: U) => [T, U] +>a : A +>c : C + +// no inference, partially supplied +f19(); +>f19() : [A, A & B] +>f19 : (a?: T, b?: U) => [T, U] +>A : A + +f19(a); +>f19(a) : [A, A & B] +>f19 : (a?: T, b?: U) => [T, U] +>A : A +>a : A + +f19(a, ab); +>f19(a, ab) : [A, A & B] +>f19 : (a?: T, b?: U) => [T, U] +>A : A +>a : A +>ab : AB + +// no inference, fully supplied +f19(); +>f19() : [A, C] +>f19 : (a?: T, b?: U) => [T, U] +>A : A +>C : C + +f19(a); +>f19(a) : [A, C] +>f19 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A + +f19(a, c); +>f19(a, c) : [A, C] +>f19 : (a?: T, b?: U) => [T, U] +>A : A +>C : C +>a : A +>c : C + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection +declare function f20(a?: T, b?: U, c?: V): [T, U, V]; +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>T : T +>U : U +>V : V +>V : V +>U : U +>C : C +>a : T +>T : T +>b : U +>U : U +>c : V +>V : V +>T : T +>U : U +>V : V + +// inference +f20(); +>f20() : [{}, {}, {} & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] + +f20(a); +>f20(a) : [A, {}, {} & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A + +f20(a, b); +>f20(a, b) : [A, B, B & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B + +f20(a, b, c); +>f20(a, b, c) : [A, B, C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>a : A +>b : B +>c : C + +// no inference, partially supplied +f20(); +>f20() : [A, {}, {} & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A + +f20(a); +>f20(a) : [A, {}, {} & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A + +f20(a, b); +>f20(a, b) : [A, {}, {} & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B + +f20(a, b, bc); +>f20(a, b, bc) : [A, {}, {} & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>a : A +>b : B +>bc : BC + +f20(); +>f20() : [A, B, B & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B + +f20(a); +>f20(a) : [A, B, B & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A + +f20(a, b); +>f20(a, b) : [A, B, B & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B + +f20(a, b, bc); +>f20(a, b, bc) : [A, B, B & C] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>a : A +>b : B +>bc : BC + +// no inference, fully supplied +f20(); +>f20() : [A, B, D] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D + +f20(a); +>f20(a) : [A, B, D] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A + +f20(a, b); +>f20(a, b) : [A, B, D] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A +>b : B + +f20(a, b, d); +>f20(a, b, d) : [A, B, D] +>f20 : (a?: T, b?: U, c?: V) => [T, U, V] +>A : A +>B : B +>D : D +>a : A +>b : B +>d : D + +interface i00 { a: T; } +>i00 : i00 +>T : T +>a : T +>T : T + +const i00c00 = (x).a; +>i00c00 : number +>(x).a : number +>(x) : i00 +>x : i00 +>i00 : i00 +>x : any +>a : number + +const i00c01 = (>x).a; +>i00c01 : number +>(>x).a : number +>(>x) : i00 +>>x : i00 +>i00 : i00 +>x : any +>a : number + +interface i01 { a: [T, U]; } +>i01 : i01 +>T : T +>U : U +>T : T +>a : [T, U] +>T : T +>U : U + +const i01c00 = (>x).a; +>i01c00 : [number, number] +>(>x).a : [number, number] +>(>x) : i01 +>>x : i01 +>i01 : i01 +>x : any +>a : [number, number] + +const i01c01 = (>x).a; +>i01c01 : [number, string] +>(>x).a : [number, string] +>(>x) : i01 +>>x : i01 +>i01 : i01 +>x : any +>a : [number, string] + +interface i02 { a: [T, U]; } +>i02 : i02 +>T : T +>U : U +>T : T +>a : [T, U] +>T : T +>U : U + +const i02c00 = (>x).a; +>i02c00 : [number, number] +>(>x).a : [number, number] +>(>x) : i02 +>>x : i02 +>i02 : i02 +>x : any +>a : [number, number] + +const i02c01 = (>x).a; +>i02c01 : [1, 1] +>(>x).a : [1, 1] +>(>x) : i02<1, 1> +>>x : i02<1, 1> +>i02 : i02 +>x : any +>a : [1, 1] + +const i02c02 = (>x).a; +>i02c02 : [number, number] +>(>x).a : [number, number] +>(>x) : i02 +>>x : i02 +>i02 : i02 +>x : any +>a : [number, number] + +const i02c03 = (>x).a; +>i02c03 : [1, number] +>(>x).a : [1, number] +>(>x) : i02<1, number> +>>x : i02<1, number> +>i02 : i02 +>x : any +>a : [1, number] + +const i02c04 = (>x).a; +>i02c04 : [number, 1] +>(>x).a : [number, 1] +>(>x) : i02 +>>x : i02 +>i02 : i02 +>x : any +>a : [number, 1] + +interface i03 { a: [T, U]; } +>i03 : i03 +>T : T +>U : U +>T : T +>T : T +>a : [T, U] +>T : T +>U : U + +const i03c00 = (>x).a; +>i03c00 : [number, number] +>(>x).a : [number, number] +>(>x) : i03 +>>x : i03 +>i03 : i03 +>x : any +>a : [number, number] + +const i03c01 = (>x).a; +>i03c01 : [1, 1] +>(>x).a : [1, 1] +>(>x) : i03<1, 1> +>>x : i03<1, 1> +>i03 : i03 +>x : any +>a : [1, 1] + +const i03c02 = (>x).a; +>i03c02 : [number, number] +>(>x).a : [number, number] +>(>x) : i03 +>>x : i03 +>i03 : i03 +>x : any +>a : [number, number] + +const i03c03 = (>x).a; +>i03c03 : [1, 1] +>(>x).a : [1, 1] +>(>x) : i03<1, 1> +>>x : i03<1, 1> +>i03 : i03 +>x : any +>a : [1, 1] + +const i03c04 = (>x).a; +>i03c04 : [number, 1] +>(>x).a : [number, 1] +>(>x) : i03 +>>x : i03 +>i03 : i03 +>x : any +>a : [number, 1] + +interface i04 {} +>i04 : i04 + +interface i04 {} +>i04 : i04 +>T : T + +interface i04 {} +>i04 : i04 +>T : T + +interface i04 {} +>i04 : i04 +>T : T +>U : U + +interface i05 { a: T; } +>i05 : i05 +>T : T +>T : T +>a : T +>T : T + +const i05c00 = (x).a; +>i05c00 : {} +>(x).a : {} +>(x) : i05<{}> +>x : i05<{}> +>i05 : i05 +>x : any +>a : {} + +const i05c01 = (>x).a; +>i05c01 : number +>(>x).a : number +>(>x) : i05 +>>x : i05 +>i05 : i05 +>x : any +>a : number + +interface i06 { a: [T, U]; } +>i06 : i06 +>T : T +>U : U +>U : U +>T : T +>a : [T, U] +>T : T +>U : U + +const i06c00 = (x).a; +>i06c00 : [{}, {}] +>(x).a : [{}, {}] +>(x) : i06<{}, {}> +>x : i06<{}, {}> +>i06 : i06 +>x : any +>a : [{}, {}] + +const i06c01 = (>x).a; +>i06c01 : [number, number] +>(>x).a : [number, number] +>(>x) : i06 +>>x : i06 +>i06 : i06 +>x : any +>a : [number, number] + +const i06c02 = (>x).a; +>i06c02 : [number, string] +>(>x).a : [number, string] +>(>x) : i06 +>>x : i06 +>i06 : i06 +>x : any +>a : [number, string] + +interface i07 { a: A; } +>i07 : i07 +>a : A +>A : A + +interface i07 { b: A; } +>i07 : i07 +>A : A +>b : A +>A : A + +const i07c00 = (x).a; +>i07c00 : A +>(x).a : A +>(x) : i07 +>x : i07 +>i07 : i07 +>x : any +>a : A + +const i07c01 = (x).b; +>i07c01 : number +>(x).b : number +>(x) : i07 +>x : i07 +>i07 : i07 +>x : any +>b : number + +const i07c02 = (>x).a; +>i07c02 : A +>(>x).a : A +>(>x) : i07 +>>x : i07 +>i07 : i07 +>B : B +>x : any +>a : A + +const i07c03 = (>x).b; +>i07c03 : B +>(>x).b : B +>(>x) : i07 +>>x : i07 +>i07 : i07 +>B : B +>x : any +>b : B + +interface Base01 { a: T; } +>Base01 : Base01 +>T : T +>a : T +>T : T + +interface Base01Constructor { new (a?: T): Base01; } +>Base01Constructor : Base01Constructor +>T : T +>a : T +>T : T +>Base01 : Base01 +>T : T + +declare const Base01: Base01Constructor; +>Base01 : Base01Constructor +>Base01Constructor : Base01Constructor + +const Base01c00 = new Base01(); +>Base01c00 : Base01 +>new Base01() : Base01 +>Base01 : Base01Constructor + +const Base01c01 = new Base01(1); +>Base01c01 : Base01 +>new Base01(1) : Base01 +>Base01 : Base01Constructor +>1 : 1 + +const Base01c02 = new Base01(); +>Base01c02 : Base01 +>new Base01() : Base01 +>Base01 : Base01Constructor + +const Base01c03 = new Base01(1); +>Base01c03 : Base01 +>new Base01(1) : Base01 +>Base01 : Base01Constructor +>1 : 1 + +declare class Derived01 extends Base01 { } +>Derived01 : Derived01 +>T : T +>Base01 : Base01 +>T : T + +const Derived01c00 = new Derived01(); +>Derived01c00 : Derived01<{}> +>new Derived01() : Derived01<{}> +>Derived01 : typeof Derived01 + +const Derived01c01 = new Derived01(1); +>Derived01c01 : Derived01 +>new Derived01(1) : Derived01 +>Derived01 : typeof Derived01 +>1 : 1 + +const Derived01c02 = new Derived01(); +>Derived01c02 : Derived01 +>new Derived01() : Derived01 +>Derived01 : typeof Derived01 + +const Derived01c03 = new Derived01(1); +>Derived01c03 : Derived01 +>new Derived01(1) : Derived01 +>Derived01 : typeof Derived01 +>1 : 1 + +declare class Derived02 extends Base01 { } +>Derived02 : Derived02 +>T : T +>Base01 : Base01 +>T : T + +const Derived02c00 = new Derived02(); +>Derived02c00 : Derived02 +>new Derived02() : Derived02 +>Derived02 : typeof Derived02 + +const Derived02c01 = new Derived02(1); +>Derived02c01 : Derived02 +>new Derived02(1) : Derived02 +>Derived02 : typeof Derived02 +>1 : 1 + +const Derived02c02 = new Derived02(); +>Derived02c02 : Derived02 +>new Derived02() : Derived02 +>Derived02 : typeof Derived02 + +const Derived02c03 = new Derived02(1); +>Derived02c03 : Derived02 +>new Derived02(1) : Derived02 +>Derived02 : typeof Derived02 +>1 : 1 + +type t00 = { a: T; } +>t00 : t00 +>T : T +>a : T +>T : T + +const t00c00 = (x).a; +>t00c00 : number +>(x).a : number +>(x) : t00 +>x : t00 +>t00 : t00 +>x : any +>a : number + +const t00c01 = (>x).a; +>t00c01 : number +>(>x).a : number +>(>x) : t00 +>>x : t00 +>t00 : t00 +>x : any +>a : number + +type t01 = { a: [T, U]; } +>t01 : t01 +>T : T +>U : U +>T : T +>a : [T, U] +>T : T +>U : U + +const t01c00 = (>x).a; +>t01c00 : [number, number] +>(>x).a : [number, number] +>(>x) : t01 +>>x : t01 +>t01 : t01 +>x : any +>a : [number, number] + +const t01c01 = (>x).a; +>t01c01 : [number, string] +>(>x).a : [number, string] +>(>x) : t01 +>>x : t01 +>t01 : t01 +>x : any +>a : [number, string] + +type t02 = { a: [T, U]; } +>t02 : t02 +>T : T +>U : U +>T : T +>a : [T, U] +>T : T +>U : U + +const t02c00 = (>x).a; +>t02c00 : [number, number] +>(>x).a : [number, number] +>(>x) : t02 +>>x : t02 +>t02 : t02 +>x : any +>a : [number, number] + +const t02c01 = (>x).a; +>t02c01 : [1, 1] +>(>x).a : [1, 1] +>(>x) : t02<1, 1> +>>x : t02<1, 1> +>t02 : t02 +>x : any +>a : [1, 1] + +const t02c02 = (>x).a; +>t02c02 : [number, number] +>(>x).a : [number, number] +>(>x) : t02 +>>x : t02 +>t02 : t02 +>x : any +>a : [number, number] + +const t02c03 = (>x).a; +>t02c03 : [1, number] +>(>x).a : [1, number] +>(>x) : t02<1, number> +>>x : t02<1, number> +>t02 : t02 +>x : any +>a : [1, number] + +const t02c04 = (>x).a; +>t02c04 : [number, 1] +>(>x).a : [number, 1] +>(>x) : t02 +>>x : t02 +>t02 : t02 +>x : any +>a : [number, 1] + +type t03 = { a: [T, U]; } +>t03 : t03 +>T : T +>U : U +>T : T +>T : T +>a : [T, U] +>T : T +>U : U + +const t03c00 = (>x).a; +>t03c00 : [number, number] +>(>x).a : [number, number] +>(>x) : t03 +>>x : t03 +>t03 : t03 +>x : any +>a : [number, number] + +const t03c01 = (>x).a; +>t03c01 : [1, 1] +>(>x).a : [1, 1] +>(>x) : t03<1, 1> +>>x : t03<1, 1> +>t03 : t03 +>x : any +>a : [1, 1] + +const t03c02 = (>x).a; +>t03c02 : [number, number] +>(>x).a : [number, number] +>(>x) : t03 +>>x : t03 +>t03 : t03 +>x : any +>a : [number, number] + +const t03c03 = (>x).a; +>t03c03 : [1, 1] +>(>x).a : [1, 1] +>(>x) : t03<1, 1> +>>x : t03<1, 1> +>t03 : t03 +>x : any +>a : [1, 1] + +const t03c04 = (>x).a; +>t03c04 : [number, 1] +>(>x).a : [number, 1] +>(>x) : t03 +>>x : t03 +>t03 : t03 +>x : any +>a : [number, 1] + diff --git a/tests/baselines/reference/genericDefaultsErrors.errors.txt b/tests/baselines/reference/genericDefaultsErrors.errors.txt new file mode 100644 index 0000000000000..03769586b413f --- /dev/null +++ b/tests/baselines/reference/genericDefaultsErrors.errors.txt @@ -0,0 +1,110 @@ +tests/cases/compiler/genericDefaultsErrors.ts(4,41): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/compiler/genericDefaultsErrors.ts(5,59): error TS2344: Type 'T' does not satisfy the constraint 'number'. + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericDefaultsErrors.ts(6,44): error TS2344: Type 'T' does not satisfy the constraint 'number'. +tests/cases/compiler/genericDefaultsErrors.ts(7,39): error TS2344: Type 'number' does not satisfy the constraint 'T'. +tests/cases/compiler/genericDefaultsErrors.ts(11,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/genericDefaultsErrors.ts(14,1): error TS2346: Supplied parameters do not match any signature of call target. +tests/cases/compiler/genericDefaultsErrors.ts(18,13): error TS2345: Argument of type '"a"' is not assignable to parameter of type 'number'. +tests/cases/compiler/genericDefaultsErrors.ts(20,11): error TS2428: All declarations of 'i00' must have identical type parameters. +tests/cases/compiler/genericDefaultsErrors.ts(21,11): error TS2428: All declarations of 'i00' must have identical type parameters. +tests/cases/compiler/genericDefaultsErrors.ts(23,11): error TS2428: All declarations of 'i01' must have identical type parameters. +tests/cases/compiler/genericDefaultsErrors.ts(24,11): error TS2428: All declarations of 'i01' must have identical type parameters. +tests/cases/compiler/genericDefaultsErrors.ts(26,27): error TS2706: Required type parameters may not follow optional type parameters. +tests/cases/compiler/genericDefaultsErrors.ts(27,34): error TS2344: Type 'number' does not satisfy the constraint 'string'. +tests/cases/compiler/genericDefaultsErrors.ts(28,52): error TS2344: Type 'T' does not satisfy the constraint 'number'. + Type 'string' is not assignable to type 'number'. +tests/cases/compiler/genericDefaultsErrors.ts(29,37): error TS2344: Type 'T' does not satisfy the constraint 'number'. +tests/cases/compiler/genericDefaultsErrors.ts(30,32): error TS2344: Type 'number' does not satisfy the constraint 'T'. +tests/cases/compiler/genericDefaultsErrors.ts(33,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +tests/cases/compiler/genericDefaultsErrors.ts(34,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +tests/cases/compiler/genericDefaultsErrors.ts(37,15): error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. +tests/cases/compiler/genericDefaultsErrors.ts(39,20): error TS2304: Cannot find name 'T'. +tests/cases/compiler/genericDefaultsErrors.ts(39,20): error TS4033: Property 'x' of exported interface has or is using private name 'T'. + + +==== tests/cases/compiler/genericDefaultsErrors.ts (21 errors) ==== + + declare const x: any; + + declare function f03(): void; // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. + declare function f04(): void; // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' is not assignable to type 'number'. + declare function f05(): void; // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. + declare function f06(): void; // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'T'. + + declare function f11(): void; + f11(); // ok + f11<1>(); // error + ~~~~~~~~ +!!! error TS2346: Supplied parameters do not match any signature of call target. + f11<1, 2>(); // ok + f11<1, 2, 3>(); // ok + f11<1, 2, 3, 4>(); // error + ~~~~~~~~~~~~~~~~~ +!!! error TS2346: Supplied parameters do not match any signature of call target. + + declare function f12(a?: U): void; + f12(); // ok + f12("a"); // error + ~~~ +!!! error TS2345: Argument of type '"a"' is not assignable to parameter of type 'number'. + + interface i00 { } // ok + ~~~ +!!! error TS2428: All declarations of 'i00' must have identical type parameters. + interface i00 { } // error + ~~~ +!!! error TS2428: All declarations of 'i00' must have identical type parameters. + + interface i01 { } // ok + ~~~ +!!! error TS2428: All declarations of 'i01' must have identical type parameters. + interface i01 { } // error + ~~~ +!!! error TS2428: All declarations of 'i01' must have identical type parameters. + + interface i04 { } // error + ~ +!!! error TS2706: Required type parameters may not follow optional type parameters. + interface i05 { } // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'string'. + interface i06 { } // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. +!!! error TS2344: Type 'string' is not assignable to type 'number'. + interface i07 { } // error + ~ +!!! error TS2344: Type 'T' does not satisfy the constraint 'number'. + interface i08 { } // error + ~~~~~~ +!!! error TS2344: Type 'number' does not satisfy the constraint 'T'. + + interface i09 { } + type i09t00 = i09; // error + ~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + type i09t01 = i09<1>; // error + ~~~~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + type i09t02 = i09<1, 2>; // ok + type i09t03 = i09<1, 2, 3>; // ok + type i09t04 = i09<1, 2, 3, 4>; // error + ~~~~~~~~~~~~~~~ +!!! error TS2707: Generic type 'i09' requires between 2 and 3 type arguments. + + interface i10 { x: T; } // error + ~ +!!! error TS2304: Cannot find name 'T'. + ~ +!!! error TS4033: Property 'x' of exported interface has or is using private name 'T'. + interface i10 {} \ No newline at end of file diff --git a/tests/baselines/reference/genericDefaultsErrors.js b/tests/baselines/reference/genericDefaultsErrors.js new file mode 100644 index 0000000000000..6309b01cab3fc --- /dev/null +++ b/tests/baselines/reference/genericDefaultsErrors.js @@ -0,0 +1,50 @@ +//// [genericDefaultsErrors.ts] + +declare const x: any; + +declare function f03(): void; // error +declare function f04(): void; // error +declare function f05(): void; // error +declare function f06(): void; // error + +declare function f11(): void; +f11(); // ok +f11<1>(); // error +f11<1, 2>(); // ok +f11<1, 2, 3>(); // ok +f11<1, 2, 3, 4>(); // error + +declare function f12(a?: U): void; +f12(); // ok +f12("a"); // error + +interface i00 { } // ok +interface i00 { } // error + +interface i01 { } // ok +interface i01 { } // error + +interface i04 { } // error +interface i05 { } // error +interface i06 { } // error +interface i07 { } // error +interface i08 { } // error + +interface i09 { } +type i09t00 = i09; // error +type i09t01 = i09<1>; // error +type i09t02 = i09<1, 2>; // ok +type i09t03 = i09<1, 2, 3>; // ok +type i09t04 = i09<1, 2, 3, 4>; // error + +interface i10 { x: T; } // error +interface i10 {} + +//// [genericDefaultsErrors.js] +f11(); // ok +f11(); // error +f11(); // ok +f11(); // ok +f11(); // error +f12(); // ok +f12("a"); // error diff --git a/tests/baselines/reference/inferenceLimit.symbols b/tests/baselines/reference/inferenceLimit.symbols index 82aecd7e7938c..488838548ad36 100644 --- a/tests/baselines/reference/inferenceLimit.symbols +++ b/tests/baselines/reference/inferenceLimit.symbols @@ -37,14 +37,14 @@ export class BrokenClass { >reject : Symbol(reject, Decl(file1.ts, 13, 34)) this.doStuff(order.id) ->this.doStuff(order.id) .then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>this.doStuff(order.id) .then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >this.doStuff : Symbol(BrokenClass.doStuff, Decl(file1.ts, 27, 3)) >this : Symbol(BrokenClass, Decl(file1.ts, 1, 39)) >doStuff : Symbol(BrokenClass.doStuff, Decl(file1.ts, 27, 3)) >order : Symbol(order, Decl(file1.ts, 12, 25)) .then((items) => { ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >items : Symbol(items, Decl(file1.ts, 15, 17)) order.items = items; @@ -60,7 +60,7 @@ export class BrokenClass { }; return Promise.all(result.map(populateItems)) ->Promise.all(result.map(populateItems)) .then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>Promise.all(result.map(populateItems)) .then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) @@ -70,7 +70,7 @@ export class BrokenClass { >populateItems : Symbol(populateItems, Decl(file1.ts, 12, 7)) .then((orders: Array) => { ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >orders : Symbol(orders, Decl(file1.ts, 23, 13)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >MyModule : Symbol(MyModule, Decl(file1.ts, 1, 6)) diff --git a/tests/baselines/reference/inferenceLimit.types b/tests/baselines/reference/inferenceLimit.types index c123e21802ecc..bf917e18e93c8 100644 --- a/tests/baselines/reference/inferenceLimit.types +++ b/tests/baselines/reference/inferenceLimit.types @@ -46,7 +46,7 @@ export class BrokenClass { this.doStuff(order.id) >this.doStuff(order.id) .then((items) => { order.items = items; resolve(order); }) : Promise ->this.doStuff(order.id) .then : { (onfulfilled?: (value: void) => void | PromiseLike, onrejected?: (reason: any) => void | PromiseLike): Promise; (onfulfilled: (value: void) => void | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: void) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: void) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>this.doStuff(order.id) .then : (onfulfilled?: (value: void) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.doStuff(order.id) : Promise >this.doStuff : (id: number) => Promise >this : this @@ -56,7 +56,7 @@ export class BrokenClass { >id : any .then((items) => { ->then : { (onfulfilled?: (value: void) => void | PromiseLike, onrejected?: (reason: any) => void | PromiseLike): Promise; (onfulfilled: (value: void) => void | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: void) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: void) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: void) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >(items) => { order.items = items; resolve(order); } : (items: void) => void >items : void @@ -78,7 +78,7 @@ export class BrokenClass { return Promise.all(result.map(populateItems)) >Promise.all(result.map(populateItems)) .then((orders: Array) => { resolve(orders); }) : Promise ->Promise.all(result.map(populateItems)) .then : { (onfulfilled?: (value: {}[]) => {}[] | PromiseLike<{}[]>, onrejected?: (reason: any) => {}[] | PromiseLike<{}[]>): Promise<{}[]>; (onfulfilled: (value: {}[]) => {}[] | PromiseLike<{}[]>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{}[] | TResult>; (onfulfilled: (value: {}[]) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}[]) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>Promise.all(result.map(populateItems)) .then : (onfulfilled?: (value: {}[]) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Promise.all(result.map(populateItems)) : Promise<{}[]> >Promise.all : { (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise<[T1, T2, T3, T4]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; (values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; (values: (T | PromiseLike)[]): Promise; (values: Iterable>): Promise; } >Promise : PromiseConstructor @@ -90,7 +90,7 @@ export class BrokenClass { >populateItems : (order: any) => Promise<{}> .then((orders: Array) => { ->then : { (onfulfilled?: (value: {}[]) => {}[] | PromiseLike<{}[]>, onrejected?: (reason: any) => {}[] | PromiseLike<{}[]>): Promise<{}[]>; (onfulfilled: (value: {}[]) => {}[] | PromiseLike<{}[]>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{}[] | TResult>; (onfulfilled: (value: {}[]) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}[]) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: {}[]) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >(orders: Array) => { resolve(orders); } : (orders: MyModule.MyModel[]) => void >orders : MyModule.MyModel[] >Array : T[] diff --git a/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt b/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt index 79d8b4a509a90..cabc329df7e4b 100644 --- a/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt +++ b/tests/baselines/reference/interfaceWithMultipleDeclarations.errors.txt @@ -1,18 +1,23 @@ +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(1,11): error TS2428: All declarations of 'I1' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(3,11): error TS2428: All declarations of 'I1' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(5,11): error TS2428: All declarations of 'I1' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(7,11): error TS2428: All declarations of 'I1' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(9,11): error TS2428: All declarations of 'I1' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(11,11): error TS2428: All declarations of 'I1' must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(14,11): error TS2428: All declarations of 'I2' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(16,11): error TS2428: All declarations of 'I2' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(18,11): error TS2428: All declarations of 'I2' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(20,11): error TS2428: All declarations of 'I2' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(22,11): error TS2428: All declarations of 'I2' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(24,11): error TS2428: All declarations of 'I2' must have identical type parameters. +tests/cases/compiler/interfaceWithMultipleDeclarations.ts(27,11): error TS2428: All declarations of 'I3' must have identical type parameters. tests/cases/compiler/interfaceWithMultipleDeclarations.ts(29,11): error TS2428: All declarations of 'I3' must have identical type parameters. -==== tests/cases/compiler/interfaceWithMultipleDeclarations.ts (11 errors) ==== +==== tests/cases/compiler/interfaceWithMultipleDeclarations.ts (14 errors) ==== interface I1 { + ~~ +!!! error TS2428: All declarations of 'I1' must have identical type parameters. } interface I1 { // Name mismatch ~~ @@ -36,6 +41,8 @@ tests/cases/compiler/interfaceWithMultipleDeclarations.ts(29,11): error TS2428: } interface I2 { + ~~ +!!! error TS2428: All declarations of 'I2' must have identical type parameters. } interface I2 string> { // constraint mismatch ~~ @@ -59,6 +66,8 @@ tests/cases/compiler/interfaceWithMultipleDeclarations.ts(29,11): error TS2428: } interface I3 { + ~~ +!!! error TS2428: All declarations of 'I3' must have identical type parameters. } interface I3 { // length mismatch ~~ diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols index ed7bb2697ab4f..62473581abe12 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols @@ -121,9 +121,9 @@ declare var console: any; >console : Symbol(console, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 52, 11)) out().then(() => { ->out().then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>out().then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >out : Symbol(out, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 45, 37)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) console.log("Yea!"); >console : Symbol(console, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 52, 11)) diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types index 40b299d63a030..b259e30172d9c 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types @@ -148,10 +148,10 @@ declare var console: any; out().then(() => { >out().then(() => { console.log("Yea!");}) : Promise ->out().then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>out().then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >out() : Promise<{}> >out : () => Promise<{}> ->then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => { console.log("Yea!");} : () => void console.log("Yea!"); diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols index 22c2173db42ec..ccb78b1c36789 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols @@ -121,9 +121,9 @@ declare var console: any; >console : Symbol(console, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 52, 11)) out().then(() => { ->out().then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>out().then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >out : Symbol(out, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 45, 37)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) console.log("Yea!"); >console : Symbol(console, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 52, 11)) diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types index 3022a0ce8b119..4fa4c085bca58 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types @@ -148,10 +148,10 @@ declare var console: any; out().then(() => { >out().then(() => { console.log("Yea!");}) : Promise ->out().then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>out().then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >out() : Promise<{}> >out : () => Promise<{}> ->then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => { console.log("Yea!");} : () => void console.log("Yea!"); diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols index cc74a4e843a7b..0bbffee6c8625 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols @@ -121,9 +121,9 @@ declare var console: any; >console : Symbol(console, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 52, 11)) out().then(() => { ->out().then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>out().then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >out : Symbol(out, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 45, 37)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) console.log("Yea!"); >console : Symbol(console, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 52, 11)) diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types index d98ee87029562..25cd47601e018 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types @@ -148,10 +148,10 @@ declare var console: any; out().then(() => { >out().then(() => { console.log("Yea!");}) : Promise ->out().then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>out().then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >out() : Promise<{}> >out : () => Promise<{}> ->then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => { console.log("Yea!");} : () => void console.log("Yea!"); diff --git a/tests/baselines/reference/multipleNumericIndexers.errors.txt b/tests/baselines/reference/multipleNumericIndexers.errors.txt index 82fc444ac650b..e3eaa94fa5281 100644 --- a/tests/baselines/reference/multipleNumericIndexers.errors.txt +++ b/tests/baselines/reference/multipleNumericIndexers.errors.txt @@ -1,4 +1,5 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(5,5): error TS2375: Duplicate number index signature. +tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(8,11): error TS2428: All declarations of 'I' must have identical type parameters. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(10,5): error TS2375: Duplicate number index signature. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(15,5): error TS2375: Duplicate number index signature. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(20,5): error TS2375: Duplicate number index signature. @@ -8,7 +9,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericI tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts(30,5): error TS2375: Duplicate number index signature. -==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts (8 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericIndexers.ts (9 errors) ==== // Multiple indexers of the same type are an error class C { @@ -19,6 +20,8 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/multipleNumericI } interface I { + ~ +!!! error TS2428: All declarations of 'I' must have identical type parameters. [x: number]: string; [x: number]: string; ~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/nonIdenticalTypeConstraints.errors.txt b/tests/baselines/reference/nonIdenticalTypeConstraints.errors.txt index 627b38579a2d7..6070c97cf289b 100644 --- a/tests/baselines/reference/nonIdenticalTypeConstraints.errors.txt +++ b/tests/baselines/reference/nonIdenticalTypeConstraints.errors.txt @@ -1,9 +1,12 @@ +tests/cases/compiler/nonIdenticalTypeConstraints.ts(7,7): error TS2428: All declarations of 'Foo' must have identical type parameters. tests/cases/compiler/nonIdenticalTypeConstraints.ts(10,11): error TS2428: All declarations of 'Foo' must have identical type parameters. +tests/cases/compiler/nonIdenticalTypeConstraints.ts(13,11): error TS2428: All declarations of 'Qux' must have identical type parameters. tests/cases/compiler/nonIdenticalTypeConstraints.ts(16,7): error TS2428: All declarations of 'Qux' must have identical type parameters. +tests/cases/compiler/nonIdenticalTypeConstraints.ts(33,7): error TS2428: All declarations of 'Quux' must have identical type parameters. tests/cases/compiler/nonIdenticalTypeConstraints.ts(36,11): error TS2428: All declarations of 'Quux' must have identical type parameters. -==== tests/cases/compiler/nonIdenticalTypeConstraints.ts (3 errors) ==== +==== tests/cases/compiler/nonIdenticalTypeConstraints.ts (6 errors) ==== class Different { a: number; b: string; @@ -11,6 +14,8 @@ tests/cases/compiler/nonIdenticalTypeConstraints.ts(36,11): error TS2428: All de } class Foo { + ~~~ +!!! error TS2428: All declarations of 'Foo' must have identical type parameters. n: T; } interface Foo { @@ -19,6 +24,8 @@ tests/cases/compiler/nonIdenticalTypeConstraints.ts(36,11): error TS2428: All de y: T; } interface Qux { + ~~~ +!!! error TS2428: All declarations of 'Qux' must have identical type parameters. y: T; } class Qux { @@ -41,6 +48,8 @@ tests/cases/compiler/nonIdenticalTypeConstraints.ts(36,11): error TS2428: All de } class Quux { + ~~~~ +!!! error TS2428: All declarations of 'Quux' must have identical type parameters. n: T; } interface Quux { diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index 661d66a4a446b..69bd8c1e629d0 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -51,9 +51,9 @@ tests/cases/compiler/promisePermutations.ts(144,12): error TS2453: The type argu tests/cases/compiler/promisePermutations.ts(152,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Types of property 'then' are incompatible. - Type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }' is not assignable to type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. + Type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }' is not assignable to type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. Types of parameters 'success' and 'onfulfilled' are incompatible. - Type '(value: number) => number | PromiseLike' is not assignable to type '(value: string) => IPromise'. + Type '(value: number) => any' is not assignable to type '(value: string) => IPromise'. Types of parameters 'value' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations.ts(156,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -68,9 +68,9 @@ tests/cases/compiler/promisePermutations.ts(159,21): error TS2345: Argument of t tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'Promise' is not assignable to type 'IPromise'. Types of property 'then' are incompatible. - Type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. + Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. Types of parameters 'onfulfilled' and 'success' are incompatible. - Type '(value: string) => IPromise' is not assignable to type '(value: number) => number | PromiseLike'. + Type '(value: string) => IPromise' is not assignable to type '(value: number) => any'. Types of parameters 'value' and 'value' are incompatible. Type 'number' is not assignable to type 'string'. @@ -310,9 +310,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t !!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Types of property 'then' are incompatible. -!!! error TS2453: Type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }' is not assignable to type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. +!!! error TS2453: Type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }' is not assignable to type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. !!! error TS2453: Types of parameters 'success' and 'onfulfilled' are incompatible. -!!! error TS2453: Type '(value: number) => number | PromiseLike' is not assignable to type '(value: string) => IPromise'. +!!! error TS2453: Type '(value: number) => any' is not assignable to type '(value: string) => IPromise'. !!! error TS2453: Types of parameters 'value' and 'value' are incompatible. !!! error TS2453: Type 'string' is not assignable to type 'number'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -339,9 +339,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t !!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2345: Type 'Promise' is not assignable to type 'IPromise'. !!! error TS2345: Types of property 'then' are incompatible. -!!! error TS2345: Type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. +!!! error TS2345: Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. !!! error TS2345: Types of parameters 'onfulfilled' and 'success' are incompatible. -!!! error TS2345: Type '(value: string) => IPromise' is not assignable to type '(value: number) => number | PromiseLike'. +!!! error TS2345: Type '(value: string) => IPromise' is not assignable to type '(value: number) => any'. !!! error TS2345: Types of parameters 'value' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index b133801f7763b..cbbd9cc77366a 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -51,9 +51,9 @@ tests/cases/compiler/promisePermutations2.ts(143,12): error TS2453: The type arg tests/cases/compiler/promisePermutations2.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Types of property 'then' are incompatible. - Type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }' is not assignable to type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. + Type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }' is not assignable to type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. Types of parameters 'success' and 'onfulfilled' are incompatible. - Type '(value: number) => number | PromiseLike' is not assignable to type '(value: string) => IPromise'. + Type '(value: number) => any' is not assignable to type '(value: string) => IPromise'. Types of parameters 'value' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations2.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -68,9 +68,9 @@ tests/cases/compiler/promisePermutations2.ts(158,21): error TS2345: Argument of tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'Promise' is not assignable to type 'IPromise'. Types of property 'then' are incompatible. - Type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. + Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. Types of parameters 'onfulfilled' and 'success' are incompatible. - Type '(value: string) => IPromise' is not assignable to type '(value: number) => number | PromiseLike'. + Type '(value: string) => IPromise' is not assignable to type '(value: number) => any'. Types of parameters 'value' and 'value' are incompatible. Type 'number' is not assignable to type 'string'. @@ -309,9 +309,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of !!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Types of property 'then' are incompatible. -!!! error TS2453: Type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }' is not assignable to type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. +!!! error TS2453: Type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }' is not assignable to type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. !!! error TS2453: Types of parameters 'success' and 'onfulfilled' are incompatible. -!!! error TS2453: Type '(value: number) => number | PromiseLike' is not assignable to type '(value: string) => IPromise'. +!!! error TS2453: Type '(value: number) => any' is not assignable to type '(value: string) => IPromise'. !!! error TS2453: Types of parameters 'value' and 'value' are incompatible. !!! error TS2453: Type 'string' is not assignable to type 'number'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -338,9 +338,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of !!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2345: Type 'Promise' is not assignable to type 'IPromise'. !!! error TS2345: Types of property 'then' are incompatible. -!!! error TS2345: Type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. +!!! error TS2345: Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '{ (success?: (value: string) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; }'. !!! error TS2345: Types of parameters 'onfulfilled' and 'success' are incompatible. -!!! error TS2345: Type '(value: string) => IPromise' is not assignable to type '(value: number) => number | PromiseLike'. +!!! error TS2345: Type '(value: string) => IPromise' is not assignable to type '(value: number) => any'. !!! error TS2345: Types of parameters 'value' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index b6c2a1cdfc726..fd0ce0d643eab 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -54,9 +54,9 @@ tests/cases/compiler/promisePermutations3.ts(143,12): error TS2453: The type arg tests/cases/compiler/promisePermutations3.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. Types of property 'then' are incompatible. - Type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. + Type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. Types of parameters 'success' and 'onfulfilled' are incompatible. - Type '(value: number) => number | PromiseLike' is not assignable to type '(value: string) => any'. + Type '(value: number) => any' is not assignable to type '(value: string) => any'. Types of parameters 'value' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations3.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -71,15 +71,15 @@ tests/cases/compiler/promisePermutations3.ts(158,21): error TS2345: Argument of tests/cases/compiler/promisePermutations3.ts(159,21): error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'Promise' is not assignable to type 'IPromise'. Types of property 'then' are incompatible. - Type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise'. + Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise'. Types of parameters 'onfulfilled' and 'success' are incompatible. - Type '(value: string) => any' is not assignable to type '(value: number) => number | PromiseLike'. + Type '(value: string) => any' is not assignable to type '(value: number) => any'. Types of parameters 'value' and 'value' are incompatible. Type 'number' is not assignable to type 'string'. tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. Type 'IPromise' is not assignable to type 'Promise'. Types of property 'then' are incompatible. - Type '(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): Promise; (onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: any) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: any) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. + Type '(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: any) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. Type 'IPromise' is not assignable to type 'Promise'. @@ -321,9 +321,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly. !!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. !!! error TS2453: Types of property 'then' are incompatible. -!!! error TS2453: Type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. +!!! error TS2453: Type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. !!! error TS2453: Types of parameters 'success' and 'onfulfilled' are incompatible. -!!! error TS2453: Type '(value: number) => number | PromiseLike' is not assignable to type '(value: string) => any'. +!!! error TS2453: Type '(value: number) => any' is not assignable to type '(value: string) => any'. !!! error TS2453: Types of parameters 'value' and 'value' are incompatible. !!! error TS2453: Type 'string' is not assignable to type 'number'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok @@ -350,9 +350,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2345: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2345: Type 'Promise' is not assignable to type 'IPromise'. !!! error TS2345: Types of property 'then' are incompatible. -!!! error TS2345: Type '{ (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise'. +!!! error TS2345: Type '{ (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }' is not assignable to type '(success?: (value: string) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise'. !!! error TS2345: Types of parameters 'onfulfilled' and 'success' are incompatible. -!!! error TS2345: Type '(value: string) => any' is not assignable to type '(value: number) => number | PromiseLike'. +!!! error TS2345: Type '(value: string) => any' is not assignable to type '(value: number) => any'. !!! error TS2345: Types of parameters 'value' and 'value' are incompatible. !!! error TS2345: Type 'number' is not assignable to type 'string'. @@ -365,6 +365,6 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2345: Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. !!! error TS2345: Type 'IPromise' is not assignable to type 'Promise'. !!! error TS2345: Types of property 'then' are incompatible. -!!! error TS2345: Type '(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): Promise; (onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: any) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: any) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. +!!! error TS2345: Type '(success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise' is not assignable to type '{ (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: any) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => Promise, error?: (error: any) => U, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; (success?: (value: any) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise; }'. !!! error TS2345: Type 'IPromise' is not assignable to type 'Promise'. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/promiseTest.symbols b/tests/baselines/reference/promiseTest.symbols index 547e2de52feb6..f28348cca45d4 100644 --- a/tests/baselines/reference/promiseTest.symbols +++ b/tests/baselines/reference/promiseTest.symbols @@ -5,7 +5,7 @@ interface Promise { >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 18)) then(success?: (value: T) => Promise): Promise; ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 22), Decl(promiseTest.ts, 2, 60)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 22), Decl(promiseTest.ts, 2, 60)) >A : Symbol(A, Decl(promiseTest.ts, 2, 9)) >success : Symbol(success, Decl(promiseTest.ts, 2, 12)) >value : Symbol(value, Decl(promiseTest.ts, 2, 23)) @@ -16,7 +16,7 @@ interface Promise { >A : Symbol(A, Decl(promiseTest.ts, 2, 9)) then(success?: (value: T) => B): Promise; ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 22), Decl(promiseTest.ts, 2, 60)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 22), Decl(promiseTest.ts, 2, 60)) >B : Symbol(B, Decl(promiseTest.ts, 3, 9)) >success : Symbol(success, Decl(promiseTest.ts, 3, 12)) >value : Symbol(value, Decl(promiseTest.ts, 3, 23)) @@ -36,9 +36,9 @@ var p: Promise = null; var p2 = p.then(function (x) { >p2 : Symbol(p2, Decl(promiseTest.ts, 8, 3)) ->p.then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 22), Decl(promiseTest.ts, 2, 60)) +>p.then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 22), Decl(promiseTest.ts, 2, 60)) >p : Symbol(p, Decl(promiseTest.ts, 7, 3)) ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 22), Decl(promiseTest.ts, 2, 60)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promiseTest.ts, 1, 22), Decl(promiseTest.ts, 2, 60)) >x : Symbol(x, Decl(promiseTest.ts, 8, 26)) return p; diff --git a/tests/baselines/reference/promiseTest.types b/tests/baselines/reference/promiseTest.types index fdcc05203f837..d69e1efeb42c7 100644 --- a/tests/baselines/reference/promiseTest.types +++ b/tests/baselines/reference/promiseTest.types @@ -5,7 +5,7 @@ interface Promise { >T : T then(success?: (value: T) => Promise): Promise; ->then : { (onfulfilled?: (value: T) => T | PromiseLike, onrejected?: (reason: any) => T | PromiseLike): Promise; (onfulfilled: (value: T) => T | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => Promise): Promise; (success?: (value: T) => B): Promise; } +>then : { (onfulfilled?: (value: T) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => Promise): Promise; (success?: (value: T) => B): Promise; } >A : A >success : (value: T) => Promise >value : T @@ -16,7 +16,7 @@ interface Promise { >A : A then(success?: (value: T) => B): Promise; ->then : { (onfulfilled?: (value: T) => T | PromiseLike, onrejected?: (reason: any) => T | PromiseLike): Promise; (onfulfilled: (value: T) => T | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => Promise): Promise; (success?: (value: T) => B): Promise; } +>then : { (onfulfilled?: (value: T) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => Promise): Promise; (success?: (value: T) => B): Promise; } >B : B >success : (value: T) => B >value : T @@ -38,9 +38,9 @@ var p: Promise = null; var p2 = p.then(function (x) { >p2 : Promise >p.then(function (x) { return p;} ) : Promise ->p.then : { (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise): Promise; (success?: (value: number) => B): Promise; } +>p.then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise): Promise; (success?: (value: number) => B): Promise; } >p : Promise ->then : { (onfulfilled?: (value: number) => number | PromiseLike, onrejected?: (reason: any) => number | PromiseLike): Promise; (onfulfilled: (value: number) => number | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: number) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise): Promise; (success?: (value: number) => B): Promise; } +>then : { (onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: number) => Promise): Promise; (success?: (value: number) => B): Promise; } >function (x) { return p;} : (x: number) => Promise >x : number diff --git a/tests/baselines/reference/promiseType.js b/tests/baselines/reference/promiseType.js index 4e42ea240733e..d6b82ebb4d505 100644 --- a/tests/baselines/reference/promiseType.js +++ b/tests/baselines/reference/promiseType.js @@ -1,16 +1,6 @@ //// [promiseType.ts] declare var p: Promise; - -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); +declare var x: any; async function A() { const a = await p; @@ -22,17 +12,15 @@ async function B() { return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { + try { + const a = await p; + return 1; + } + catch (e) { + return 'error'; + } +} async function D() { try { @@ -96,64 +84,140 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => {}); -const p04 = p.catch(() => {throw 1}); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); +const p01 = p.then(); -const p10 = p.then(); +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => {}); +const p17 = p.catch(() => {throw 1}); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => {}); -const p23 = p.then(() => {throw 1}); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => {}); +const p27 = p.then(() => {throw 1}); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => {}); -const p33 = p.then(undefined, () => {throw 1}); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => {}); +const p37 = p.then(undefined, () => {throw 1}); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); + +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => {}); +const p47 = p.then(null, () => {throw 1}); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); + +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => {}); +const p57 = p.then(() => "1", () => {throw 1}); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); + +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => {}); +const p67 = p.then(() => x, () => {throw 1}); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => {}); -const p43 = p.then(() => "1", () => {throw 1}); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => {}); +const p77 = p.then(() => undefined, () => {throw 1}); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); -const p50 = p.then(() => {}, undefined); -const p51 = p.then(() => {}, () => 1); -const p52 = p.then(() => {}, () => {}); -const p53 = p.then(() => {}, () => {throw 1}); -const p54 = p.then(() => {}, () => Promise.resolve(1)); -const p55 = p.then(() => {}, () => Promise.reject(1)); +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => {}); +const p87 = p.then(() => null, () => {throw 1}); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); -const p60 = p.then(() => {throw 1}, undefined); -const p61 = p.then(() => {throw 1}, () => 1); -const p62 = p.then(() => {throw 1}, () => {}); -const p63 = p.then(() => {throw 1}, () => {throw 1}); -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); +const p90 = p.then(() => {}, undefined); +const p91 = p.then(() => {}, null); +const p92 = p.then(() => {}, () => 1); +const p93 = p.then(() => {}, () => x); +const p94 = p.then(() => {}, () => undefined); +const p95 = p.then(() => {}, () => null); +const p96 = p.then(() => {}, () => {}); +const p97 = p.then(() => {}, () => {throw 1}); +const p98 = p.then(() => {}, () => Promise.resolve(1)); +const p99 = p.then(() => {}, () => Promise.reject(1)); -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => {}); -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +const pa0 = p.then(() => {throw 1}, undefined); +const pa1 = p.then(() => {throw 1}, null); +const pa2 = p.then(() => {throw 1}, () => 1); +const pa3 = p.then(() => {throw 1}, () => x); +const pa4 = p.then(() => {throw 1}, () => undefined); +const pa5 = p.then(() => {throw 1}, () => null); +const pa6 = p.then(() => {throw 1}, () => {}); +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => {}); -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); + +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => {}); +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); + //// [promiseType.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { @@ -164,16 +228,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); function A() { return __awaiter(this, void 0, void 0, function* () { const a = yield p; @@ -186,17 +240,17 @@ function B() { return 1; }); } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +function C() { + return __awaiter(this, void 0, void 0, function* () { + try { + const a = yield p; + return 1; + } + catch (e) { + return 'error'; + } + }); +} function D() { return __awaiter(this, void 0, void 0, function* () { try { @@ -264,53 +318,124 @@ function I() { } // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => { }); -const p04 = p.catch(() => { throw 1; }); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); -const p10 = p.then(); +const p01 = p.then(); +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => { }); +const p17 = p.catch(() => { throw 1; }); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => { }); -const p23 = p.then(() => { throw 1; }); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => { }); +const p27 = p.then(() => { throw 1; }); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => { }); -const p33 = p.then(undefined, () => { throw 1; }); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => { }); -const p43 = p.then(() => "1", () => { throw 1; }); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); -const p50 = p.then(() => { }, undefined); -const p51 = p.then(() => { }, () => 1); -const p52 = p.then(() => { }, () => { }); -const p53 = p.then(() => { }, () => { throw 1; }); -const p54 = p.then(() => { }, () => Promise.resolve(1)); -const p55 = p.then(() => { }, () => Promise.reject(1)); -const p60 = p.then(() => { throw 1; }, undefined); -const p61 = p.then(() => { throw 1; }, () => 1); -const p62 = p.then(() => { throw 1; }, () => { }); -const p63 = p.then(() => { throw 1; }, () => { throw 1; }); -const p64 = p.then(() => { throw 1; }, () => Promise.resolve(1)); -const p65 = p.then(() => { throw 1; }, () => Promise.reject(1)); -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => { }); -const p73 = p.then(() => Promise.resolve("1"), () => { throw 1; }); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => { }); -const p83 = p.then(() => Promise.reject(1), () => { throw 1; }); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => { }); +const p37 = p.then(undefined, () => { throw 1; }); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => { }); +const p47 = p.then(null, () => { throw 1; }); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => { }); +const p57 = p.then(() => "1", () => { throw 1; }); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => { }); +const p67 = p.then(() => x, () => { throw 1; }); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => { }); +const p77 = p.then(() => undefined, () => { throw 1; }); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => { }); +const p87 = p.then(() => null, () => { throw 1; }); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); +const p90 = p.then(() => { }, undefined); +const p91 = p.then(() => { }, null); +const p92 = p.then(() => { }, () => 1); +const p93 = p.then(() => { }, () => x); +const p94 = p.then(() => { }, () => undefined); +const p95 = p.then(() => { }, () => null); +const p96 = p.then(() => { }, () => { }); +const p97 = p.then(() => { }, () => { throw 1; }); +const p98 = p.then(() => { }, () => Promise.resolve(1)); +const p99 = p.then(() => { }, () => Promise.reject(1)); +const pa0 = p.then(() => { throw 1; }, undefined); +const pa1 = p.then(() => { throw 1; }, null); +const pa2 = p.then(() => { throw 1; }, () => 1); +const pa3 = p.then(() => { throw 1; }, () => x); +const pa4 = p.then(() => { throw 1; }, () => undefined); +const pa5 = p.then(() => { throw 1; }, () => null); +const pa6 = p.then(() => { throw 1; }, () => { }); +const pa7 = p.then(() => { throw 1; }, () => { throw 1; }); +const pa8 = p.then(() => { throw 1; }, () => Promise.resolve(1)); +const pa9 = p.then(() => { throw 1; }, () => Promise.reject(1)); +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => { }); +const pb7 = p.then(() => Promise.resolve("1"), () => { throw 1; }); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => { }); +const pc7 = p.then(() => Promise.reject("1"), () => { throw 1; }); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); diff --git a/tests/baselines/reference/promiseType.symbols b/tests/baselines/reference/promiseType.symbols index 23a9450137186..5320a666413b5 100644 --- a/tests/baselines/reference/promiseType.symbols +++ b/tests/baselines/reference/promiseType.symbols @@ -3,149 +3,74 @@ declare var p: Promise; >p : Symbol(p, Decl(promiseType.ts, 0, 11)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) -const a = p.then(); ->a : Symbol(a, Decl(promiseType.ts, 2, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const b = p.then(b => 1); ->b : Symbol(b, Decl(promiseType.ts, 3, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 3, 17)) - -const c = p.then(b => 1, e => 'error'); ->c : Symbol(c, Decl(promiseType.ts, 4, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 4, 17)) ->e : Symbol(e, Decl(promiseType.ts, 4, 24)) - -const d = p.then(b => 1, e => { }); ->d : Symbol(d, Decl(promiseType.ts, 5, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 5, 17)) ->e : Symbol(e, Decl(promiseType.ts, 5, 24)) - -const e = p.then(b => 1, e => { throw Error(); }); ->e : Symbol(e, Decl(promiseType.ts, 6, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 6, 17)) ->e : Symbol(e, Decl(promiseType.ts, 6, 24)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const f = p.then(b => 1, e => Promise.reject(Error())); ->f : Symbol(f, Decl(promiseType.ts, 7, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 7, 17)) ->e : Symbol(e, Decl(promiseType.ts, 7, 24)) ->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const g = p.catch(e => 'error'); ->g : Symbol(g, Decl(promiseType.ts, 8, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->e : Symbol(e, Decl(promiseType.ts, 8, 18)) - -const h = p.catch(e => { }); ->h : Symbol(h, Decl(promiseType.ts, 9, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->e : Symbol(e, Decl(promiseType.ts, 9, 18)) - -const i = p.catch(e => { throw Error(); }); ->i : Symbol(i, Decl(promiseType.ts, 10, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->e : Symbol(e, Decl(promiseType.ts, 10, 18)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const j = p.catch(e => Promise.reject(Error())); ->j : Symbol(j, Decl(promiseType.ts, 11, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->e : Symbol(e, Decl(promiseType.ts, 11, 18)) ->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +declare var x: any; +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) async function A() { ->A : Symbol(A, Decl(promiseType.ts, 11, 48)) +>A : Symbol(A, Decl(promiseType.ts, 1, 19)) const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 14, 9)) +>a : Symbol(a, Decl(promiseType.ts, 4, 9)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseType.ts, 14, 9)) +>a : Symbol(a, Decl(promiseType.ts, 4, 9)) } async function B() { ->B : Symbol(B, Decl(promiseType.ts, 16, 1)) +>B : Symbol(B, Decl(promiseType.ts, 6, 1)) const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 19, 9)) +>a : Symbol(a, Decl(promiseType.ts, 9, 9)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { +>C : Symbol(C, Decl(promiseType.ts, 11, 1)) + + try { + const a = await p; +>a : Symbol(a, Decl(promiseType.ts, 15, 13)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) + + return 1; + } + catch (e) { +>e : Symbol(e, Decl(promiseType.ts, 18, 11)) + + return 'error'; + } +} async function D() { >D : Symbol(D, Decl(promiseType.ts, 21, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 37, 13)) +>a : Symbol(a, Decl(promiseType.ts, 25, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 40, 11)) +>e : Symbol(e, Decl(promiseType.ts, 28, 11)) } } async function E() { ->E : Symbol(E, Decl(promiseType.ts, 42, 1)) +>E : Symbol(E, Decl(promiseType.ts, 30, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 46, 13)) +>a : Symbol(a, Decl(promiseType.ts, 34, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 49, 11)) +>e : Symbol(e, Decl(promiseType.ts, 37, 11)) throw Error(); >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -153,17 +78,17 @@ async function E() { } async function F() { ->F : Symbol(F, Decl(promiseType.ts, 52, 1)) +>F : Symbol(F, Decl(promiseType.ts, 40, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 56, 13)) +>a : Symbol(a, Decl(promiseType.ts, 44, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 59, 11)) +>e : Symbol(e, Decl(promiseType.ts, 47, 11)) return Promise.reject(Error()); >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -174,36 +99,36 @@ async function F() { } async function G() { ->G : Symbol(G, Decl(promiseType.ts, 62, 1)) +>G : Symbol(G, Decl(promiseType.ts, 50, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 66, 13)) +>a : Symbol(a, Decl(promiseType.ts, 54, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseType.ts, 66, 13)) +>a : Symbol(a, Decl(promiseType.ts, 54, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 69, 11)) +>e : Symbol(e, Decl(promiseType.ts, 57, 11)) return; } } async function H() { ->H : Symbol(H, Decl(promiseType.ts, 72, 1)) +>H : Symbol(H, Decl(promiseType.ts, 60, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 76, 13)) +>a : Symbol(a, Decl(promiseType.ts, 64, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseType.ts, 76, 13)) +>a : Symbol(a, Decl(promiseType.ts, 64, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 79, 11)) +>e : Symbol(e, Decl(promiseType.ts, 67, 11)) throw Error(); >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -211,18 +136,18 @@ async function H() { } async function I() { ->I : Symbol(I, Decl(promiseType.ts, 82, 1)) +>I : Symbol(I, Decl(promiseType.ts, 70, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 86, 13)) +>a : Symbol(a, Decl(promiseType.ts, 74, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseType.ts, 86, 13)) +>a : Symbol(a, Decl(promiseType.ts, 74, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 89, 11)) +>e : Symbol(e, Decl(promiseType.ts, 77, 11)) return Promise.reject(Error()); >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -235,390 +160,916 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); ->p00 : Symbol(p00, Decl(promiseType.ts, 96, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>p00 : Symbol(p00, Decl(promiseType.ts, 84, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) + +const p01 = p.then(); +>p01 : Symbol(p01, Decl(promiseType.ts, 85, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p01 = p.catch(undefined); ->p01 : Symbol(p01, Decl(promiseType.ts, 97, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p10 = p.catch(undefined); +>p10 : Symbol(p10, Decl(promiseType.ts, 87, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p07 = p.catch(null); ->p07 : Symbol(p07, Decl(promiseType.ts, 98, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p11 = p.catch(null); +>p11 : Symbol(p11, Decl(promiseType.ts, 88, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) -const p02 = p.catch(() => 1); ->p02 : Symbol(p02, Decl(promiseType.ts, 99, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p12 = p.catch(() => 1); +>p12 : Symbol(p12, Decl(promiseType.ts, 89, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) -const p03 = p.catch(() => {}); ->p03 : Symbol(p03, Decl(promiseType.ts, 100, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p13 = p.catch(() => x); +>p13 : Symbol(p13, Decl(promiseType.ts, 90, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p04 = p.catch(() => {throw 1}); ->p04 : Symbol(p04, Decl(promiseType.ts, 101, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p14 = p.catch(() => undefined); +>p14 : Symbol(p14, Decl(promiseType.ts, 91, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p15 = p.catch(() => null); +>p15 : Symbol(p15, Decl(promiseType.ts, 92, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) + +const p16 = p.catch(() => {}); +>p16 : Symbol(p16, Decl(promiseType.ts, 93, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) + +const p17 = p.catch(() => {throw 1}); +>p17 : Symbol(p17, Decl(promiseType.ts, 94, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) -const p05 = p.catch(() => Promise.reject(1)); ->p05 : Symbol(p05, Decl(promiseType.ts, 102, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p18 = p.catch(() => Promise.reject(1)); +>p18 : Symbol(p18, Decl(promiseType.ts, 95, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p06 = p.catch(() => Promise.resolve(1)); ->p06 : Symbol(p06, Decl(promiseType.ts, 103, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p19 = p.catch(() => Promise.resolve(1)); +>p19 : Symbol(p19, Decl(promiseType.ts, 96, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p10 = p.then(); ->p10 : Symbol(p10, Decl(promiseType.ts, 105, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p20 = p.then(undefined); +>p20 : Symbol(p20, Decl(promiseType.ts, 98, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) -const p20 = p.then(undefined); ->p20 : Symbol(p20, Decl(promiseType.ts, 107, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p21 = p.then(null); +>p21 : Symbol(p21, Decl(promiseType.ts, 99, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p22 = p.then(() => 1); +>p22 : Symbol(p22, Decl(promiseType.ts, 100, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p23 = p.then(() => x); +>p23 : Symbol(p23, Decl(promiseType.ts, 101, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p24 = p.then(() => undefined); +>p24 : Symbol(p24, Decl(promiseType.ts, 102, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p21 = p.then(() => 1); ->p21 : Symbol(p21, Decl(promiseType.ts, 108, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p25 = p.then(() => null); +>p25 : Symbol(p25, Decl(promiseType.ts, 103, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p22 = p.then(() => {}); ->p22 : Symbol(p22, Decl(promiseType.ts, 109, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p26 = p.then(() => {}); +>p26 : Symbol(p26, Decl(promiseType.ts, 104, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p23 = p.then(() => {throw 1}); ->p23 : Symbol(p23, Decl(promiseType.ts, 110, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p27 = p.then(() => {throw 1}); +>p27 : Symbol(p27, Decl(promiseType.ts, 105, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p24 = p.then(() => Promise.resolve(1)); ->p24 : Symbol(p24, Decl(promiseType.ts, 111, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p28 = p.then(() => Promise.resolve(1)); +>p28 : Symbol(p28, Decl(promiseType.ts, 106, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p25 = p.then(() => Promise.reject(1)); ->p25 : Symbol(p25, Decl(promiseType.ts, 112, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p29 = p.then(() => Promise.reject(1)); +>p29 : Symbol(p29, Decl(promiseType.ts, 107, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) const p30 = p.then(undefined, undefined); ->p30 : Symbol(p30, Decl(promiseType.ts, 114, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>p30 : Symbol(p30, Decl(promiseType.ts, 109, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p31 = p.then(undefined, null); +>p31 : Symbol(p31, Decl(promiseType.ts, 110, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p32 = p.then(undefined, () => 1); +>p32 : Symbol(p32, Decl(promiseType.ts, 111, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p33 = p.then(undefined, () => x); +>p33 : Symbol(p33, Decl(promiseType.ts, 112, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p34 = p.then(undefined, () => undefined); +>p34 : Symbol(p34, Decl(promiseType.ts, 113, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p35 = p.then(undefined, () => null); +>p35 : Symbol(p35, Decl(promiseType.ts, 114, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p36 = p.then(undefined, () => {}); +>p36 : Symbol(p36, Decl(promiseType.ts, 115, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p37 = p.then(undefined, () => {throw 1}); +>p37 : Symbol(p37, Decl(promiseType.ts, 116, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p38 = p.then(undefined, () => Promise.resolve(1)); +>p38 : Symbol(p38, Decl(promiseType.ts, 117, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p39 = p.then(undefined, () => Promise.reject(1)); +>p39 : Symbol(p39, Decl(promiseType.ts, 118, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p40 = p.then(null, undefined); +>p40 : Symbol(p40, Decl(promiseType.ts, 120, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p41 = p.then(null, null); +>p41 : Symbol(p41, Decl(promiseType.ts, 121, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p42 = p.then(null, () => 1); +>p42 : Symbol(p42, Decl(promiseType.ts, 122, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p43 = p.then(null, () => x); +>p43 : Symbol(p43, Decl(promiseType.ts, 123, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p44 = p.then(null, () => undefined); +>p44 : Symbol(p44, Decl(promiseType.ts, 124, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p45 = p.then(null, () => null); +>p45 : Symbol(p45, Decl(promiseType.ts, 125, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p46 = p.then(null, () => {}); +>p46 : Symbol(p46, Decl(promiseType.ts, 126, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p47 = p.then(null, () => {throw 1}); +>p47 : Symbol(p47, Decl(promiseType.ts, 127, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p48 = p.then(null, () => Promise.resolve(1)); +>p48 : Symbol(p48, Decl(promiseType.ts, 128, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p49 = p.then(null, () => Promise.reject(1)); +>p49 : Symbol(p49, Decl(promiseType.ts, 129, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p50 = p.then(() => "1", undefined); +>p50 : Symbol(p50, Decl(promiseType.ts, 131, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p51 = p.then(() => "1", null); +>p51 : Symbol(p51, Decl(promiseType.ts, 132, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p52 = p.then(() => "1", () => 1); +>p52 : Symbol(p52, Decl(promiseType.ts, 133, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p53 = p.then(() => "1", () => x); +>p53 : Symbol(p53, Decl(promiseType.ts, 134, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p54 = p.then(() => "1", () => undefined); +>p54 : Symbol(p54, Decl(promiseType.ts, 135, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p55 = p.then(() => "1", () => null); +>p55 : Symbol(p55, Decl(promiseType.ts, 136, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p56 = p.then(() => "1", () => {}); +>p56 : Symbol(p56, Decl(promiseType.ts, 137, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p57 = p.then(() => "1", () => {throw 1}); +>p57 : Symbol(p57, Decl(promiseType.ts, 138, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p58 = p.then(() => "1", () => Promise.resolve(1)); +>p58 : Symbol(p58, Decl(promiseType.ts, 139, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p59 = p.then(() => "1", () => Promise.reject(1)); +>p59 : Symbol(p59, Decl(promiseType.ts, 140, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p60 = p.then(() => x, undefined); +>p60 : Symbol(p60, Decl(promiseType.ts, 142, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>undefined : Symbol(undefined) + +const p61 = p.then(() => x, null); +>p61 : Symbol(p61, Decl(promiseType.ts, 143, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p62 = p.then(() => x, () => 1); +>p62 : Symbol(p62, Decl(promiseType.ts, 144, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p63 = p.then(() => x, () => x); +>p63 : Symbol(p63, Decl(promiseType.ts, 145, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p64 = p.then(() => x, () => undefined); +>p64 : Symbol(p64, Decl(promiseType.ts, 146, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>undefined : Symbol(undefined) + +const p65 = p.then(() => x, () => null); +>p65 : Symbol(p65, Decl(promiseType.ts, 147, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p66 = p.then(() => x, () => {}); +>p66 : Symbol(p66, Decl(promiseType.ts, 148, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p67 = p.then(() => x, () => {throw 1}); +>p67 : Symbol(p67, Decl(promiseType.ts, 149, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p68 = p.then(() => x, () => Promise.resolve(1)); +>p68 : Symbol(p68, Decl(promiseType.ts, 150, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p69 = p.then(() => x, () => Promise.reject(1)); +>p69 : Symbol(p69, Decl(promiseType.ts, 151, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p70 = p.then(() => undefined, undefined); +>p70 : Symbol(p70, Decl(promiseType.ts, 153, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) >undefined : Symbol(undefined) -const p31 = p.then(undefined, () => 1); ->p31 : Symbol(p31, Decl(promiseType.ts, 115, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p71 = p.then(() => undefined, null); +>p71 : Symbol(p71, Decl(promiseType.ts, 154, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p32 = p.then(undefined, () => {}); ->p32 : Symbol(p32, Decl(promiseType.ts, 116, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p72 = p.then(() => undefined, () => 1); +>p72 : Symbol(p72, Decl(promiseType.ts, 155, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p33 = p.then(undefined, () => {throw 1}); ->p33 : Symbol(p33, Decl(promiseType.ts, 117, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p73 = p.then(() => undefined, () => x); +>p73 : Symbol(p73, Decl(promiseType.ts, 156, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p34 = p.then(undefined, () => Promise.resolve(1)); ->p34 : Symbol(p34, Decl(promiseType.ts, 118, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p74 = p.then(() => undefined, () => undefined); +>p74 : Symbol(p74, Decl(promiseType.ts, 157, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p75 = p.then(() => undefined, () => null); +>p75 : Symbol(p75, Decl(promiseType.ts, 158, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p76 = p.then(() => undefined, () => {}); +>p76 : Symbol(p76, Decl(promiseType.ts, 159, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p77 = p.then(() => undefined, () => {throw 1}); +>p77 : Symbol(p77, Decl(promiseType.ts, 160, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +>p78 : Symbol(p78, Decl(promiseType.ts, 161, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p35 = p.then(undefined, () => Promise.reject(1)); ->p35 : Symbol(p35, Decl(promiseType.ts, 119, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p79 = p.then(() => undefined, () => Promise.reject(1)); +>p79 : Symbol(p79, Decl(promiseType.ts, 162, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p40 = p.then(() => "1", undefined); ->p40 : Symbol(p40, Decl(promiseType.ts, 121, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p80 = p.then(() => null, undefined); +>p80 : Symbol(p80, Decl(promiseType.ts, 164, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p41 = p.then(() => "1", () => 1); ->p41 : Symbol(p41, Decl(promiseType.ts, 122, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p81 = p.then(() => null, null); +>p81 : Symbol(p81, Decl(promiseType.ts, 165, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p42 = p.then(() => "1", () => {}); ->p42 : Symbol(p42, Decl(promiseType.ts, 123, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p82 = p.then(() => null, () => 1); +>p82 : Symbol(p82, Decl(promiseType.ts, 166, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p43 = p.then(() => "1", () => {throw 1}); ->p43 : Symbol(p43, Decl(promiseType.ts, 124, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p83 = p.then(() => null, () => x); +>p83 : Symbol(p83, Decl(promiseType.ts, 167, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p44 = p.then(() => "1", () => Promise.resolve(1)); ->p44 : Symbol(p44, Decl(promiseType.ts, 125, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p84 = p.then(() => null, () => undefined); +>p84 : Symbol(p84, Decl(promiseType.ts, 168, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p85 = p.then(() => null, () => null); +>p85 : Symbol(p85, Decl(promiseType.ts, 169, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p86 = p.then(() => null, () => {}); +>p86 : Symbol(p86, Decl(promiseType.ts, 170, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p87 = p.then(() => null, () => {throw 1}); +>p87 : Symbol(p87, Decl(promiseType.ts, 171, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p88 = p.then(() => null, () => Promise.resolve(1)); +>p88 : Symbol(p88, Decl(promiseType.ts, 172, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p45 = p.then(() => "1", () => Promise.reject(1)); ->p45 : Symbol(p45, Decl(promiseType.ts, 126, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p89 = p.then(() => null, () => Promise.reject(1)); +>p89 : Symbol(p89, Decl(promiseType.ts, 173, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p50 = p.then(() => {}, undefined); ->p50 : Symbol(p50, Decl(promiseType.ts, 128, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p90 = p.then(() => {}, undefined); +>p90 : Symbol(p90, Decl(promiseType.ts, 175, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p51 = p.then(() => {}, () => 1); ->p51 : Symbol(p51, Decl(promiseType.ts, 129, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p91 = p.then(() => {}, null); +>p91 : Symbol(p91, Decl(promiseType.ts, 176, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p52 = p.then(() => {}, () => {}); ->p52 : Symbol(p52, Decl(promiseType.ts, 130, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p92 = p.then(() => {}, () => 1); +>p92 : Symbol(p92, Decl(promiseType.ts, 177, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p53 = p.then(() => {}, () => {throw 1}); ->p53 : Symbol(p53, Decl(promiseType.ts, 131, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p93 = p.then(() => {}, () => x); +>p93 : Symbol(p93, Decl(promiseType.ts, 178, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p54 = p.then(() => {}, () => Promise.resolve(1)); ->p54 : Symbol(p54, Decl(promiseType.ts, 132, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p94 = p.then(() => {}, () => undefined); +>p94 : Symbol(p94, Decl(promiseType.ts, 179, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p95 = p.then(() => {}, () => null); +>p95 : Symbol(p95, Decl(promiseType.ts, 180, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p96 = p.then(() => {}, () => {}); +>p96 : Symbol(p96, Decl(promiseType.ts, 181, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p97 = p.then(() => {}, () => {throw 1}); +>p97 : Symbol(p97, Decl(promiseType.ts, 182, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p98 = p.then(() => {}, () => Promise.resolve(1)); +>p98 : Symbol(p98, Decl(promiseType.ts, 183, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p55 = p.then(() => {}, () => Promise.reject(1)); ->p55 : Symbol(p55, Decl(promiseType.ts, 133, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p99 = p.then(() => {}, () => Promise.reject(1)); +>p99 : Symbol(p99, Decl(promiseType.ts, 184, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p60 = p.then(() => {throw 1}, undefined); ->p60 : Symbol(p60, Decl(promiseType.ts, 135, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa0 = p.then(() => {throw 1}, undefined); +>pa0 : Symbol(pa0, Decl(promiseType.ts, 186, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p61 = p.then(() => {throw 1}, () => 1); ->p61 : Symbol(p61, Decl(promiseType.ts, 136, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa1 = p.then(() => {throw 1}, null); +>pa1 : Symbol(pa1, Decl(promiseType.ts, 187, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const pa2 = p.then(() => {throw 1}, () => 1); +>pa2 : Symbol(pa2, Decl(promiseType.ts, 188, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p62 = p.then(() => {throw 1}, () => {}); ->p62 : Symbol(p62, Decl(promiseType.ts, 137, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa3 = p.then(() => {throw 1}, () => x); +>pa3 : Symbol(pa3, Decl(promiseType.ts, 189, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p63 = p.then(() => {throw 1}, () => {throw 1}); ->p63 : Symbol(p63, Decl(promiseType.ts, 138, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa4 = p.then(() => {throw 1}, () => undefined); +>pa4 : Symbol(pa4, Decl(promiseType.ts, 190, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); ->p64 : Symbol(p64, Decl(promiseType.ts, 139, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa5 = p.then(() => {throw 1}, () => null); +>pa5 : Symbol(pa5, Decl(promiseType.ts, 191, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const pa6 = p.then(() => {throw 1}, () => {}); +>pa6 : Symbol(pa6, Decl(promiseType.ts, 192, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +>pa7 : Symbol(pa7, Decl(promiseType.ts, 193, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +>pa8 : Symbol(pa8, Decl(promiseType.ts, 194, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); ->p65 : Symbol(p65, Decl(promiseType.ts, 140, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); +>pa9 : Symbol(pa9, Decl(promiseType.ts, 195, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p70 = p.then(() => Promise.resolve("1"), undefined); ->p70 : Symbol(p70, Decl(promiseType.ts, 142, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb0 = p.then(() => Promise.resolve("1"), undefined); +>pb0 : Symbol(pb0, Decl(promiseType.ts, 197, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p71 = p.then(() => Promise.resolve("1"), () => 1); ->p71 : Symbol(p71, Decl(promiseType.ts, 143, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb1 = p.then(() => Promise.resolve("1"), null); +>pb1 : Symbol(pb1, Decl(promiseType.ts, 198, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +>pb2 : Symbol(pb2, Decl(promiseType.ts, 199, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p72 = p.then(() => Promise.resolve("1"), () => {}); ->p72 : Symbol(p72, Decl(promiseType.ts, 144, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb3 = p.then(() => Promise.resolve("1"), () => x); +>pb3 : Symbol(pb3, Decl(promiseType.ts, 200, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); ->p73 : Symbol(p73, Decl(promiseType.ts, 145, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +>pb4 : Symbol(pb4, Decl(promiseType.ts, 201, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); ->p74 : Symbol(p74, Decl(promiseType.ts, 146, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb5 = p.then(() => Promise.resolve("1"), () => null); +>pb5 : Symbol(pb5, Decl(promiseType.ts, 202, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +>pb6 : Symbol(pb6, Decl(promiseType.ts, 203, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); ->p75 : Symbol(p75, Decl(promiseType.ts, 147, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +>pb7 : Symbol(pb7, Decl(promiseType.ts, 204, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +>pb8 : Symbol(pb8, Decl(promiseType.ts, 205, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +>pb9 : Symbol(pb9, Decl(promiseType.ts, 206, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc0 = p.then(() => Promise.reject("1"), undefined); +>pc0 : Symbol(pc0, Decl(promiseType.ts, 208, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const pc1 = p.then(() => Promise.reject("1"), null); +>pc1 : Symbol(pc1, Decl(promiseType.ts, 209, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc2 = p.then(() => Promise.reject("1"), () => 1); +>pc2 : Symbol(pc2, Decl(promiseType.ts, 210, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc3 = p.then(() => Promise.reject("1"), () => x); +>pc3 : Symbol(pc3, Decl(promiseType.ts, 211, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p80 = p.then(() => Promise.reject(1), undefined); ->p80 : Symbol(p80, Decl(promiseType.ts, 149, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +>pc4 : Symbol(pc4, Decl(promiseType.ts, 212, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p81 = p.then(() => Promise.reject(1), () => 1); ->p81 : Symbol(p81, Decl(promiseType.ts, 150, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc5 = p.then(() => Promise.reject("1"), () => null); +>pc5 : Symbol(pc5, Decl(promiseType.ts, 213, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p82 = p.then(() => Promise.reject(1), () => {}); ->p82 : Symbol(p82, Decl(promiseType.ts, 151, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc6 = p.then(() => Promise.reject("1"), () => {}); +>pc6 : Symbol(pc6, Decl(promiseType.ts, 214, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); ->p83 : Symbol(p83, Decl(promiseType.ts, 152, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +>pc7 : Symbol(pc7, Decl(promiseType.ts, 215, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); ->p84 : Symbol(p84, Decl(promiseType.ts, 153, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +>pc8 : Symbol(pc8, Decl(promiseType.ts, 216, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -626,11 +1077,11 @@ const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); ->p85 : Symbol(p85, Decl(promiseType.ts, 154, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); +>pc9 : Symbol(pc9, Decl(promiseType.ts, 217, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/promiseType.types b/tests/baselines/reference/promiseType.types index 3d055f73f0a9a..3228d266319f5 100644 --- a/tests/baselines/reference/promiseType.types +++ b/tests/baselines/reference/promiseType.types @@ -3,124 +3,8 @@ declare var p: Promise; >p : Promise >Promise : Promise -const a = p.then(); ->a : Promise ->p.then() : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } - -const b = p.then(b => 1); ->b : Promise<1> ->p.then(b => 1) : Promise<1> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 - -const c = p.then(b => 1, e => 'error'); ->c : Promise ->p.then(b => 1, e => 'error') : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => 'error' : (e: any) => string ->e : any ->'error' : "error" - -const d = p.then(b => 1, e => { }); ->d : Promise ->p.then(b => 1, e => { }) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => { } : (e: any) => void ->e : any - -const e = p.then(b => 1, e => { throw Error(); }); ->e : Promise<1> ->p.then(b => 1, e => { throw Error(); }) : Promise<1> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => { throw Error(); } : (e: any) => never ->e : any ->Error() : Error ->Error : ErrorConstructor - -const f = p.then(b => 1, e => Promise.reject(Error())); ->f : Promise<1> ->p.then(b => 1, e => Promise.reject(Error())) : Promise<1> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => Promise.reject(Error()) : (e: any) => Promise ->e : any ->Promise.reject(Error()) : Promise ->Promise.reject : { (reason: any): Promise; (reason: any): Promise; } ->Promise : PromiseConstructor ->reject : { (reason: any): Promise; (reason: any): Promise; } ->Error() : Error ->Error : ErrorConstructor - -const g = p.catch(e => 'error'); ->g : Promise ->p.catch(e => 'error') : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => 'error' : (e: any) => "error" ->e : any ->'error' : "error" - -const h = p.catch(e => { }); ->h : Promise ->p.catch(e => { }) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => { } : (e: any) => void ->e : any - -const i = p.catch(e => { throw Error(); }); ->i : Promise ->p.catch(e => { throw Error(); }) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => { throw Error(); } : (e: any) => never ->e : any ->Error() : Error ->Error : ErrorConstructor - -const j = p.catch(e => Promise.reject(Error())); ->j : Promise ->p.catch(e => Promise.reject(Error())) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => Promise.reject(Error()) : (e: any) => Promise ->e : any ->Promise.reject(Error()) : Promise ->Promise.reject : { (reason: any): Promise; (reason: any): Promise; } ->Promise : PromiseConstructor ->reject : { (reason: any): Promise; (reason: any): Promise; } ->Error() : Error ->Error : ErrorConstructor +declare var x: any; +>x : any async function A() { >A : () => Promise @@ -146,17 +30,25 @@ async function B() { >1 : 1 } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { +>C : () => Promise<1 | "error"> + + try { + const a = await p; +>a : boolean +>await p : boolean +>p : Promise + + return 1; +>1 : 1 + } + catch (e) { +>e : any + + return 'error'; +>'error' : "error" + } +} async function D() { >D : () => Promise @@ -291,58 +183,92 @@ async function I() { const p00 = p.catch(); >p00 : Promise >p.catch() : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise -const p01 = p.catch(undefined); +const p01 = p.then(); >p01 : Promise +>p.then() : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise + +const p10 = p.catch(undefined); +>p10 : Promise >p.catch(undefined) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >undefined : undefined -const p07 = p.catch(null); ->p07 : Promise +const p11 = p.catch(null); +>p11 : Promise >p.catch(null) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >null : null -const p02 = p.catch(() => 1); ->p02 : Promise ->p.catch(() => 1) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +const p12 = p.catch(() => 1); +>p12 : Promise +>p.catch(() => 1) : Promise +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->() => 1 : () => 1 +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>() => 1 : () => number >1 : 1 -const p03 = p.catch(() => {}); ->p03 : Promise +const p13 = p.catch(() => x); +>p13 : Promise +>p.catch(() => x) : Promise +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>p : Promise +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>() => x : () => any +>x : any + +const p14 = p.catch(() => undefined); +>p14 : Promise +>p.catch(() => undefined) : Promise +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>p : Promise +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined + +const p15 = p.catch(() => null); +>p15 : Promise +>p.catch(() => null) : Promise +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>p : Promise +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>() => null : () => any +>null : null + +const p16 = p.catch(() => {}); +>p16 : Promise >p.catch(() => {}) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >() => {} : () => void -const p04 = p.catch(() => {throw 1}); ->p04 : Promise +const p17 = p.catch(() => {throw 1}); +>p17 : Promise >p.catch(() => {throw 1}) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 -const p05 = p.catch(() => Promise.reject(1)); ->p05 : Promise +const p18 = p.catch(() => Promise.reject(1)); +>p18 : Promise >p.catch(() => Promise.reject(1)) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } @@ -350,12 +276,12 @@ const p05 = p.catch(() => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p06 = p.catch(() => Promise.resolve(1)); ->p06 : Promise +const p19 = p.catch(() => Promise.resolve(1)); +>p19 : Promise >p.catch(() => Promise.resolve(1)) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -363,53 +289,81 @@ const p06 = p.catch(() => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p10 = p.then(); ->p10 : Promise ->p.then() : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } - const p20 = p.then(undefined); >p20 : Promise >p.then(undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined -const p21 = p.then(() => 1); ->p21 : Promise<1> ->p.then(() => 1) : Promise<1> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p21 = p.then(null); +>p21 : Promise +>p.then(null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null + +const p22 = p.then(() => 1); +>p22 : Promise +>p.then(() => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => 1 : () => 1 +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => 1 : () => number >1 : 1 -const p22 = p.then(() => {}); ->p22 : Promise +const p23 = p.then(() => x); +>p23 : Promise +>p.then(() => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any + +const p24 = p.then(() => undefined); +>p24 : Promise +>p.then(() => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined + +const p25 = p.then(() => null); +>p25 : Promise +>p.then(() => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null + +const p26 = p.then(() => {}); +>p26 : Promise >p.then(() => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void -const p23 = p.then(() => {throw 1}); ->p23 : Promise ->p.then(() => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p27 = p.then(() => {throw 1}); +>p27 : Promise +>p.then(() => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 -const p24 = p.then(() => Promise.resolve(1)); ->p24 : Promise +const p28 = p.then(() => Promise.resolve(1)); +>p28 : Promise >p.then(() => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -417,12 +371,12 @@ const p24 = p.then(() => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p25 = p.then(() => Promise.reject(1)); ->p25 : Promise ->p.then(() => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p29 = p.then(() => Promise.reject(1)); +>p29 : Promise +>p.then(() => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } @@ -433,47 +387,86 @@ const p25 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); >p30 : Promise >p.then(undefined, undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >undefined : undefined -const p31 = p.then(undefined, () => 1); ->p31 : Promise ->p.then(undefined, () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p31 = p.then(undefined, null); +>p31 : Promise +>p.then(undefined, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined ->() => 1 : () => 1 +>null : null + +const p32 = p.then(undefined, () => 1); +>p32 : Promise +>p.then(undefined, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>undefined : undefined +>() => 1 : () => number >1 : 1 -const p32 = p.then(undefined, () => {}); ->p32 : Promise +const p33 = p.then(undefined, () => x); +>p33 : Promise +>p.then(undefined, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>undefined : undefined +>() => x : () => any +>x : any + +const p34 = p.then(undefined, () => undefined); +>p34 : Promise +>p.then(undefined, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>undefined : undefined +>() => undefined : () => any +>undefined : undefined + +const p35 = p.then(undefined, () => null); +>p35 : Promise +>p.then(undefined, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>undefined : undefined +>() => null : () => any +>null : null + +const p36 = p.then(undefined, () => {}); +>p36 : Promise >p.then(undefined, () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >() => {} : () => void -const p33 = p.then(undefined, () => {throw 1}); ->p33 : Promise +const p37 = p.then(undefined, () => {throw 1}); +>p37 : Promise >p.then(undefined, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >() => {throw 1} : () => never >1 : 1 -const p34 = p.then(undefined, () => Promise.resolve(1)); ->p34 : Promise +const p38 = p.then(undefined, () => Promise.resolve(1)); +>p38 : Promise >p.then(undefined, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -482,12 +475,12 @@ const p34 = p.then(undefined, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p35 = p.then(undefined, () => Promise.reject(1)); ->p35 : Promise +const p39 = p.then(undefined, () => Promise.reject(1)); +>p39 : Promise >p.then(undefined, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -496,55 +489,203 @@ const p35 = p.then(undefined, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p40 = p.then(() => "1", undefined); ->p40 : Promise<"1"> ->p.then(() => "1", undefined) : Promise<"1"> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p40 = p.then(null, undefined); +>p40 : Promise +>p.then(null, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>undefined : undefined + +const p41 = p.then(null, null); +>p41 : Promise +>p.then(null, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>null : null + +const p42 = p.then(null, () => 1); +>p42 : Promise +>p.then(null, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => 1 : () => number +>1 : 1 + +const p43 = p.then(null, () => x); +>p43 : Promise +>p.then(null, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => x : () => any +>x : any + +const p44 = p.then(null, () => undefined); +>p44 : Promise +>p.then(null, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => undefined : () => any +>undefined : undefined + +const p45 = p.then(null, () => null); +>p45 : Promise +>p.then(null, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => null : () => any +>null : null + +const p46 = p.then(null, () => {}); +>p46 : Promise +>p.then(null, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => {} : () => void + +const p47 = p.then(null, () => {throw 1}); +>p47 : Promise +>p.then(null, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => {throw 1} : () => never +>1 : 1 + +const p48 = p.then(null, () => Promise.resolve(1)); +>p48 : Promise +>p.then(null, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p49 = p.then(null, () => Promise.reject(1)); +>p49 : Promise +>p.then(null, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p50 = p.then(() => "1", undefined); +>p50 : Promise +>p.then(() => "1", undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >undefined : undefined -const p41 = p.then(() => "1", () => 1); ->p41 : Promise ->p.then(() => "1", () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p51 = p.then(() => "1", null); +>p51 : Promise +>p.then(() => "1", null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string +>"1" : "1" +>null : null + +const p52 = p.then(() => "1", () => 1); +>p52 : Promise +>p.then(() => "1", () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => 1 : () => number >1 : 1 -const p42 = p.then(() => "1", () => {}); ->p42 : Promise ->p.then(() => "1", () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p53 = p.then(() => "1", () => x); +>p53 : Promise +>p.then(() => "1", () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string +>"1" : "1" +>() => x : () => any +>x : any + +const p54 = p.then(() => "1", () => undefined); +>p54 : Promise +>p.then(() => "1", () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string +>"1" : "1" +>() => undefined : () => any +>undefined : undefined + +const p55 = p.then(() => "1", () => null); +>p55 : Promise +>p.then(() => "1", () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string +>"1" : "1" +>() => null : () => any +>null : null + +const p56 = p.then(() => "1", () => {}); +>p56 : Promise +>p.then(() => "1", () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => {} : () => void -const p43 = p.then(() => "1", () => {throw 1}); ->p43 : Promise<"1"> ->p.then(() => "1", () => {throw 1}) : Promise<"1"> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p57 = p.then(() => "1", () => {throw 1}); +>p57 : Promise +>p.then(() => "1", () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => {throw 1} : () => never >1 : 1 -const p44 = p.then(() => "1", () => Promise.resolve(1)); ->p44 : Promise ->p.then(() => "1", () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p58 = p.then(() => "1", () => Promise.resolve(1)); +>p58 : Promise +>p.then(() => "1", () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -553,13 +694,13 @@ const p44 = p.then(() => "1", () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p45 = p.then(() => "1", () => Promise.reject(1)); ->p45 : Promise<"1"> ->p.then(() => "1", () => Promise.reject(1)) : Promise<"1"> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p59 = p.then(() => "1", () => Promise.reject(1)); +>p59 : Promise +>p.then(() => "1", () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -568,50 +709,434 @@ const p45 = p.then(() => "1", () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p50 = p.then(() => {}, undefined); ->p50 : Promise +const p60 = p.then(() => x, undefined); +>p60 : Promise +>p.then(() => x, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>undefined : undefined + +const p61 = p.then(() => x, null); +>p61 : Promise +>p.then(() => x, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>null : null + +const p62 = p.then(() => x, () => 1); +>p62 : Promise +>p.then(() => x, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => 1 : () => number +>1 : 1 + +const p63 = p.then(() => x, () => x); +>p63 : Promise +>p.then(() => x, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => x : () => any +>x : any + +const p64 = p.then(() => x, () => undefined); +>p64 : Promise +>p.then(() => x, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => undefined : () => any +>undefined : undefined + +const p65 = p.then(() => x, () => null); +>p65 : Promise +>p.then(() => x, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => null : () => any +>null : null + +const p66 = p.then(() => x, () => {}); +>p66 : Promise +>p.then(() => x, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => {} : () => void + +const p67 = p.then(() => x, () => {throw 1}); +>p67 : Promise +>p.then(() => x, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => {throw 1} : () => never +>1 : 1 + +const p68 = p.then(() => x, () => Promise.resolve(1)); +>p68 : Promise +>p.then(() => x, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p69 = p.then(() => x, () => Promise.reject(1)); +>p69 : Promise +>p.then(() => x, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p70 = p.then(() => undefined, undefined); +>p70 : Promise +>p.then(() => undefined, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>undefined : undefined + +const p71 = p.then(() => undefined, null); +>p71 : Promise +>p.then(() => undefined, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>null : null + +const p72 = p.then(() => undefined, () => 1); +>p72 : Promise +>p.then(() => undefined, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => 1 : () => number +>1 : 1 + +const p73 = p.then(() => undefined, () => x); +>p73 : Promise +>p.then(() => undefined, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => x : () => any +>x : any + +const p74 = p.then(() => undefined, () => undefined); +>p74 : Promise +>p.then(() => undefined, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => undefined : () => any +>undefined : undefined + +const p75 = p.then(() => undefined, () => null); +>p75 : Promise +>p.then(() => undefined, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => null : () => any +>null : null + +const p76 = p.then(() => undefined, () => {}); +>p76 : Promise +>p.then(() => undefined, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => {} : () => void + +const p77 = p.then(() => undefined, () => {throw 1}); +>p77 : Promise +>p.then(() => undefined, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => {throw 1} : () => never +>1 : 1 + +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +>p78 : Promise +>p.then(() => undefined, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p79 = p.then(() => undefined, () => Promise.reject(1)); +>p79 : Promise +>p.then(() => undefined, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p80 = p.then(() => null, undefined); +>p80 : Promise +>p.then(() => null, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>undefined : undefined + +const p81 = p.then(() => null, null); +>p81 : Promise +>p.then(() => null, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>null : null + +const p82 = p.then(() => null, () => 1); +>p82 : Promise +>p.then(() => null, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => 1 : () => number +>1 : 1 + +const p83 = p.then(() => null, () => x); +>p83 : Promise +>p.then(() => null, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => x : () => any +>x : any + +const p84 = p.then(() => null, () => undefined); +>p84 : Promise +>p.then(() => null, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => undefined : () => any +>undefined : undefined + +const p85 = p.then(() => null, () => null); +>p85 : Promise +>p.then(() => null, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => null : () => any +>null : null + +const p86 = p.then(() => null, () => {}); +>p86 : Promise +>p.then(() => null, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => {} : () => void + +const p87 = p.then(() => null, () => {throw 1}); +>p87 : Promise +>p.then(() => null, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => {throw 1} : () => never +>1 : 1 + +const p88 = p.then(() => null, () => Promise.resolve(1)); +>p88 : Promise +>p.then(() => null, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p89 = p.then(() => null, () => Promise.reject(1)); +>p89 : Promise +>p.then(() => null, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p90 = p.then(() => {}, undefined); +>p90 : Promise >p.then(() => {}, undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >undefined : undefined -const p51 = p.then(() => {}, () => 1); ->p51 : Promise +const p91 = p.then(() => {}, null); +>p91 : Promise +>p.then(() => {}, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {} : () => void +>null : null + +const p92 = p.then(() => {}, () => 1); +>p92 : Promise >p.then(() => {}, () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => 1 : () => number >1 : 1 -const p52 = p.then(() => {}, () => {}); ->p52 : Promise +const p93 = p.then(() => {}, () => x); +>p93 : Promise +>p.then(() => {}, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {} : () => void +>() => x : () => any +>x : any + +const p94 = p.then(() => {}, () => undefined); +>p94 : Promise +>p.then(() => {}, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {} : () => void +>() => undefined : () => any +>undefined : undefined + +const p95 = p.then(() => {}, () => null); +>p95 : Promise +>p.then(() => {}, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {} : () => void +>() => null : () => any +>null : null + +const p96 = p.then(() => {}, () => {}); +>p96 : Promise >p.then(() => {}, () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => {} : () => void -const p53 = p.then(() => {}, () => {throw 1}); ->p53 : Promise +const p97 = p.then(() => {}, () => {throw 1}); +>p97 : Promise >p.then(() => {}, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => {throw 1} : () => never >1 : 1 -const p54 = p.then(() => {}, () => Promise.resolve(1)); ->p54 : Promise +const p98 = p.then(() => {}, () => Promise.resolve(1)); +>p98 : Promise >p.then(() => {}, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -620,12 +1145,12 @@ const p54 = p.then(() => {}, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p55 = p.then(() => {}, () => Promise.reject(1)); ->p55 : Promise +const p99 = p.then(() => {}, () => Promise.reject(1)); +>p99 : Promise >p.then(() => {}, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -634,54 +1159,97 @@ const p55 = p.then(() => {}, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p60 = p.then(() => {throw 1}, undefined); ->p60 : Promise ->p.then(() => {throw 1}, undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa0 = p.then(() => {throw 1}, undefined); +>pa0 : Promise +>p.then(() => {throw 1}, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >undefined : undefined -const p61 = p.then(() => {throw 1}, () => 1); ->p61 : Promise ->p.then(() => {throw 1}, () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa1 = p.then(() => {throw 1}, null); +>pa1 : Promise +>p.then(() => {throw 1}, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {throw 1} : () => never +>1 : 1 +>null : null + +const pa2 = p.then(() => {throw 1}, () => 1); +>pa2 : Promise +>p.then(() => {throw 1}, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {throw 1} : () => never +>1 : 1 +>() => 1 : () => number +>1 : 1 + +const pa3 = p.then(() => {throw 1}, () => x); +>pa3 : Promise +>p.then(() => {throw 1}, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 ->() => 1 : () => 1 +>() => x : () => any +>x : any + +const pa4 = p.then(() => {throw 1}, () => undefined); +>pa4 : Promise +>p.then(() => {throw 1}, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {throw 1} : () => never +>1 : 1 +>() => undefined : () => any +>undefined : undefined + +const pa5 = p.then(() => {throw 1}, () => null); +>pa5 : Promise +>p.then(() => {throw 1}, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {throw 1} : () => never >1 : 1 +>() => null : () => any +>null : null -const p62 = p.then(() => {throw 1}, () => {}); ->p62 : Promise ->p.then(() => {throw 1}, () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa6 = p.then(() => {throw 1}, () => {}); +>pa6 : Promise +>p.then(() => {throw 1}, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >() => {} : () => void -const p63 = p.then(() => {throw 1}, () => {throw 1}); ->p63 : Promise ->p.then(() => {throw 1}, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +>pa7 : Promise +>p.then(() => {throw 1}, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >() => {throw 1} : () => never >1 : 1 -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); ->p64 : Promise ->p.then(() => {throw 1}, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +>pa8 : Promise +>p.then(() => {throw 1}, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >() => Promise.resolve(1) : () => Promise @@ -691,12 +1259,12 @@ const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); ->p65 : Promise ->p.then(() => {throw 1}, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); +>pa9 : Promise +>p.then(() => {throw 1}, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >() => Promise.reject(1) : () => Promise @@ -706,12 +1274,12 @@ const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p70 = p.then(() => Promise.resolve("1"), undefined); ->p70 : Promise +const pb0 = p.then(() => Promise.resolve("1"), undefined); +>pb0 : Promise >p.then(() => Promise.resolve("1"), undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -720,12 +1288,26 @@ const p70 = p.then(() => Promise.resolve("1"), undefined); >"1" : "1" >undefined : undefined -const p71 = p.then(() => Promise.resolve("1"), () => 1); ->p71 : Promise +const pb1 = p.then(() => Promise.resolve("1"), null); +>pb1 : Promise +>p.then(() => Promise.resolve("1"), null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>null : null + +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +>pb2 : Promise >p.then(() => Promise.resolve("1"), () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -735,12 +1317,57 @@ const p71 = p.then(() => Promise.resolve("1"), () => 1); >() => 1 : () => number >1 : 1 -const p72 = p.then(() => Promise.resolve("1"), () => {}); ->p72 : Promise +const pb3 = p.then(() => Promise.resolve("1"), () => x); +>pb3 : Promise +>p.then(() => Promise.resolve("1"), () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => x : () => any +>x : any + +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +>pb4 : Promise +>p.then(() => Promise.resolve("1"), () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => undefined : () => any +>undefined : undefined + +const pb5 = p.then(() => Promise.resolve("1"), () => null); +>pb5 : Promise +>p.then(() => Promise.resolve("1"), () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => null : () => any +>null : null + +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +>pb6 : Promise >p.then(() => Promise.resolve("1"), () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -749,12 +1376,12 @@ const p72 = p.then(() => Promise.resolve("1"), () => {}); >"1" : "1" >() => {} : () => void -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); ->p73 : Promise +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +>pb7 : Promise >p.then(() => Promise.resolve("1"), () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -764,12 +1391,12 @@ const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); >() => {throw 1} : () => never >1 : 1 -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); ->p74 : Promise +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +>pb8 : Promise >p.then(() => Promise.resolve("1"), () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -783,12 +1410,12 @@ const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); ->p75 : Promise +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +>pb9 : Promise >p.then(() => Promise.resolve("1"), () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -802,76 +1429,135 @@ const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p80 = p.then(() => Promise.reject(1), undefined); ->p80 : Promise ->p.then(() => Promise.reject(1), undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc0 = p.then(() => Promise.reject("1"), undefined); +>pc0 : Promise +>p.then(() => Promise.reject("1"), undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >undefined : undefined -const p81 = p.then(() => Promise.reject(1), () => 1); ->p81 : Promise ->p.then(() => Promise.reject(1), () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc1 = p.then(() => Promise.reject("1"), null); +>pc1 : Promise +>p.then(() => Promise.reject("1"), null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 ->() => 1 : () => 1 ->1 : 1 +>"1" : "1" +>null : null -const p82 = p.then(() => Promise.reject(1), () => {}); ->p82 : Promise ->p.then(() => Promise.reject(1), () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc2 = p.then(() => Promise.reject("1"), () => 1); +>pc2 : Promise +>p.then(() => Promise.reject("1"), () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => 1 : () => number >1 : 1 + +const pc3 = p.then(() => Promise.reject("1"), () => x); +>pc3 : Promise +>p.then(() => Promise.reject("1"), () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => x : () => any +>x : any + +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +>pc4 : Promise +>p.then(() => Promise.reject("1"), () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => undefined : () => any +>undefined : undefined + +const pc5 = p.then(() => Promise.reject("1"), () => null); +>pc5 : Promise +>p.then(() => Promise.reject("1"), () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => null : () => any +>null : null + +const pc6 = p.then(() => Promise.reject("1"), () => {}); +>pc6 : Promise +>p.then(() => Promise.reject("1"), () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" >() => {} : () => void -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); ->p83 : Promise ->p.then(() => Promise.reject(1), () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +>pc7 : Promise +>p.then(() => Promise.reject("1"), () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => {throw 1} : () => never >1 : 1 -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); ->p84 : Promise ->p.then(() => Promise.reject(1), () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +>pc8 : Promise +>p.then(() => Promise.reject("1"), () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -879,18 +1565,18 @@ const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); ->p85 : Promise ->p.then(() => Promise.reject(1), () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); +>pc9 : Promise +>p.then(() => Promise.reject("1"), () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } diff --git a/tests/baselines/reference/promiseTypeInference.symbols b/tests/baselines/reference/promiseTypeInference.symbols index 427158c88eb60..3f0f871f364ee 100644 --- a/tests/baselines/reference/promiseTypeInference.symbols +++ b/tests/baselines/reference/promiseTypeInference.symbols @@ -4,7 +4,7 @@ declare class Promise { >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(promiseTypeInference.ts, 0, 22)) then(success?: (value: T) => Promise): Promise; ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promiseTypeInference.ts, 0, 26)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promiseTypeInference.ts, 0, 26)) >U : Symbol(U, Decl(promiseTypeInference.ts, 1, 9)) >success : Symbol(success, Decl(promiseTypeInference.ts, 1, 12)) >value : Symbol(value, Decl(promiseTypeInference.ts, 1, 23)) @@ -41,9 +41,9 @@ declare function convert(s: string): IPromise; var $$x = load("something").then(s => convert(s)); >$$x : Symbol($$x, Decl(promiseTypeInference.ts, 9, 3)) ->load("something").then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promiseTypeInference.ts, 0, 26)) +>load("something").then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promiseTypeInference.ts, 0, 26)) >load : Symbol(load, Decl(promiseTypeInference.ts, 5, 1)) ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promiseTypeInference.ts, 0, 26)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promiseTypeInference.ts, 0, 26)) >s : Symbol(s, Decl(promiseTypeInference.ts, 9, 33)) >convert : Symbol(convert, Decl(promiseTypeInference.ts, 6, 53)) >s : Symbol(s, Decl(promiseTypeInference.ts, 9, 33)) diff --git a/tests/baselines/reference/promiseTypeInference.types b/tests/baselines/reference/promiseTypeInference.types index cd1a57d6414ea..f722840ffea66 100644 --- a/tests/baselines/reference/promiseTypeInference.types +++ b/tests/baselines/reference/promiseTypeInference.types @@ -4,7 +4,7 @@ declare class Promise { >T : T then(success?: (value: T) => Promise): Promise; ->then : { (onfulfilled?: (value: T) => T | PromiseLike, onrejected?: (reason: any) => T | PromiseLike): Promise; (onfulfilled: (value: T) => T | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => Promise): Promise; } +>then : { (onfulfilled?: (value: T) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => Promise): Promise; } >U : U >success : (value: T) => Promise >value : T @@ -42,11 +42,11 @@ declare function convert(s: string): IPromise; var $$x = load("something").then(s => convert(s)); >$$x : Promise >load("something").then(s => convert(s)) : Promise ->load("something").then : { (onfulfilled?: (value: string) => string | PromiseLike, onrejected?: (reason: any) => string | PromiseLike): Promise; (onfulfilled: (value: string) => string | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: string) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: string) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise): Promise; } +>load("something").then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise): Promise; } >load("something") : Promise >load : (name: string) => Promise >"something" : "something" ->then : { (onfulfilled?: (value: string) => string | PromiseLike, onrejected?: (reason: any) => string | PromiseLike): Promise; (onfulfilled: (value: string) => string | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: string) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: string) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise): Promise; } +>then : { (onfulfilled?: (value: string) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: string) => Promise): Promise; } >s => convert(s) : (s: string) => IPromise >s : string >convert(s) : IPromise diff --git a/tests/baselines/reference/promiseTypeStrictNull.js b/tests/baselines/reference/promiseTypeStrictNull.js index 4aefeb3403eb5..60e0b9b61dfa6 100644 --- a/tests/baselines/reference/promiseTypeStrictNull.js +++ b/tests/baselines/reference/promiseTypeStrictNull.js @@ -1,16 +1,6 @@ //// [promiseTypeStrictNull.ts] declare var p: Promise; - -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); +declare var x: any; async function A() { const a = await p; @@ -22,17 +12,15 @@ async function B() { return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { + try { + const a = await p; + return 1; + } + catch (e) { + return 'error'; + } +} async function D() { try { @@ -96,64 +84,140 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => {}); -const p04 = p.catch(() => {throw 1}); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); +const p01 = p.then(); -const p10 = p.then(); +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => {}); +const p17 = p.catch(() => {throw 1}); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => {}); -const p23 = p.then(() => {throw 1}); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => {}); +const p27 = p.then(() => {throw 1}); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => {}); -const p33 = p.then(undefined, () => {throw 1}); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => {}); +const p37 = p.then(undefined, () => {throw 1}); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); + +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => {}); +const p47 = p.then(null, () => {throw 1}); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); + +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => {}); +const p57 = p.then(() => "1", () => {throw 1}); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); + +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => {}); +const p67 = p.then(() => x, () => {throw 1}); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => {}); -const p43 = p.then(() => "1", () => {throw 1}); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => {}); +const p77 = p.then(() => undefined, () => {throw 1}); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); -const p50 = p.then(() => {}, undefined); -const p51 = p.then(() => {}, () => 1); -const p52 = p.then(() => {}, () => {}); -const p53 = p.then(() => {}, () => {throw 1}); -const p54 = p.then(() => {}, () => Promise.resolve(1)); -const p55 = p.then(() => {}, () => Promise.reject(1)); +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => {}); +const p87 = p.then(() => null, () => {throw 1}); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); -const p60 = p.then(() => {throw 1}, undefined); -const p61 = p.then(() => {throw 1}, () => 1); -const p62 = p.then(() => {throw 1}, () => {}); -const p63 = p.then(() => {throw 1}, () => {throw 1}); -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); +const p90 = p.then(() => {}, undefined); +const p91 = p.then(() => {}, null); +const p92 = p.then(() => {}, () => 1); +const p93 = p.then(() => {}, () => x); +const p94 = p.then(() => {}, () => undefined); +const p95 = p.then(() => {}, () => null); +const p96 = p.then(() => {}, () => {}); +const p97 = p.then(() => {}, () => {throw 1}); +const p98 = p.then(() => {}, () => Promise.resolve(1)); +const p99 = p.then(() => {}, () => Promise.reject(1)); -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => {}); -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +const pa0 = p.then(() => {throw 1}, undefined); +const pa1 = p.then(() => {throw 1}, null); +const pa2 = p.then(() => {throw 1}, () => 1); +const pa3 = p.then(() => {throw 1}, () => x); +const pa4 = p.then(() => {throw 1}, () => undefined); +const pa5 = p.then(() => {throw 1}, () => null); +const pa6 = p.then(() => {throw 1}, () => {}); +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => {}); -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); + +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => {}); +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); + //// [promiseTypeStrictNull.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { @@ -164,16 +228,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); function A() { return __awaiter(this, void 0, void 0, function* () { const a = yield p; @@ -186,17 +240,17 @@ function B() { return 1; }); } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +function C() { + return __awaiter(this, void 0, void 0, function* () { + try { + const a = yield p; + return 1; + } + catch (e) { + return 'error'; + } + }); +} function D() { return __awaiter(this, void 0, void 0, function* () { try { @@ -264,53 +318,124 @@ function I() { } // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => { }); -const p04 = p.catch(() => { throw 1; }); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); -const p10 = p.then(); +const p01 = p.then(); +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => { }); +const p17 = p.catch(() => { throw 1; }); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => { }); -const p23 = p.then(() => { throw 1; }); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => { }); +const p27 = p.then(() => { throw 1; }); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => { }); -const p33 = p.then(undefined, () => { throw 1; }); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => { }); -const p43 = p.then(() => "1", () => { throw 1; }); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); -const p50 = p.then(() => { }, undefined); -const p51 = p.then(() => { }, () => 1); -const p52 = p.then(() => { }, () => { }); -const p53 = p.then(() => { }, () => { throw 1; }); -const p54 = p.then(() => { }, () => Promise.resolve(1)); -const p55 = p.then(() => { }, () => Promise.reject(1)); -const p60 = p.then(() => { throw 1; }, undefined); -const p61 = p.then(() => { throw 1; }, () => 1); -const p62 = p.then(() => { throw 1; }, () => { }); -const p63 = p.then(() => { throw 1; }, () => { throw 1; }); -const p64 = p.then(() => { throw 1; }, () => Promise.resolve(1)); -const p65 = p.then(() => { throw 1; }, () => Promise.reject(1)); -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => { }); -const p73 = p.then(() => Promise.resolve("1"), () => { throw 1; }); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => { }); -const p83 = p.then(() => Promise.reject(1), () => { throw 1; }); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => { }); +const p37 = p.then(undefined, () => { throw 1; }); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => { }); +const p47 = p.then(null, () => { throw 1; }); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => { }); +const p57 = p.then(() => "1", () => { throw 1; }); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => { }); +const p67 = p.then(() => x, () => { throw 1; }); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => { }); +const p77 = p.then(() => undefined, () => { throw 1; }); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => { }); +const p87 = p.then(() => null, () => { throw 1; }); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); +const p90 = p.then(() => { }, undefined); +const p91 = p.then(() => { }, null); +const p92 = p.then(() => { }, () => 1); +const p93 = p.then(() => { }, () => x); +const p94 = p.then(() => { }, () => undefined); +const p95 = p.then(() => { }, () => null); +const p96 = p.then(() => { }, () => { }); +const p97 = p.then(() => { }, () => { throw 1; }); +const p98 = p.then(() => { }, () => Promise.resolve(1)); +const p99 = p.then(() => { }, () => Promise.reject(1)); +const pa0 = p.then(() => { throw 1; }, undefined); +const pa1 = p.then(() => { throw 1; }, null); +const pa2 = p.then(() => { throw 1; }, () => 1); +const pa3 = p.then(() => { throw 1; }, () => x); +const pa4 = p.then(() => { throw 1; }, () => undefined); +const pa5 = p.then(() => { throw 1; }, () => null); +const pa6 = p.then(() => { throw 1; }, () => { }); +const pa7 = p.then(() => { throw 1; }, () => { throw 1; }); +const pa8 = p.then(() => { throw 1; }, () => Promise.resolve(1)); +const pa9 = p.then(() => { throw 1; }, () => Promise.reject(1)); +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => { }); +const pb7 = p.then(() => Promise.resolve("1"), () => { throw 1; }); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => { }); +const pc7 = p.then(() => Promise.reject("1"), () => { throw 1; }); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); diff --git a/tests/baselines/reference/promiseTypeStrictNull.symbols b/tests/baselines/reference/promiseTypeStrictNull.symbols index f7972286d2f39..58acf184564ff 100644 --- a/tests/baselines/reference/promiseTypeStrictNull.symbols +++ b/tests/baselines/reference/promiseTypeStrictNull.symbols @@ -3,149 +3,74 @@ declare var p: Promise; >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) -const a = p.then(); ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 2, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const b = p.then(b => 1); ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 3, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 3, 17)) - -const c = p.then(b => 1, e => 'error'); ->c : Symbol(c, Decl(promiseTypeStrictNull.ts, 4, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 4, 17)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 4, 24)) - -const d = p.then(b => 1, e => { }); ->d : Symbol(d, Decl(promiseTypeStrictNull.ts, 5, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 5, 17)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 5, 24)) - -const e = p.then(b => 1, e => { throw Error(); }); ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 6, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 6, 17)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 6, 24)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const f = p.then(b => 1, e => Promise.reject(Error())); ->f : Symbol(f, Decl(promiseTypeStrictNull.ts, 7, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 7, 17)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 7, 24)) ->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const g = p.catch(e => 'error'); ->g : Symbol(g, Decl(promiseTypeStrictNull.ts, 8, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 8, 18)) - -const h = p.catch(e => { }); ->h : Symbol(h, Decl(promiseTypeStrictNull.ts, 9, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 9, 18)) - -const i = p.catch(e => { throw Error(); }); ->i : Symbol(i, Decl(promiseTypeStrictNull.ts, 10, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 10, 18)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const j = p.catch(e => Promise.reject(Error())); ->j : Symbol(j, Decl(promiseTypeStrictNull.ts, 11, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 11, 18)) ->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +declare var x: any; +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) async function A() { ->A : Symbol(A, Decl(promiseTypeStrictNull.ts, 11, 48)) +>A : Symbol(A, Decl(promiseTypeStrictNull.ts, 1, 19)) const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 14, 9)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 4, 9)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 14, 9)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 4, 9)) } async function B() { ->B : Symbol(B, Decl(promiseTypeStrictNull.ts, 16, 1)) +>B : Symbol(B, Decl(promiseTypeStrictNull.ts, 6, 1)) const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 19, 9)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 9, 9)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { +>C : Symbol(C, Decl(promiseTypeStrictNull.ts, 11, 1)) + + try { + const a = await p; +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 15, 13)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) + + return 1; + } + catch (e) { +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 18, 11)) + + return 'error'; + } +} async function D() { >D : Symbol(D, Decl(promiseTypeStrictNull.ts, 21, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 37, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 25, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 40, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 28, 11)) } } async function E() { ->E : Symbol(E, Decl(promiseTypeStrictNull.ts, 42, 1)) +>E : Symbol(E, Decl(promiseTypeStrictNull.ts, 30, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 46, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 34, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 49, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 37, 11)) throw Error(); >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -153,17 +78,17 @@ async function E() { } async function F() { ->F : Symbol(F, Decl(promiseTypeStrictNull.ts, 52, 1)) +>F : Symbol(F, Decl(promiseTypeStrictNull.ts, 40, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 56, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 44, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 59, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 47, 11)) return Promise.reject(Error()); >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -174,36 +99,36 @@ async function F() { } async function G() { ->G : Symbol(G, Decl(promiseTypeStrictNull.ts, 62, 1)) +>G : Symbol(G, Decl(promiseTypeStrictNull.ts, 50, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 66, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 54, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 66, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 54, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 69, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 57, 11)) return; } } async function H() { ->H : Symbol(H, Decl(promiseTypeStrictNull.ts, 72, 1)) +>H : Symbol(H, Decl(promiseTypeStrictNull.ts, 60, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 76, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 64, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 76, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 64, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 79, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 67, 11)) throw Error(); >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -211,18 +136,18 @@ async function H() { } async function I() { ->I : Symbol(I, Decl(promiseTypeStrictNull.ts, 82, 1)) +>I : Symbol(I, Decl(promiseTypeStrictNull.ts, 70, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 86, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 74, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 86, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 74, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 89, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 77, 11)) return Promise.reject(Error()); >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -235,390 +160,916 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); ->p00 : Symbol(p00, Decl(promiseTypeStrictNull.ts, 96, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>p00 : Symbol(p00, Decl(promiseTypeStrictNull.ts, 84, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) + +const p01 = p.then(); +>p01 : Symbol(p01, Decl(promiseTypeStrictNull.ts, 85, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p01 = p.catch(undefined); ->p01 : Symbol(p01, Decl(promiseTypeStrictNull.ts, 97, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p10 = p.catch(undefined); +>p10 : Symbol(p10, Decl(promiseTypeStrictNull.ts, 87, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p07 = p.catch(null); ->p07 : Symbol(p07, Decl(promiseTypeStrictNull.ts, 98, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p11 = p.catch(null); +>p11 : Symbol(p11, Decl(promiseTypeStrictNull.ts, 88, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) -const p02 = p.catch(() => 1); ->p02 : Symbol(p02, Decl(promiseTypeStrictNull.ts, 99, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p12 = p.catch(() => 1); +>p12 : Symbol(p12, Decl(promiseTypeStrictNull.ts, 89, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) -const p03 = p.catch(() => {}); ->p03 : Symbol(p03, Decl(promiseTypeStrictNull.ts, 100, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p13 = p.catch(() => x); +>p13 : Symbol(p13, Decl(promiseTypeStrictNull.ts, 90, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p04 = p.catch(() => {throw 1}); ->p04 : Symbol(p04, Decl(promiseTypeStrictNull.ts, 101, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p14 = p.catch(() => undefined); +>p14 : Symbol(p14, Decl(promiseTypeStrictNull.ts, 91, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p15 = p.catch(() => null); +>p15 : Symbol(p15, Decl(promiseTypeStrictNull.ts, 92, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) + +const p16 = p.catch(() => {}); +>p16 : Symbol(p16, Decl(promiseTypeStrictNull.ts, 93, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) + +const p17 = p.catch(() => {throw 1}); +>p17 : Symbol(p17, Decl(promiseTypeStrictNull.ts, 94, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) -const p05 = p.catch(() => Promise.reject(1)); ->p05 : Symbol(p05, Decl(promiseTypeStrictNull.ts, 102, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p18 = p.catch(() => Promise.reject(1)); +>p18 : Symbol(p18, Decl(promiseTypeStrictNull.ts, 95, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p06 = p.catch(() => Promise.resolve(1)); ->p06 : Symbol(p06, Decl(promiseTypeStrictNull.ts, 103, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p19 = p.catch(() => Promise.resolve(1)); +>p19 : Symbol(p19, Decl(promiseTypeStrictNull.ts, 96, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p10 = p.then(); ->p10 : Symbol(p10, Decl(promiseTypeStrictNull.ts, 105, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p20 = p.then(undefined); +>p20 : Symbol(p20, Decl(promiseTypeStrictNull.ts, 98, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) -const p20 = p.then(undefined); ->p20 : Symbol(p20, Decl(promiseTypeStrictNull.ts, 107, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p21 = p.then(null); +>p21 : Symbol(p21, Decl(promiseTypeStrictNull.ts, 99, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p22 = p.then(() => 1); +>p22 : Symbol(p22, Decl(promiseTypeStrictNull.ts, 100, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p23 = p.then(() => x); +>p23 : Symbol(p23, Decl(promiseTypeStrictNull.ts, 101, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p24 = p.then(() => undefined); +>p24 : Symbol(p24, Decl(promiseTypeStrictNull.ts, 102, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p21 = p.then(() => 1); ->p21 : Symbol(p21, Decl(promiseTypeStrictNull.ts, 108, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p25 = p.then(() => null); +>p25 : Symbol(p25, Decl(promiseTypeStrictNull.ts, 103, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p22 = p.then(() => {}); ->p22 : Symbol(p22, Decl(promiseTypeStrictNull.ts, 109, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p26 = p.then(() => {}); +>p26 : Symbol(p26, Decl(promiseTypeStrictNull.ts, 104, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p23 = p.then(() => {throw 1}); ->p23 : Symbol(p23, Decl(promiseTypeStrictNull.ts, 110, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p27 = p.then(() => {throw 1}); +>p27 : Symbol(p27, Decl(promiseTypeStrictNull.ts, 105, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p24 = p.then(() => Promise.resolve(1)); ->p24 : Symbol(p24, Decl(promiseTypeStrictNull.ts, 111, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p28 = p.then(() => Promise.resolve(1)); +>p28 : Symbol(p28, Decl(promiseTypeStrictNull.ts, 106, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p25 = p.then(() => Promise.reject(1)); ->p25 : Symbol(p25, Decl(promiseTypeStrictNull.ts, 112, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p29 = p.then(() => Promise.reject(1)); +>p29 : Symbol(p29, Decl(promiseTypeStrictNull.ts, 107, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) const p30 = p.then(undefined, undefined); ->p30 : Symbol(p30, Decl(promiseTypeStrictNull.ts, 114, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>p30 : Symbol(p30, Decl(promiseTypeStrictNull.ts, 109, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p31 = p.then(undefined, null); +>p31 : Symbol(p31, Decl(promiseTypeStrictNull.ts, 110, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p32 = p.then(undefined, () => 1); +>p32 : Symbol(p32, Decl(promiseTypeStrictNull.ts, 111, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p33 = p.then(undefined, () => x); +>p33 : Symbol(p33, Decl(promiseTypeStrictNull.ts, 112, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p34 = p.then(undefined, () => undefined); +>p34 : Symbol(p34, Decl(promiseTypeStrictNull.ts, 113, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p35 = p.then(undefined, () => null); +>p35 : Symbol(p35, Decl(promiseTypeStrictNull.ts, 114, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p36 = p.then(undefined, () => {}); +>p36 : Symbol(p36, Decl(promiseTypeStrictNull.ts, 115, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p37 = p.then(undefined, () => {throw 1}); +>p37 : Symbol(p37, Decl(promiseTypeStrictNull.ts, 116, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p38 = p.then(undefined, () => Promise.resolve(1)); +>p38 : Symbol(p38, Decl(promiseTypeStrictNull.ts, 117, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p39 = p.then(undefined, () => Promise.reject(1)); +>p39 : Symbol(p39, Decl(promiseTypeStrictNull.ts, 118, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p40 = p.then(null, undefined); +>p40 : Symbol(p40, Decl(promiseTypeStrictNull.ts, 120, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p41 = p.then(null, null); +>p41 : Symbol(p41, Decl(promiseTypeStrictNull.ts, 121, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p42 = p.then(null, () => 1); +>p42 : Symbol(p42, Decl(promiseTypeStrictNull.ts, 122, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p43 = p.then(null, () => x); +>p43 : Symbol(p43, Decl(promiseTypeStrictNull.ts, 123, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p44 = p.then(null, () => undefined); +>p44 : Symbol(p44, Decl(promiseTypeStrictNull.ts, 124, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p45 = p.then(null, () => null); +>p45 : Symbol(p45, Decl(promiseTypeStrictNull.ts, 125, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p46 = p.then(null, () => {}); +>p46 : Symbol(p46, Decl(promiseTypeStrictNull.ts, 126, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p47 = p.then(null, () => {throw 1}); +>p47 : Symbol(p47, Decl(promiseTypeStrictNull.ts, 127, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p48 = p.then(null, () => Promise.resolve(1)); +>p48 : Symbol(p48, Decl(promiseTypeStrictNull.ts, 128, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p49 = p.then(null, () => Promise.reject(1)); +>p49 : Symbol(p49, Decl(promiseTypeStrictNull.ts, 129, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p50 = p.then(() => "1", undefined); +>p50 : Symbol(p50, Decl(promiseTypeStrictNull.ts, 131, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p51 = p.then(() => "1", null); +>p51 : Symbol(p51, Decl(promiseTypeStrictNull.ts, 132, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p52 = p.then(() => "1", () => 1); +>p52 : Symbol(p52, Decl(promiseTypeStrictNull.ts, 133, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p53 = p.then(() => "1", () => x); +>p53 : Symbol(p53, Decl(promiseTypeStrictNull.ts, 134, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p54 = p.then(() => "1", () => undefined); +>p54 : Symbol(p54, Decl(promiseTypeStrictNull.ts, 135, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p55 = p.then(() => "1", () => null); +>p55 : Symbol(p55, Decl(promiseTypeStrictNull.ts, 136, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p56 = p.then(() => "1", () => {}); +>p56 : Symbol(p56, Decl(promiseTypeStrictNull.ts, 137, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p57 = p.then(() => "1", () => {throw 1}); +>p57 : Symbol(p57, Decl(promiseTypeStrictNull.ts, 138, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p58 = p.then(() => "1", () => Promise.resolve(1)); +>p58 : Symbol(p58, Decl(promiseTypeStrictNull.ts, 139, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p59 = p.then(() => "1", () => Promise.reject(1)); +>p59 : Symbol(p59, Decl(promiseTypeStrictNull.ts, 140, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p60 = p.then(() => x, undefined); +>p60 : Symbol(p60, Decl(promiseTypeStrictNull.ts, 142, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>undefined : Symbol(undefined) + +const p61 = p.then(() => x, null); +>p61 : Symbol(p61, Decl(promiseTypeStrictNull.ts, 143, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p62 = p.then(() => x, () => 1); +>p62 : Symbol(p62, Decl(promiseTypeStrictNull.ts, 144, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p63 = p.then(() => x, () => x); +>p63 : Symbol(p63, Decl(promiseTypeStrictNull.ts, 145, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p64 = p.then(() => x, () => undefined); +>p64 : Symbol(p64, Decl(promiseTypeStrictNull.ts, 146, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>undefined : Symbol(undefined) + +const p65 = p.then(() => x, () => null); +>p65 : Symbol(p65, Decl(promiseTypeStrictNull.ts, 147, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p66 = p.then(() => x, () => {}); +>p66 : Symbol(p66, Decl(promiseTypeStrictNull.ts, 148, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p67 = p.then(() => x, () => {throw 1}); +>p67 : Symbol(p67, Decl(promiseTypeStrictNull.ts, 149, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p68 = p.then(() => x, () => Promise.resolve(1)); +>p68 : Symbol(p68, Decl(promiseTypeStrictNull.ts, 150, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p69 = p.then(() => x, () => Promise.reject(1)); +>p69 : Symbol(p69, Decl(promiseTypeStrictNull.ts, 151, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p70 = p.then(() => undefined, undefined); +>p70 : Symbol(p70, Decl(promiseTypeStrictNull.ts, 153, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) >undefined : Symbol(undefined) -const p31 = p.then(undefined, () => 1); ->p31 : Symbol(p31, Decl(promiseTypeStrictNull.ts, 115, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p71 = p.then(() => undefined, null); +>p71 : Symbol(p71, Decl(promiseTypeStrictNull.ts, 154, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p32 = p.then(undefined, () => {}); ->p32 : Symbol(p32, Decl(promiseTypeStrictNull.ts, 116, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p72 = p.then(() => undefined, () => 1); +>p72 : Symbol(p72, Decl(promiseTypeStrictNull.ts, 155, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p33 = p.then(undefined, () => {throw 1}); ->p33 : Symbol(p33, Decl(promiseTypeStrictNull.ts, 117, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p73 = p.then(() => undefined, () => x); +>p73 : Symbol(p73, Decl(promiseTypeStrictNull.ts, 156, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p34 = p.then(undefined, () => Promise.resolve(1)); ->p34 : Symbol(p34, Decl(promiseTypeStrictNull.ts, 118, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p74 = p.then(() => undefined, () => undefined); +>p74 : Symbol(p74, Decl(promiseTypeStrictNull.ts, 157, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p75 = p.then(() => undefined, () => null); +>p75 : Symbol(p75, Decl(promiseTypeStrictNull.ts, 158, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p76 = p.then(() => undefined, () => {}); +>p76 : Symbol(p76, Decl(promiseTypeStrictNull.ts, 159, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p77 = p.then(() => undefined, () => {throw 1}); +>p77 : Symbol(p77, Decl(promiseTypeStrictNull.ts, 160, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +>p78 : Symbol(p78, Decl(promiseTypeStrictNull.ts, 161, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p35 = p.then(undefined, () => Promise.reject(1)); ->p35 : Symbol(p35, Decl(promiseTypeStrictNull.ts, 119, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p79 = p.then(() => undefined, () => Promise.reject(1)); +>p79 : Symbol(p79, Decl(promiseTypeStrictNull.ts, 162, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p40 = p.then(() => "1", undefined); ->p40 : Symbol(p40, Decl(promiseTypeStrictNull.ts, 121, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p80 = p.then(() => null, undefined); +>p80 : Symbol(p80, Decl(promiseTypeStrictNull.ts, 164, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p41 = p.then(() => "1", () => 1); ->p41 : Symbol(p41, Decl(promiseTypeStrictNull.ts, 122, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p81 = p.then(() => null, null); +>p81 : Symbol(p81, Decl(promiseTypeStrictNull.ts, 165, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p42 = p.then(() => "1", () => {}); ->p42 : Symbol(p42, Decl(promiseTypeStrictNull.ts, 123, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p82 = p.then(() => null, () => 1); +>p82 : Symbol(p82, Decl(promiseTypeStrictNull.ts, 166, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p43 = p.then(() => "1", () => {throw 1}); ->p43 : Symbol(p43, Decl(promiseTypeStrictNull.ts, 124, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p83 = p.then(() => null, () => x); +>p83 : Symbol(p83, Decl(promiseTypeStrictNull.ts, 167, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p44 = p.then(() => "1", () => Promise.resolve(1)); ->p44 : Symbol(p44, Decl(promiseTypeStrictNull.ts, 125, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p84 = p.then(() => null, () => undefined); +>p84 : Symbol(p84, Decl(promiseTypeStrictNull.ts, 168, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p85 = p.then(() => null, () => null); +>p85 : Symbol(p85, Decl(promiseTypeStrictNull.ts, 169, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p86 = p.then(() => null, () => {}); +>p86 : Symbol(p86, Decl(promiseTypeStrictNull.ts, 170, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p87 = p.then(() => null, () => {throw 1}); +>p87 : Symbol(p87, Decl(promiseTypeStrictNull.ts, 171, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p88 = p.then(() => null, () => Promise.resolve(1)); +>p88 : Symbol(p88, Decl(promiseTypeStrictNull.ts, 172, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p45 = p.then(() => "1", () => Promise.reject(1)); ->p45 : Symbol(p45, Decl(promiseTypeStrictNull.ts, 126, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p89 = p.then(() => null, () => Promise.reject(1)); +>p89 : Symbol(p89, Decl(promiseTypeStrictNull.ts, 173, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p50 = p.then(() => {}, undefined); ->p50 : Symbol(p50, Decl(promiseTypeStrictNull.ts, 128, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p90 = p.then(() => {}, undefined); +>p90 : Symbol(p90, Decl(promiseTypeStrictNull.ts, 175, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p51 = p.then(() => {}, () => 1); ->p51 : Symbol(p51, Decl(promiseTypeStrictNull.ts, 129, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p91 = p.then(() => {}, null); +>p91 : Symbol(p91, Decl(promiseTypeStrictNull.ts, 176, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p52 = p.then(() => {}, () => {}); ->p52 : Symbol(p52, Decl(promiseTypeStrictNull.ts, 130, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p92 = p.then(() => {}, () => 1); +>p92 : Symbol(p92, Decl(promiseTypeStrictNull.ts, 177, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p53 = p.then(() => {}, () => {throw 1}); ->p53 : Symbol(p53, Decl(promiseTypeStrictNull.ts, 131, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p93 = p.then(() => {}, () => x); +>p93 : Symbol(p93, Decl(promiseTypeStrictNull.ts, 178, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p54 = p.then(() => {}, () => Promise.resolve(1)); ->p54 : Symbol(p54, Decl(promiseTypeStrictNull.ts, 132, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p94 = p.then(() => {}, () => undefined); +>p94 : Symbol(p94, Decl(promiseTypeStrictNull.ts, 179, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p95 = p.then(() => {}, () => null); +>p95 : Symbol(p95, Decl(promiseTypeStrictNull.ts, 180, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p96 = p.then(() => {}, () => {}); +>p96 : Symbol(p96, Decl(promiseTypeStrictNull.ts, 181, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p97 = p.then(() => {}, () => {throw 1}); +>p97 : Symbol(p97, Decl(promiseTypeStrictNull.ts, 182, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const p98 = p.then(() => {}, () => Promise.resolve(1)); +>p98 : Symbol(p98, Decl(promiseTypeStrictNull.ts, 183, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p55 = p.then(() => {}, () => Promise.reject(1)); ->p55 : Symbol(p55, Decl(promiseTypeStrictNull.ts, 133, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const p99 = p.then(() => {}, () => Promise.reject(1)); +>p99 : Symbol(p99, Decl(promiseTypeStrictNull.ts, 184, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p60 = p.then(() => {throw 1}, undefined); ->p60 : Symbol(p60, Decl(promiseTypeStrictNull.ts, 135, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa0 = p.then(() => {throw 1}, undefined); +>pa0 : Symbol(pa0, Decl(promiseTypeStrictNull.ts, 186, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >undefined : Symbol(undefined) -const p61 = p.then(() => {throw 1}, () => 1); ->p61 : Symbol(p61, Decl(promiseTypeStrictNull.ts, 136, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa1 = p.then(() => {throw 1}, null); +>pa1 : Symbol(pa1, Decl(promiseTypeStrictNull.ts, 187, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const pa2 = p.then(() => {throw 1}, () => 1); +>pa2 : Symbol(pa2, Decl(promiseTypeStrictNull.ts, 188, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) -const p62 = p.then(() => {throw 1}, () => {}); ->p62 : Symbol(p62, Decl(promiseTypeStrictNull.ts, 137, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa3 = p.then(() => {throw 1}, () => x); +>pa3 : Symbol(pa3, Decl(promiseTypeStrictNull.ts, 189, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p63 = p.then(() => {throw 1}, () => {throw 1}); ->p63 : Symbol(p63, Decl(promiseTypeStrictNull.ts, 138, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa4 = p.then(() => {throw 1}, () => undefined); +>pa4 : Symbol(pa4, Decl(promiseTypeStrictNull.ts, 190, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); ->p64 : Symbol(p64, Decl(promiseTypeStrictNull.ts, 139, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa5 = p.then(() => {throw 1}, () => null); +>pa5 : Symbol(pa5, Decl(promiseTypeStrictNull.ts, 191, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const pa6 = p.then(() => {throw 1}, () => {}); +>pa6 : Symbol(pa6, Decl(promiseTypeStrictNull.ts, 192, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +>pa7 : Symbol(pa7, Decl(promiseTypeStrictNull.ts, 193, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) + +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +>pa8 : Symbol(pa8, Decl(promiseTypeStrictNull.ts, 194, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); ->p65 : Symbol(p65, Decl(promiseTypeStrictNull.ts, 140, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); +>pa9 : Symbol(pa9, Decl(promiseTypeStrictNull.ts, 195, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p70 = p.then(() => Promise.resolve("1"), undefined); ->p70 : Symbol(p70, Decl(promiseTypeStrictNull.ts, 142, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb0 = p.then(() => Promise.resolve("1"), undefined); +>pb0 : Symbol(pb0, Decl(promiseTypeStrictNull.ts, 197, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p71 = p.then(() => Promise.resolve("1"), () => 1); ->p71 : Symbol(p71, Decl(promiseTypeStrictNull.ts, 143, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb1 = p.then(() => Promise.resolve("1"), null); +>pb1 : Symbol(pb1, Decl(promiseTypeStrictNull.ts, 198, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +>pb2 : Symbol(pb2, Decl(promiseTypeStrictNull.ts, 199, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p72 = p.then(() => Promise.resolve("1"), () => {}); ->p72 : Symbol(p72, Decl(promiseTypeStrictNull.ts, 144, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb3 = p.then(() => Promise.resolve("1"), () => x); +>pb3 : Symbol(pb3, Decl(promiseTypeStrictNull.ts, 200, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); ->p73 : Symbol(p73, Decl(promiseTypeStrictNull.ts, 145, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +>pb4 : Symbol(pb4, Decl(promiseTypeStrictNull.ts, 201, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); ->p74 : Symbol(p74, Decl(promiseTypeStrictNull.ts, 146, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb5 = p.then(() => Promise.resolve("1"), () => null); +>pb5 : Symbol(pb5, Decl(promiseTypeStrictNull.ts, 202, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +>pb6 : Symbol(pb6, Decl(promiseTypeStrictNull.ts, 203, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); ->p75 : Symbol(p75, Decl(promiseTypeStrictNull.ts, 147, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +>pb7 : Symbol(pb7, Decl(promiseTypeStrictNull.ts, 204, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +>pb8 : Symbol(pb8, Decl(promiseTypeStrictNull.ts, 205, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +>pb9 : Symbol(pb9, Decl(promiseTypeStrictNull.ts, 206, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc0 = p.then(() => Promise.reject("1"), undefined); +>pc0 : Symbol(pc0, Decl(promiseTypeStrictNull.ts, 208, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const pc1 = p.then(() => Promise.reject("1"), null); +>pc1 : Symbol(pc1, Decl(promiseTypeStrictNull.ts, 209, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc2 = p.then(() => Promise.reject("1"), () => 1); +>pc2 : Symbol(pc2, Decl(promiseTypeStrictNull.ts, 210, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc3 = p.then(() => Promise.reject("1"), () => x); +>pc3 : Symbol(pc3, Decl(promiseTypeStrictNull.ts, 211, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p80 = p.then(() => Promise.reject(1), undefined); ->p80 : Symbol(p80, Decl(promiseTypeStrictNull.ts, 149, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +>pc4 : Symbol(pc4, Decl(promiseTypeStrictNull.ts, 212, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p81 = p.then(() => Promise.reject(1), () => 1); ->p81 : Symbol(p81, Decl(promiseTypeStrictNull.ts, 150, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc5 = p.then(() => Promise.reject("1"), () => null); +>pc5 : Symbol(pc5, Decl(promiseTypeStrictNull.ts, 213, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p82 = p.then(() => Promise.reject(1), () => {}); ->p82 : Symbol(p82, Decl(promiseTypeStrictNull.ts, 151, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc6 = p.then(() => Promise.reject("1"), () => {}); +>pc6 : Symbol(pc6, Decl(promiseTypeStrictNull.ts, 214, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); ->p83 : Symbol(p83, Decl(promiseTypeStrictNull.ts, 152, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +>pc7 : Symbol(pc7, Decl(promiseTypeStrictNull.ts, 215, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); ->p84 : Symbol(p84, Decl(promiseTypeStrictNull.ts, 153, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +>pc8 : Symbol(pc8, Decl(promiseTypeStrictNull.ts, 216, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -626,11 +1077,11 @@ const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); ->p85 : Symbol(p85, Decl(promiseTypeStrictNull.ts, 154, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); +>pc9 : Symbol(pc9, Decl(promiseTypeStrictNull.ts, 217, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/promiseTypeStrictNull.types b/tests/baselines/reference/promiseTypeStrictNull.types index a65547ec5f3ae..7bb75ec66f234 100644 --- a/tests/baselines/reference/promiseTypeStrictNull.types +++ b/tests/baselines/reference/promiseTypeStrictNull.types @@ -3,124 +3,8 @@ declare var p: Promise; >p : Promise >Promise : Promise -const a = p.then(); ->a : Promise ->p.then() : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } - -const b = p.then(b => 1); ->b : Promise<1> ->p.then(b => 1) : Promise<1> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 - -const c = p.then(b => 1, e => 'error'); ->c : Promise ->p.then(b => 1, e => 'error') : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => 'error' : (e: any) => string ->e : any ->'error' : "error" - -const d = p.then(b => 1, e => { }); ->d : Promise ->p.then(b => 1, e => { }) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => { } : (e: any) => void ->e : any - -const e = p.then(b => 1, e => { throw Error(); }); ->e : Promise<1> ->p.then(b => 1, e => { throw Error(); }) : Promise<1> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => { throw Error(); } : (e: any) => never ->e : any ->Error() : Error ->Error : ErrorConstructor - -const f = p.then(b => 1, e => Promise.reject(Error())); ->f : Promise<1> ->p.then(b => 1, e => Promise.reject(Error())) : Promise<1> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => Promise.reject(Error()) : (e: any) => Promise ->e : any ->Promise.reject(Error()) : Promise ->Promise.reject : { (reason: any): Promise; (reason: any): Promise; } ->Promise : PromiseConstructor ->reject : { (reason: any): Promise; (reason: any): Promise; } ->Error() : Error ->Error : ErrorConstructor - -const g = p.catch(e => 'error'); ->g : Promise ->p.catch(e => 'error') : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => 'error' : (e: any) => "error" ->e : any ->'error' : "error" - -const h = p.catch(e => { }); ->h : Promise ->p.catch(e => { }) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => { } : (e: any) => void ->e : any - -const i = p.catch(e => { throw Error(); }); ->i : Promise ->p.catch(e => { throw Error(); }) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => { throw Error(); } : (e: any) => never ->e : any ->Error() : Error ->Error : ErrorConstructor - -const j = p.catch(e => Promise.reject(Error())); ->j : Promise ->p.catch(e => Promise.reject(Error())) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => Promise.reject(Error()) : (e: any) => Promise ->e : any ->Promise.reject(Error()) : Promise ->Promise.reject : { (reason: any): Promise; (reason: any): Promise; } ->Promise : PromiseConstructor ->reject : { (reason: any): Promise; (reason: any): Promise; } ->Error() : Error ->Error : ErrorConstructor +declare var x: any; +>x : any async function A() { >A : () => Promise @@ -146,17 +30,25 @@ async function B() { >1 : 1 } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { +>C : () => Promise<1 | "error"> + + try { + const a = await p; +>a : boolean +>await p : boolean +>p : Promise + + return 1; +>1 : 1 + } + catch (e) { +>e : any + + return 'error'; +>'error' : "error" + } +} async function D() { >D : () => Promise<1 | undefined> @@ -291,58 +183,92 @@ async function I() { const p00 = p.catch(); >p00 : Promise >p.catch() : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise -const p01 = p.catch(undefined); +const p01 = p.then(); >p01 : Promise +>p.then() : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise + +const p10 = p.catch(undefined); +>p10 : Promise >p.catch(undefined) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >undefined : undefined -const p07 = p.catch(null); ->p07 : Promise +const p11 = p.catch(null); +>p11 : Promise >p.catch(null) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >null : null -const p02 = p.catch(() => 1); ->p02 : Promise ->p.catch(() => 1) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +const p12 = p.catch(() => 1); +>p12 : Promise +>p.catch(() => 1) : Promise +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->() => 1 : () => 1 +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>() => 1 : () => number >1 : 1 -const p03 = p.catch(() => {}); ->p03 : Promise +const p13 = p.catch(() => x); +>p13 : Promise +>p.catch(() => x) : Promise +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>p : Promise +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any + +const p14 = p.catch(() => undefined); +>p14 : Promise +>p.catch(() => undefined) : Promise +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>p : Promise +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined + +const p15 = p.catch(() => null); +>p15 : Promise +>p.catch(() => null) : Promise +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>p : Promise +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null + +const p16 = p.catch(() => {}); +>p16 : Promise >p.catch(() => {}) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >() => {} : () => void -const p04 = p.catch(() => {throw 1}); ->p04 : Promise +const p17 = p.catch(() => {throw 1}); +>p17 : Promise >p.catch(() => {throw 1}) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 -const p05 = p.catch(() => Promise.reject(1)); ->p05 : Promise +const p18 = p.catch(() => Promise.reject(1)); +>p18 : Promise >p.catch(() => Promise.reject(1)) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } @@ -350,12 +276,12 @@ const p05 = p.catch(() => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p06 = p.catch(() => Promise.resolve(1)); ->p06 : Promise +const p19 = p.catch(() => Promise.resolve(1)); +>p19 : Promise >p.catch(() => Promise.resolve(1)) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -363,53 +289,81 @@ const p06 = p.catch(() => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p10 = p.then(); ->p10 : Promise ->p.then() : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } - const p20 = p.then(undefined); >p20 : Promise >p.then(undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined -const p21 = p.then(() => 1); ->p21 : Promise<1> ->p.then(() => 1) : Promise<1> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p21 = p.then(null); +>p21 : Promise +>p.then(null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null + +const p22 = p.then(() => 1); +>p22 : Promise +>p.then(() => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => 1 : () => 1 +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => 1 : () => number >1 : 1 -const p22 = p.then(() => {}); ->p22 : Promise +const p23 = p.then(() => x); +>p23 : Promise +>p.then(() => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any + +const p24 = p.then(() => undefined); +>p24 : Promise +>p.then(() => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined + +const p25 = p.then(() => null); +>p25 : Promise +>p.then(() => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null + +const p26 = p.then(() => {}); +>p26 : Promise >p.then(() => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void -const p23 = p.then(() => {throw 1}); ->p23 : Promise ->p.then(() => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p27 = p.then(() => {throw 1}); +>p27 : Promise +>p.then(() => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 -const p24 = p.then(() => Promise.resolve(1)); ->p24 : Promise +const p28 = p.then(() => Promise.resolve(1)); +>p28 : Promise >p.then(() => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -417,12 +371,12 @@ const p24 = p.then(() => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p25 = p.then(() => Promise.reject(1)); ->p25 : Promise ->p.then(() => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p29 = p.then(() => Promise.reject(1)); +>p29 : Promise +>p.then(() => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } @@ -433,47 +387,86 @@ const p25 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); >p30 : Promise >p.then(undefined, undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >undefined : undefined -const p31 = p.then(undefined, () => 1); ->p31 : Promise ->p.then(undefined, () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p31 = p.then(undefined, null); +>p31 : Promise +>p.then(undefined, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined ->() => 1 : () => 1 +>null : null + +const p32 = p.then(undefined, () => 1); +>p32 : Promise +>p.then(undefined, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>undefined : undefined +>() => 1 : () => number >1 : 1 -const p32 = p.then(undefined, () => {}); ->p32 : Promise +const p33 = p.then(undefined, () => x); +>p33 : Promise +>p.then(undefined, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>undefined : undefined +>() => x : () => any +>x : any + +const p34 = p.then(undefined, () => undefined); +>p34 : Promise +>p.then(undefined, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>undefined : undefined +>() => undefined : () => undefined +>undefined : undefined + +const p35 = p.then(undefined, () => null); +>p35 : Promise +>p.then(undefined, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>undefined : undefined +>() => null : () => null +>null : null + +const p36 = p.then(undefined, () => {}); +>p36 : Promise >p.then(undefined, () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >() => {} : () => void -const p33 = p.then(undefined, () => {throw 1}); ->p33 : Promise +const p37 = p.then(undefined, () => {throw 1}); +>p37 : Promise >p.then(undefined, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >() => {throw 1} : () => never >1 : 1 -const p34 = p.then(undefined, () => Promise.resolve(1)); ->p34 : Promise +const p38 = p.then(undefined, () => Promise.resolve(1)); +>p38 : Promise >p.then(undefined, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -482,12 +475,12 @@ const p34 = p.then(undefined, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p35 = p.then(undefined, () => Promise.reject(1)); ->p35 : Promise +const p39 = p.then(undefined, () => Promise.reject(1)); +>p39 : Promise >p.then(undefined, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -496,55 +489,203 @@ const p35 = p.then(undefined, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p40 = p.then(() => "1", undefined); ->p40 : Promise<"1"> ->p.then(() => "1", undefined) : Promise<"1"> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p40 = p.then(null, undefined); +>p40 : Promise +>p.then(null, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>undefined : undefined + +const p41 = p.then(null, null); +>p41 : Promise +>p.then(null, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>null : null + +const p42 = p.then(null, () => 1); +>p42 : Promise +>p.then(null, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => 1 : () => number +>1 : 1 + +const p43 = p.then(null, () => x); +>p43 : Promise +>p.then(null, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => x : () => any +>x : any + +const p44 = p.then(null, () => undefined); +>p44 : Promise +>p.then(null, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => undefined : () => undefined +>undefined : undefined + +const p45 = p.then(null, () => null); +>p45 : Promise +>p.then(null, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => null : () => null +>null : null + +const p46 = p.then(null, () => {}); +>p46 : Promise +>p.then(null, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => {} : () => void + +const p47 = p.then(null, () => {throw 1}); +>p47 : Promise +>p.then(null, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => {throw 1} : () => never +>1 : 1 + +const p48 = p.then(null, () => Promise.resolve(1)); +>p48 : Promise +>p.then(null, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p49 = p.then(null, () => Promise.reject(1)); +>p49 : Promise +>p.then(null, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p50 = p.then(() => "1", undefined); +>p50 : Promise +>p.then(() => "1", undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >undefined : undefined -const p41 = p.then(() => "1", () => 1); ->p41 : Promise ->p.then(() => "1", () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p51 = p.then(() => "1", null); +>p51 : Promise +>p.then(() => "1", null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string +>"1" : "1" +>null : null + +const p52 = p.then(() => "1", () => 1); +>p52 : Promise +>p.then(() => "1", () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => 1 : () => number >1 : 1 -const p42 = p.then(() => "1", () => {}); ->p42 : Promise ->p.then(() => "1", () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p53 = p.then(() => "1", () => x); +>p53 : Promise +>p.then(() => "1", () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string +>"1" : "1" +>() => x : () => any +>x : any + +const p54 = p.then(() => "1", () => undefined); +>p54 : Promise +>p.then(() => "1", () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string +>"1" : "1" +>() => undefined : () => undefined +>undefined : undefined + +const p55 = p.then(() => "1", () => null); +>p55 : Promise +>p.then(() => "1", () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string +>"1" : "1" +>() => null : () => null +>null : null + +const p56 = p.then(() => "1", () => {}); +>p56 : Promise +>p.then(() => "1", () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => {} : () => void -const p43 = p.then(() => "1", () => {throw 1}); ->p43 : Promise<"1"> ->p.then(() => "1", () => {throw 1}) : Promise<"1"> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p57 = p.then(() => "1", () => {throw 1}); +>p57 : Promise +>p.then(() => "1", () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => {throw 1} : () => never >1 : 1 -const p44 = p.then(() => "1", () => Promise.resolve(1)); ->p44 : Promise ->p.then(() => "1", () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p58 = p.then(() => "1", () => Promise.resolve(1)); +>p58 : Promise +>p.then(() => "1", () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -553,13 +694,13 @@ const p44 = p.then(() => "1", () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p45 = p.then(() => "1", () => Promise.reject(1)); ->p45 : Promise<"1"> ->p.then(() => "1", () => Promise.reject(1)) : Promise<"1"> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p59 = p.then(() => "1", () => Promise.reject(1)); +>p59 : Promise +>p.then(() => "1", () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -568,50 +709,434 @@ const p45 = p.then(() => "1", () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p50 = p.then(() => {}, undefined); ->p50 : Promise +const p60 = p.then(() => x, undefined); +>p60 : Promise +>p.then(() => x, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>undefined : undefined + +const p61 = p.then(() => x, null); +>p61 : Promise +>p.then(() => x, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>null : null + +const p62 = p.then(() => x, () => 1); +>p62 : Promise +>p.then(() => x, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => 1 : () => number +>1 : 1 + +const p63 = p.then(() => x, () => x); +>p63 : Promise +>p.then(() => x, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => x : () => any +>x : any + +const p64 = p.then(() => x, () => undefined); +>p64 : Promise +>p.then(() => x, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => undefined : () => undefined +>undefined : undefined + +const p65 = p.then(() => x, () => null); +>p65 : Promise +>p.then(() => x, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => null : () => null +>null : null + +const p66 = p.then(() => x, () => {}); +>p66 : Promise +>p.then(() => x, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => {} : () => void + +const p67 = p.then(() => x, () => {throw 1}); +>p67 : Promise +>p.then(() => x, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => {throw 1} : () => never +>1 : 1 + +const p68 = p.then(() => x, () => Promise.resolve(1)); +>p68 : Promise +>p.then(() => x, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p69 = p.then(() => x, () => Promise.reject(1)); +>p69 : Promise +>p.then(() => x, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p70 = p.then(() => undefined, undefined); +>p70 : Promise +>p.then(() => undefined, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>undefined : undefined + +const p71 = p.then(() => undefined, null); +>p71 : Promise +>p.then(() => undefined, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>null : null + +const p72 = p.then(() => undefined, () => 1); +>p72 : Promise +>p.then(() => undefined, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => 1 : () => number +>1 : 1 + +const p73 = p.then(() => undefined, () => x); +>p73 : Promise +>p.then(() => undefined, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => x : () => any +>x : any + +const p74 = p.then(() => undefined, () => undefined); +>p74 : Promise +>p.then(() => undefined, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => undefined : () => undefined +>undefined : undefined + +const p75 = p.then(() => undefined, () => null); +>p75 : Promise +>p.then(() => undefined, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => null : () => null +>null : null + +const p76 = p.then(() => undefined, () => {}); +>p76 : Promise +>p.then(() => undefined, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => {} : () => void + +const p77 = p.then(() => undefined, () => {throw 1}); +>p77 : Promise +>p.then(() => undefined, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => {throw 1} : () => never +>1 : 1 + +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +>p78 : Promise +>p.then(() => undefined, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p79 = p.then(() => undefined, () => Promise.reject(1)); +>p79 : Promise +>p.then(() => undefined, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p80 = p.then(() => null, undefined); +>p80 : Promise +>p.then(() => null, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>undefined : undefined + +const p81 = p.then(() => null, null); +>p81 : Promise +>p.then(() => null, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>null : null + +const p82 = p.then(() => null, () => 1); +>p82 : Promise +>p.then(() => null, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => 1 : () => number +>1 : 1 + +const p83 = p.then(() => null, () => x); +>p83 : Promise +>p.then(() => null, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => x : () => any +>x : any + +const p84 = p.then(() => null, () => undefined); +>p84 : Promise +>p.then(() => null, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => undefined : () => undefined +>undefined : undefined + +const p85 = p.then(() => null, () => null); +>p85 : Promise +>p.then(() => null, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => null : () => null +>null : null + +const p86 = p.then(() => null, () => {}); +>p86 : Promise +>p.then(() => null, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => {} : () => void + +const p87 = p.then(() => null, () => {throw 1}); +>p87 : Promise +>p.then(() => null, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => {throw 1} : () => never +>1 : 1 + +const p88 = p.then(() => null, () => Promise.resolve(1)); +>p88 : Promise +>p.then(() => null, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p89 = p.then(() => null, () => Promise.reject(1)); +>p89 : Promise +>p.then(() => null, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p90 = p.then(() => {}, undefined); +>p90 : Promise >p.then(() => {}, undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >undefined : undefined -const p51 = p.then(() => {}, () => 1); ->p51 : Promise +const p91 = p.then(() => {}, null); +>p91 : Promise +>p.then(() => {}, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {} : () => void +>null : null + +const p92 = p.then(() => {}, () => 1); +>p92 : Promise >p.then(() => {}, () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => 1 : () => number >1 : 1 -const p52 = p.then(() => {}, () => {}); ->p52 : Promise +const p93 = p.then(() => {}, () => x); +>p93 : Promise +>p.then(() => {}, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {} : () => void +>() => x : () => any +>x : any + +const p94 = p.then(() => {}, () => undefined); +>p94 : Promise +>p.then(() => {}, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {} : () => void +>() => undefined : () => undefined +>undefined : undefined + +const p95 = p.then(() => {}, () => null); +>p95 : Promise +>p.then(() => {}, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {} : () => void +>() => null : () => null +>null : null + +const p96 = p.then(() => {}, () => {}); +>p96 : Promise >p.then(() => {}, () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => {} : () => void -const p53 = p.then(() => {}, () => {throw 1}); ->p53 : Promise +const p97 = p.then(() => {}, () => {throw 1}); +>p97 : Promise >p.then(() => {}, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => {throw 1} : () => never >1 : 1 -const p54 = p.then(() => {}, () => Promise.resolve(1)); ->p54 : Promise +const p98 = p.then(() => {}, () => Promise.resolve(1)); +>p98 : Promise >p.then(() => {}, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -620,12 +1145,12 @@ const p54 = p.then(() => {}, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p55 = p.then(() => {}, () => Promise.reject(1)); ->p55 : Promise +const p99 = p.then(() => {}, () => Promise.reject(1)); +>p99 : Promise >p.then(() => {}, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -634,54 +1159,97 @@ const p55 = p.then(() => {}, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p60 = p.then(() => {throw 1}, undefined); ->p60 : Promise ->p.then(() => {throw 1}, undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa0 = p.then(() => {throw 1}, undefined); +>pa0 : Promise +>p.then(() => {throw 1}, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >undefined : undefined -const p61 = p.then(() => {throw 1}, () => 1); ->p61 : Promise ->p.then(() => {throw 1}, () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa1 = p.then(() => {throw 1}, null); +>pa1 : Promise +>p.then(() => {throw 1}, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {throw 1} : () => never +>1 : 1 +>null : null + +const pa2 = p.then(() => {throw 1}, () => 1); +>pa2 : Promise +>p.then(() => {throw 1}, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {throw 1} : () => never +>1 : 1 +>() => 1 : () => number +>1 : 1 + +const pa3 = p.then(() => {throw 1}, () => x); +>pa3 : Promise +>p.then(() => {throw 1}, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 ->() => 1 : () => 1 +>() => x : () => any +>x : any + +const pa4 = p.then(() => {throw 1}, () => undefined); +>pa4 : Promise +>p.then(() => {throw 1}, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {throw 1} : () => never +>1 : 1 +>() => undefined : () => undefined +>undefined : undefined + +const pa5 = p.then(() => {throw 1}, () => null); +>pa5 : Promise +>p.then(() => {throw 1}, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {throw 1} : () => never >1 : 1 +>() => null : () => null +>null : null -const p62 = p.then(() => {throw 1}, () => {}); ->p62 : Promise ->p.then(() => {throw 1}, () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa6 = p.then(() => {throw 1}, () => {}); +>pa6 : Promise +>p.then(() => {throw 1}, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >() => {} : () => void -const p63 = p.then(() => {throw 1}, () => {throw 1}); ->p63 : Promise ->p.then(() => {throw 1}, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +>pa7 : Promise +>p.then(() => {throw 1}, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >() => {throw 1} : () => never >1 : 1 -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); ->p64 : Promise ->p.then(() => {throw 1}, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +>pa8 : Promise +>p.then(() => {throw 1}, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >() => Promise.resolve(1) : () => Promise @@ -691,12 +1259,12 @@ const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); ->p65 : Promise ->p.then(() => {throw 1}, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); +>pa9 : Promise +>p.then(() => {throw 1}, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >() => Promise.reject(1) : () => Promise @@ -706,12 +1274,12 @@ const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p70 = p.then(() => Promise.resolve("1"), undefined); ->p70 : Promise +const pb0 = p.then(() => Promise.resolve("1"), undefined); +>pb0 : Promise >p.then(() => Promise.resolve("1"), undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -720,12 +1288,26 @@ const p70 = p.then(() => Promise.resolve("1"), undefined); >"1" : "1" >undefined : undefined -const p71 = p.then(() => Promise.resolve("1"), () => 1); ->p71 : Promise +const pb1 = p.then(() => Promise.resolve("1"), null); +>pb1 : Promise +>p.then(() => Promise.resolve("1"), null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>null : null + +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +>pb2 : Promise >p.then(() => Promise.resolve("1"), () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -735,12 +1317,57 @@ const p71 = p.then(() => Promise.resolve("1"), () => 1); >() => 1 : () => number >1 : 1 -const p72 = p.then(() => Promise.resolve("1"), () => {}); ->p72 : Promise +const pb3 = p.then(() => Promise.resolve("1"), () => x); +>pb3 : Promise +>p.then(() => Promise.resolve("1"), () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => x : () => any +>x : any + +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +>pb4 : Promise +>p.then(() => Promise.resolve("1"), () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => undefined : () => undefined +>undefined : undefined + +const pb5 = p.then(() => Promise.resolve("1"), () => null); +>pb5 : Promise +>p.then(() => Promise.resolve("1"), () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => null : () => null +>null : null + +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +>pb6 : Promise >p.then(() => Promise.resolve("1"), () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -749,12 +1376,12 @@ const p72 = p.then(() => Promise.resolve("1"), () => {}); >"1" : "1" >() => {} : () => void -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); ->p73 : Promise +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +>pb7 : Promise >p.then(() => Promise.resolve("1"), () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -764,12 +1391,12 @@ const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); >() => {throw 1} : () => never >1 : 1 -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); ->p74 : Promise +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +>pb8 : Promise >p.then(() => Promise.resolve("1"), () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -783,12 +1410,12 @@ const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); ->p75 : Promise +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +>pb9 : Promise >p.then(() => Promise.resolve("1"), () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -802,76 +1429,135 @@ const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p80 = p.then(() => Promise.reject(1), undefined); ->p80 : Promise ->p.then(() => Promise.reject(1), undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc0 = p.then(() => Promise.reject("1"), undefined); +>pc0 : Promise +>p.then(() => Promise.reject("1"), undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >undefined : undefined -const p81 = p.then(() => Promise.reject(1), () => 1); ->p81 : Promise ->p.then(() => Promise.reject(1), () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc1 = p.then(() => Promise.reject("1"), null); +>pc1 : Promise +>p.then(() => Promise.reject("1"), null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 ->() => 1 : () => 1 ->1 : 1 +>"1" : "1" +>null : null -const p82 = p.then(() => Promise.reject(1), () => {}); ->p82 : Promise ->p.then(() => Promise.reject(1), () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc2 = p.then(() => Promise.reject("1"), () => 1); +>pc2 : Promise +>p.then(() => Promise.reject("1"), () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => 1 : () => number >1 : 1 + +const pc3 = p.then(() => Promise.reject("1"), () => x); +>pc3 : Promise +>p.then(() => Promise.reject("1"), () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => x : () => any +>x : any + +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +>pc4 : Promise +>p.then(() => Promise.reject("1"), () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => undefined : () => undefined +>undefined : undefined + +const pc5 = p.then(() => Promise.reject("1"), () => null); +>pc5 : Promise +>p.then(() => Promise.reject("1"), () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => null : () => null +>null : null + +const pc6 = p.then(() => Promise.reject("1"), () => {}); +>pc6 : Promise +>p.then(() => Promise.reject("1"), () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" >() => {} : () => void -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); ->p83 : Promise ->p.then(() => Promise.reject(1), () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +>pc7 : Promise +>p.then(() => Promise.reject("1"), () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => {throw 1} : () => never >1 : 1 -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); ->p84 : Promise ->p.then(() => Promise.reject(1), () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +>pc8 : Promise +>p.then(() => Promise.reject("1"), () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -879,18 +1565,18 @@ const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); ->p85 : Promise ->p.then(() => Promise.reject(1), () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); +>pc9 : Promise +>p.then(() => Promise.reject("1"), () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } diff --git a/tests/baselines/reference/promiseVoidErrorCallback.symbols b/tests/baselines/reference/promiseVoidErrorCallback.symbols index 722cd771890e6..799fddc561618 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.symbols +++ b/tests/baselines/reference/promiseVoidErrorCallback.symbols @@ -47,12 +47,12 @@ function f2(x: T1): T2 { var x3 = f1() >x3 : Symbol(x3, Decl(promiseVoidErrorCallback.ts, 20, 3)) ->f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->f1() .then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) +>f1() .then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) .then(f2, (e: Error) => { ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >f2 : Symbol(f2, Decl(promiseVoidErrorCallback.ts, 14, 1)) >e : Symbol(e, Decl(promiseVoidErrorCallback.ts, 21, 15)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -62,7 +62,7 @@ var x3 = f1() }) .then((x: T2) => { ->then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --)) >x : Symbol(x, Decl(promiseVoidErrorCallback.ts, 24, 11)) >T2 : Symbol(T2, Decl(promiseVoidErrorCallback.ts, 2, 1)) diff --git a/tests/baselines/reference/promiseVoidErrorCallback.types b/tests/baselines/reference/promiseVoidErrorCallback.types index 65c9fd0b6893c..bd1b3a87c2603 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.types +++ b/tests/baselines/reference/promiseVoidErrorCallback.types @@ -54,14 +54,14 @@ function f2(x: T1): T2 { var x3 = f1() >x3 : Promise<{ __t3: string; }> >f1() .then(f2, (e: Error) => { throw e;}) .then((x: T2) => { return { __t3: x.__t2 + "bar" };}) : Promise<{ __t3: string; }> ->f1() .then(f2, (e: Error) => { throw e;}) .then : { (onfulfilled?: (value: T2) => T2 | PromiseLike, onrejected?: (reason: any) => T2 | PromiseLike): Promise; (onfulfilled: (value: T2) => T2 | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T2) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T2) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>f1() .then(f2, (e: Error) => { throw e;}) .then : (onfulfilled?: (value: T2) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >f1() .then(f2, (e: Error) => { throw e;}) : Promise ->f1() .then : { (onfulfilled?: (value: T1) => T1 | PromiseLike, onrejected?: (reason: any) => T1 | PromiseLike): Promise; (onfulfilled: (value: T1) => T1 | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T1) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T1) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>f1() .then : (onfulfilled?: (value: T1) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >f1() : Promise >f1 : () => Promise .then(f2, (e: Error) => { ->then : { (onfulfilled?: (value: T1) => T1 | PromiseLike, onrejected?: (reason: any) => T1 | PromiseLike): Promise; (onfulfilled: (value: T1) => T1 | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T1) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T1) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: T1) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >f2 : (x: T1) => T2 >(e: Error) => { throw e;} : (e: Error) => never >e : Error @@ -72,7 +72,7 @@ var x3 = f1() }) .then((x: T2) => { ->then : { (onfulfilled?: (value: T2) => T2 | PromiseLike, onrejected?: (reason: any) => T2 | PromiseLike): Promise; (onfulfilled: (value: T2) => T2 | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T2) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T2) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: T2) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >(x: T2) => { return { __t3: x.__t2 + "bar" };} : (x: T2) => { __t3: string; } >x : T2 >T2 : T2 diff --git a/tests/baselines/reference/promises.symbols b/tests/baselines/reference/promises.symbols index e8f66a92cbb65..19aa9b1450f0d 100644 --- a/tests/baselines/reference/promises.symbols +++ b/tests/baselines/reference/promises.symbols @@ -4,7 +4,7 @@ interface Promise { >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(promises.ts, 0, 18)) then(success?: (value: T) => U): Promise; ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promises.ts, 0, 22), Decl(promises.ts, 1, 51)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promises.ts, 0, 22), Decl(promises.ts, 1, 51)) >U : Symbol(U, Decl(promises.ts, 1, 9)) >success : Symbol(success, Decl(promises.ts, 1, 12)) >value : Symbol(value, Decl(promises.ts, 1, 23)) @@ -14,7 +14,7 @@ interface Promise { >U : Symbol(U, Decl(promises.ts, 1, 9)) then(success?: (value: T) => Promise): Promise; ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promises.ts, 0, 22), Decl(promises.ts, 1, 51)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promises.ts, 0, 22), Decl(promises.ts, 1, 51)) >U : Symbol(U, Decl(promises.ts, 2, 9)) >success : Symbol(success, Decl(promises.ts, 2, 12)) >value : Symbol(value, Decl(promises.ts, 2, 23)) diff --git a/tests/baselines/reference/promises.types b/tests/baselines/reference/promises.types index 90372af206b78..7d255a05ffb82 100644 --- a/tests/baselines/reference/promises.types +++ b/tests/baselines/reference/promises.types @@ -4,7 +4,7 @@ interface Promise { >T : T then(success?: (value: T) => U): Promise; ->then : { (onfulfilled?: (value: T) => T | PromiseLike, onrejected?: (reason: any) => T | PromiseLike): Promise; (onfulfilled: (value: T) => T | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => U): Promise; (success?: (value: T) => Promise): Promise; } +>then : { (onfulfilled?: (value: T) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => U): Promise; (success?: (value: T) => Promise): Promise; } >U : U >success : (value: T) => U >value : T @@ -14,7 +14,7 @@ interface Promise { >U : U then(success?: (value: T) => Promise): Promise; ->then : { (onfulfilled?: (value: T) => T | PromiseLike, onrejected?: (reason: any) => T | PromiseLike): Promise; (onfulfilled: (value: T) => T | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => U): Promise; (success?: (value: T) => Promise): Promise; } +>then : { (onfulfilled?: (value: T) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (success?: (value: T) => U): Promise; (success?: (value: T) => Promise): Promise; } >U : U >success : (value: T) => Promise >value : T diff --git a/tests/baselines/reference/promisesWithConstraints.symbols b/tests/baselines/reference/promisesWithConstraints.symbols index c6ced6b291d0b..edfe83e608c5c 100644 --- a/tests/baselines/reference/promisesWithConstraints.symbols +++ b/tests/baselines/reference/promisesWithConstraints.symbols @@ -4,7 +4,7 @@ interface Promise { >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(promisesWithConstraints.ts, 0, 18)) then(cb: (x: T) => Promise): Promise; ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(promisesWithConstraints.ts, 0, 22)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(promisesWithConstraints.ts, 0, 22)) >U : Symbol(U, Decl(promisesWithConstraints.ts, 1, 9)) >cb : Symbol(cb, Decl(promisesWithConstraints.ts, 1, 12)) >x : Symbol(x, Decl(promisesWithConstraints.ts, 1, 17)) diff --git a/tests/baselines/reference/promisesWithConstraints.types b/tests/baselines/reference/promisesWithConstraints.types index d8ebc002a4f4d..a7f2d1e678778 100644 --- a/tests/baselines/reference/promisesWithConstraints.types +++ b/tests/baselines/reference/promisesWithConstraints.types @@ -4,7 +4,7 @@ interface Promise { >T : T then(cb: (x: T) => Promise): Promise; ->then : { (onfulfilled?: (value: T) => T | PromiseLike, onrejected?: (reason: any) => T | PromiseLike): Promise; (onfulfilled: (value: T) => T | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (cb: (x: T) => Promise): Promise; } +>then : { (onfulfilled?: (value: T) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (cb: (x: T) => Promise): Promise; } >U : U >cb : (x: T) => Promise >x : T diff --git a/tests/baselines/reference/specializationError.symbols b/tests/baselines/reference/specializationError.symbols index 42b37b40c83bc..4879d167713b0 100644 --- a/tests/baselines/reference/specializationError.symbols +++ b/tests/baselines/reference/specializationError.symbols @@ -4,7 +4,7 @@ interface Promise { >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(specializationError.ts, 0, 18)) then(value: T): void; ->then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(specializationError.ts, 0, 22)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(specializationError.ts, 0, 22)) >U : Symbol(U, Decl(specializationError.ts, 1, 9)) >value : Symbol(value, Decl(specializationError.ts, 1, 12)) >T : Symbol(T, Decl(lib.d.ts, --, --), Decl(specializationError.ts, 0, 18)) diff --git a/tests/baselines/reference/specializationError.types b/tests/baselines/reference/specializationError.types index 4260ca399befc..07cbc3d76d0ef 100644 --- a/tests/baselines/reference/specializationError.types +++ b/tests/baselines/reference/specializationError.types @@ -4,7 +4,7 @@ interface Promise { >T : T then(value: T): void; ->then : { (onfulfilled?: (value: T) => T | PromiseLike, onrejected?: (reason: any) => T | PromiseLike): Promise; (onfulfilled: (value: T) => T | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; (value: T): void; } +>then : { (onfulfilled?: (value: T) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike): Promise; (value: T): void; } >U : U >value : T >T : T diff --git a/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName.errors.txt b/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName.errors.txt index 6c0f562ac64d6..09d181ed959f7 100644 --- a/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName.errors.txt +++ b/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName.errors.txt @@ -1,14 +1,21 @@ +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(3,11): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(7,11): error TS2428: All declarations of 'A' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(11,11): error TS2428: All declarations of 'B' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(15,11): error TS2428: All declarations of 'B' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(20,15): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(24,15): error TS2428: All declarations of 'A' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(28,15): error TS2428: All declarations of 'B' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(32,15): error TS2428: All declarations of 'B' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(50,22): error TS2428: All declarations of 'B' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(56,22): error TS2428: All declarations of 'B' must have identical type parameters. -==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts (5 errors) ==== +==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts (10 errors) ==== // type parameter names are relevant when choosing whether to merge interface declarations interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. x: T; } @@ -19,6 +26,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDiffer } interface B { + ~ +!!! error TS2428: All declarations of 'B' must have identical type parameters. x: U; } @@ -30,6 +39,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDiffer module M { interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. x: T; } @@ -40,6 +51,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDiffer } interface B { + ~ +!!! error TS2428: All declarations of 'B' must have identical type parameters. x: U; } @@ -64,6 +77,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDiffer module M3 { export interface B { + ~ +!!! error TS2428: All declarations of 'B' must have identical type parameters. x: U; } } diff --git a/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName2.errors.txt b/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName2.errors.txt index f2a0063c23018..863f77cad1b53 100644 --- a/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName2.errors.txt +++ b/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName2.errors.txt @@ -1,13 +1,18 @@ +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts(3,11): error TS2428: All declarations of 'B' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts(7,11): error TS2428: All declarations of 'B' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts(8,8): error TS2304: Cannot find name 'V'. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts(12,15): error TS2428: All declarations of 'B' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts(16,15): error TS2428: All declarations of 'B' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts(34,22): error TS2428: All declarations of 'B' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts(40,22): error TS2428: All declarations of 'B' must have identical type parameters. -==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts (4 errors) ==== +==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts (7 errors) ==== // type parameter names are relevant when choosing whether to merge interface declarations interface B { + ~ +!!! error TS2428: All declarations of 'B' must have identical type parameters. x: U; } @@ -21,6 +26,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDiffer module M { interface B { + ~ +!!! error TS2428: All declarations of 'B' must have identical type parameters. x: U; } @@ -45,6 +52,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDiffer module M3 { export interface B { + ~ +!!! error TS2428: All declarations of 'B' must have identical type parameters. x: U; } } diff --git a/tests/baselines/reference/twoGenericInterfacesWithDifferentConstraints.errors.txt b/tests/baselines/reference/twoGenericInterfacesWithDifferentConstraints.errors.txt index 4b2455773f58c..71d6f73d864ad 100644 --- a/tests/baselines/reference/twoGenericInterfacesWithDifferentConstraints.errors.txt +++ b/tests/baselines/reference/twoGenericInterfacesWithDifferentConstraints.errors.txt @@ -1,10 +1,15 @@ +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts(1,11): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts(5,11): error TS2428: All declarations of 'A' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts(10,15): error TS2428: All declarations of 'B' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts(14,15): error TS2428: All declarations of 'B' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts(32,22): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts(38,22): error TS2428: All declarations of 'A' must have identical type parameters. -==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts (3 errors) ==== +==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts (6 errors) ==== interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. x: T; } @@ -16,6 +21,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDi module M { interface B> { + ~ +!!! error TS2428: All declarations of 'B' must have identical type parameters. x: T; } @@ -40,6 +47,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDi module M3 { export interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. x: T; } } diff --git a/tests/baselines/reference/twoGenericInterfacesWithTheSameNameButDifferentArity.errors.txt b/tests/baselines/reference/twoGenericInterfacesWithTheSameNameButDifferentArity.errors.txt index de4c4d8e1c33e..5f1b401e2a95f 100644 --- a/tests/baselines/reference/twoGenericInterfacesWithTheSameNameButDifferentArity.errors.txt +++ b/tests/baselines/reference/twoGenericInterfacesWithTheSameNameButDifferentArity.errors.txt @@ -1,10 +1,15 @@ +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts(1,11): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts(5,11): error TS2428: All declarations of 'A' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts(10,15): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts(14,15): error TS2428: All declarations of 'A' must have identical type parameters. +tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts(32,22): error TS2428: All declarations of 'A' must have identical type parameters. tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts(38,22): error TS2428: All declarations of 'A' must have identical type parameters. -==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts (3 errors) ==== +==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts (6 errors) ==== interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. x: T; } @@ -16,6 +21,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTh module M { interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. x: T; } @@ -40,6 +47,8 @@ tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTh module M3 { export interface A { + ~ +!!! error TS2428: All declarations of 'A' must have identical type parameters. x: T; } } diff --git a/tests/cases/compiler/genericDefaults.ts b/tests/cases/compiler/genericDefaults.ts new file mode 100644 index 0000000000000..bba6549cfc196 --- /dev/null +++ b/tests/cases/compiler/genericDefaults.ts @@ -0,0 +1,481 @@ +// @declaration: true +interface A { a: number; } +interface B { b: number; } +interface C { c: number; } +interface D { d: number; } +interface AB { a: number; b: number; } +interface BC { b: number; c: number; } + +declare const a: A; +declare const b: B; +declare const c: C; +declare const d: D; +declare const ab: AB; +declare const bc: BC; +declare const x: any; + +// function without type parameters +declare function f00(a?: A): A; +// no inference +f00(); +f00(a); + +// function with a type parameter without a default +declare function f01(a?: T): T; +// inference +f01(); +f01(a); +// no inference, fully supplied +f01(); +f01(a); + +// function with a type paramter with a default +declare function f02(a?: T): T; +// inference +f02(); +f02(a); +f02(b); +// no inference, fully supplied +f02(); +f02(a); +f02(); +f02(b); + +// function with a type parameter with a default that refers to itself +declare function f03(a?: T): T; +// inference +f03(); +f03(a); +f03(b); +// no inference, fully supplied +f03(); +f03(a); +f03(); +f03(b); + +// function with a type paramter without a default and a type parameter with a default +declare function f04(a?: T, b?: U): [T, U]; +// inference +f04(); +f04(a); +f04(a, b); +f04(a, c); +// no inference, partially supplied +f04(); +f04(a); +f04(a, b); +// no inference, fully supplied +f04(); +f04(a); +f04(a, b); +f04(); +f04(a); +f04(a, c); + +// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter +declare function f05(a?: T, b?: U): [T, U]; +// inference +f05(); +f05(a); +f05(a, a); +f05(a, b); +// no inference, partially supplied +f05(); +f05(a); +f05(a, a); +// no inference, fully supplied +f05(); +f05(a); +f05(a, b); + +// function with a type parameter with a default that refers to an earlier type parameter with a default +declare function f06(a?: T, b?: U): [T, U]; +// inference +f06(); +f06(a); +f06(a, a); +f06(a, b); +f06(b, a); +f06(b, b); +// no inference, partially supplied +f06(); +f06(a); +f06(a, a); +f06(); +f06(b); +f06(b, b); +// no inference, fully supplied +f06(); +f06(a); +f06(a, b); +f06(); +f06(b); +f06(b, c); + +// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter with a default +declare function f07(a?: T, b?: U, c?: V): [T, U, V]; +// inference +f07(); +f07(a, b); +f07(a, c); +f07(a, b, b); +f07(a, b, c); +f07(a, c, b); +f07(a, c, c); +// no inference, partially supplied +f07(); +f07(a); +f07(a, b); +f07(a, b, b); +f07(); +f07(a); +f07(a, b); +f07(a, b, b); +f07(); +f07(a); +f07(a, c); +f07(a, c, c); +// no inference, fully supplied +f07(); +f07(a); +f07(a, b); +f07(a, b, c); +f07(); +f07(a); +f07(a, c); +f07(a, c, d); + +// function with a type parameter with a default that refers to an earlier type parameter with a constraint +declare function f08(a?: T, b?: U): [T, U]; +// inference +f08(); +f08(a); +f08(a, a); +f08(a, b); +// no inference, partially supplied +f08(); +f08(a); +f08(a, a); +// no inference, fully supplied +f08(); +f08(a); +f08(a, b); + +// function with a type parameter with a constraint and a default that refers to an earlier type parameter +declare function f09(a?: T, b?: U): [T, U]; +// inference +f09(); +f09(a); +f09(a, a); +f09(a, ab); +// no inference, partially supplied +f09(); +f09(a); +f09(a, a); +f09(a, ab); +// no inference, fully supplied +f09(); +f09(a); +f09(a, ab); + +// function with a type parameter with a constraint and a default that refers to an earlier type parameter with a constraint +declare function f10(a?: T, b?: U): [T, U]; +// inference +f10(); +f10(a); +f10(a, a); +f10(a, ab); +// no inference, partially supplied +f10(); +f10(a); +f10(a, a); +f10(a, ab); +// no inference, fully supplied +f10(); +f10(a); +f10(a, a); +f10(a, ab); +f10(); +f10(a); +f10(a, ab); + +// function with a type parameter with a default that refers to an earier type parameter in a union +declare function f11(a?: T, b?: U): [T, U]; +// inference +f11(); +f11(a); +f11(a, a); +f11(a, b); +f11(a, c); +// no inference, partially supplied +f11(); +f11(a); +f11(a, a); +f11(a, b); +// no inference, fully supplied +f11(); +f11(a); +f11(a, c); + +// function with a type parameter with a default that refers to an earlier type parameter in an intersection +declare function f12(a?: T, b?: U): [T, U]; +// inference +f12(); +f12(a); +f12(a, a); +f12(a, b); +f12(a, c); +// no inference, partially supplied +f12(); +f12(a); +f12(a, ab); +// no inference, fully supplied +f12(); +f12(a); +f12(a, c); + +// function with a type parameter with a default that refers to a later type parameter with a default +declare function f13(a?: T, b?: U): [T, U]; +// inference +f13(); +f13(a); +f13(a, b); +f13(a, c); +// no inference, partially supplied +f13(); +f13(a); +f13(a, b); +// no inference, fully supplied +f13(); +f13(a); +f13(a, c); +f13(a, c); + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default +declare function f14(a?: T, b?: U, c?: V): [T, U, V]; +// inference +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +f14(a, b, d); +// no inference, partially supplied +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +f14(); +f14(a); +f14(a, b); +f14(a, b, c); +// no inference fully supplied +f14(); +f14(a); +f14(a, b); +f14(a, b, d); + +// function with two type parameters with defaults that mutually refer to each other +declare function f15(a?: T, b?: U): [T, U]; +// inference +f15(); +f15(a); +f15(a, b); +// no inference, partially supplied +f15(); +f15(a); +f15(a, a); +// no inference, fully supplied +f15(); +f15(a); +f15(a, b); + +// function with a type parameter without a default and two type parameters with defaults that mutually refer to each other +declare function f16(a?: T, b?: U, c?: V): [T, U, V]; +// no inference +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +// no inference, partially supplied +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +f16(); +f16(a); +f16(a, b); +f16(a, b, b); +// no inference, fully supplied +f16(); +f16(a); +f16(a, b); +f16(a, b, d); + +// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union +declare function f17(a?: T, b?: U): [T, U]; +// inference +f17(); +f17(a); +f17(a, a); +f17(a, b); +f17(a, c); +// no inference, partially supplied +f17(); +f17(a); +f17(a, a); +f17(a, b); +// no inference, fully supplied +f17(); +f17(a); +f17(a, c); + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union +declare function f18(a?: T, b?: U, c?: V): [T, U, V]; +// inference +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +// no inference, partially supplied +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +f18(); +f18(a); +f18(a, b); +f18(a, b, b); +f18(a, b, c); +// no inference, fully supplied +f18(); +f18(a); +f18(a, b); +f18(a, b, d); + +// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection +declare function f19(a?: T, b?: U): [T, U]; +// inference +f19(); +f19(a); +f19(a, a); +f19(a, b); +f19(a, ab); +f19(a, c); +// no inference, partially supplied +f19(); +f19(a); +f19(a, ab); +// no inference, fully supplied +f19(); +f19(a); +f19(a, c); + +// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection +declare function f20(a?: T, b?: U, c?: V): [T, U, V]; +// inference +f20(); +f20(a); +f20(a, b); +f20(a, b, c); +// no inference, partially supplied +f20(); +f20(a); +f20(a, b); +f20(a, b, bc); +f20(); +f20(a); +f20(a, b); +f20(a, b, bc); +// no inference, fully supplied +f20(); +f20(a); +f20(a, b); +f20(a, b, d); + +interface i00 { a: T; } +const i00c00 = (x).a; +const i00c01 = (>x).a; + +interface i01 { a: [T, U]; } +const i01c00 = (>x).a; +const i01c01 = (>x).a; + +interface i02 { a: [T, U]; } +const i02c00 = (>x).a; +const i02c01 = (>x).a; +const i02c02 = (>x).a; +const i02c03 = (>x).a; +const i02c04 = (>x).a; + +interface i03 { a: [T, U]; } +const i03c00 = (>x).a; +const i03c01 = (>x).a; +const i03c02 = (>x).a; +const i03c03 = (>x).a; +const i03c04 = (>x).a; + +interface i04 {} +interface i04 {} +interface i04 {} +interface i04 {} + +interface i05 { a: T; } +const i05c00 = (x).a; +const i05c01 = (>x).a; + +interface i06 { a: [T, U]; } +const i06c00 = (x).a; +const i06c01 = (>x).a; +const i06c02 = (>x).a; + +interface i07 { a: A; } +interface i07 { b: A; } +const i07c00 = (x).a; +const i07c01 = (x).b; +const i07c02 = (>x).a; +const i07c03 = (>x).b; + +interface Base01 { a: T; } +interface Base01Constructor { new (a?: T): Base01; } + +declare const Base01: Base01Constructor; +const Base01c00 = new Base01(); +const Base01c01 = new Base01(1); +const Base01c02 = new Base01(); +const Base01c03 = new Base01(1); + +declare class Derived01 extends Base01 { } +const Derived01c00 = new Derived01(); +const Derived01c01 = new Derived01(1); +const Derived01c02 = new Derived01(); +const Derived01c03 = new Derived01(1); + +declare class Derived02 extends Base01 { } +const Derived02c00 = new Derived02(); +const Derived02c01 = new Derived02(1); +const Derived02c02 = new Derived02(); +const Derived02c03 = new Derived02(1); + +type t00 = { a: T; } +const t00c00 = (x).a; +const t00c01 = (>x).a; + +type t01 = { a: [T, U]; } +const t01c00 = (>x).a; +const t01c01 = (>x).a; + +type t02 = { a: [T, U]; } +const t02c00 = (>x).a; +const t02c01 = (>x).a; +const t02c02 = (>x).a; +const t02c03 = (>x).a; +const t02c04 = (>x).a; + +type t03 = { a: [T, U]; } +const t03c00 = (>x).a; +const t03c01 = (>x).a; +const t03c02 = (>x).a; +const t03c03 = (>x).a; +const t03c04 = (>x).a; diff --git a/tests/cases/compiler/genericDefaultsErrors.ts b/tests/cases/compiler/genericDefaultsErrors.ts new file mode 100644 index 0000000000000..4ea42beb3da1a --- /dev/null +++ b/tests/cases/compiler/genericDefaultsErrors.ts @@ -0,0 +1,41 @@ +// @declaration: true + +declare const x: any; + +declare function f03(): void; // error +declare function f04(): void; // error +declare function f05(): void; // error +declare function f06(): void; // error + +declare function f11(): void; +f11(); // ok +f11<1>(); // error +f11<1, 2>(); // ok +f11<1, 2, 3>(); // ok +f11<1, 2, 3, 4>(); // error + +declare function f12(a?: U): void; +f12(); // ok +f12("a"); // error + +interface i00 { } // ok +interface i00 { } // error + +interface i01 { } // ok +interface i01 { } // error + +interface i04 { } // error +interface i05 { } // error +interface i06 { } // error +interface i07 { } // error +interface i08 { } // error + +interface i09 { } +type i09t00 = i09; // error +type i09t01 = i09<1>; // error +type i09t02 = i09<1, 2>; // ok +type i09t03 = i09<1, 2, 3>; // ok +type i09t04 = i09<1, 2, 3, 4>; // error + +interface i10 { x: T; } // error +interface i10 {} \ No newline at end of file diff --git a/tests/cases/compiler/promiseType.ts b/tests/cases/compiler/promiseType.ts index b105485b2442e..ba4a7f6041396 100644 --- a/tests/cases/compiler/promiseType.ts +++ b/tests/cases/compiler/promiseType.ts @@ -1,16 +1,6 @@ // @target: es6 declare var p: Promise; - -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); +declare var x: any; async function A() { const a = await p; @@ -22,17 +12,15 @@ async function B() { return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { + try { + const a = await p; + return 1; + } + catch (e) { + return 'error'; + } +} async function D() { try { @@ -96,61 +84,136 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => {}); -const p04 = p.catch(() => {throw 1}); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); - -const p10 = p.then(); +const p01 = p.then(); + +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => {}); +const p17 = p.catch(() => {throw 1}); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => {}); -const p23 = p.then(() => {throw 1}); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => {}); +const p27 = p.then(() => {throw 1}); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => {}); -const p33 = p.then(undefined, () => {throw 1}); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); - -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => {}); -const p43 = p.then(() => "1", () => {throw 1}); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); - -const p50 = p.then(() => {}, undefined); -const p51 = p.then(() => {}, () => 1); -const p52 = p.then(() => {}, () => {}); -const p53 = p.then(() => {}, () => {throw 1}); -const p54 = p.then(() => {}, () => Promise.resolve(1)); -const p55 = p.then(() => {}, () => Promise.reject(1)); - -const p60 = p.then(() => {throw 1}, undefined); -const p61 = p.then(() => {throw 1}, () => 1); -const p62 = p.then(() => {throw 1}, () => {}); -const p63 = p.then(() => {throw 1}, () => {throw 1}); -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); - -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => {}); -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); - -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => {}); -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); \ No newline at end of file +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => {}); +const p37 = p.then(undefined, () => {throw 1}); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); + +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => {}); +const p47 = p.then(null, () => {throw 1}); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); + +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => {}); +const p57 = p.then(() => "1", () => {throw 1}); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); + +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => {}); +const p67 = p.then(() => x, () => {throw 1}); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); + +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => {}); +const p77 = p.then(() => undefined, () => {throw 1}); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); + +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => {}); +const p87 = p.then(() => null, () => {throw 1}); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); + +const p90 = p.then(() => {}, undefined); +const p91 = p.then(() => {}, null); +const p92 = p.then(() => {}, () => 1); +const p93 = p.then(() => {}, () => x); +const p94 = p.then(() => {}, () => undefined); +const p95 = p.then(() => {}, () => null); +const p96 = p.then(() => {}, () => {}); +const p97 = p.then(() => {}, () => {throw 1}); +const p98 = p.then(() => {}, () => Promise.resolve(1)); +const p99 = p.then(() => {}, () => Promise.reject(1)); + +const pa0 = p.then(() => {throw 1}, undefined); +const pa1 = p.then(() => {throw 1}, null); +const pa2 = p.then(() => {throw 1}, () => 1); +const pa3 = p.then(() => {throw 1}, () => x); +const pa4 = p.then(() => {throw 1}, () => undefined); +const pa5 = p.then(() => {throw 1}, () => null); +const pa6 = p.then(() => {throw 1}, () => {}); +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); + +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); + +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => {}); +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); diff --git a/tests/cases/compiler/promiseTypeStrictNull.ts b/tests/cases/compiler/promiseTypeStrictNull.ts index ce6dcd364618f..fc0125412a43d 100644 --- a/tests/cases/compiler/promiseTypeStrictNull.ts +++ b/tests/cases/compiler/promiseTypeStrictNull.ts @@ -1,17 +1,7 @@ // @target: es6 // @strictNullChecks: true declare var p: Promise; - -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); +declare var x: any; async function A() { const a = await p; @@ -23,17 +13,15 @@ async function B() { return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { + try { + const a = await p; + return 1; + } + catch (e) { + return 'error'; + } +} async function D() { try { @@ -97,61 +85,136 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => {}); -const p04 = p.catch(() => {throw 1}); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); - -const p10 = p.then(); +const p01 = p.then(); + +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => {}); +const p17 = p.catch(() => {throw 1}); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => {}); -const p23 = p.then(() => {throw 1}); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => {}); +const p27 = p.then(() => {throw 1}); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => {}); -const p33 = p.then(undefined, () => {throw 1}); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); - -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => {}); -const p43 = p.then(() => "1", () => {throw 1}); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); - -const p50 = p.then(() => {}, undefined); -const p51 = p.then(() => {}, () => 1); -const p52 = p.then(() => {}, () => {}); -const p53 = p.then(() => {}, () => {throw 1}); -const p54 = p.then(() => {}, () => Promise.resolve(1)); -const p55 = p.then(() => {}, () => Promise.reject(1)); - -const p60 = p.then(() => {throw 1}, undefined); -const p61 = p.then(() => {throw 1}, () => 1); -const p62 = p.then(() => {throw 1}, () => {}); -const p63 = p.then(() => {throw 1}, () => {throw 1}); -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); - -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => {}); -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); - -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => {}); -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); \ No newline at end of file +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => {}); +const p37 = p.then(undefined, () => {throw 1}); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); + +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => {}); +const p47 = p.then(null, () => {throw 1}); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); + +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => {}); +const p57 = p.then(() => "1", () => {throw 1}); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); + +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => {}); +const p67 = p.then(() => x, () => {throw 1}); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); + +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => {}); +const p77 = p.then(() => undefined, () => {throw 1}); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); + +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => {}); +const p87 = p.then(() => null, () => {throw 1}); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); + +const p90 = p.then(() => {}, undefined); +const p91 = p.then(() => {}, null); +const p92 = p.then(() => {}, () => 1); +const p93 = p.then(() => {}, () => x); +const p94 = p.then(() => {}, () => undefined); +const p95 = p.then(() => {}, () => null); +const p96 = p.then(() => {}, () => {}); +const p97 = p.then(() => {}, () => {throw 1}); +const p98 = p.then(() => {}, () => Promise.resolve(1)); +const p99 = p.then(() => {}, () => Promise.reject(1)); + +const pa0 = p.then(() => {throw 1}, undefined); +const pa1 = p.then(() => {throw 1}, null); +const pa2 = p.then(() => {throw 1}, () => 1); +const pa3 = p.then(() => {throw 1}, () => x); +const pa4 = p.then(() => {throw 1}, () => undefined); +const pa5 = p.then(() => {throw 1}, () => null); +const pa6 = p.then(() => {throw 1}, () => {}); +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); + +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); + +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => {}); +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1));