Change the default type parameter constraints and defaults to unknown from {} (#30637)

* Change the default type parameter constraint and default to unknown from {}

* Relax unknown checking outside of strictNullChecks a bit

* Increase strictness on index signatures with type `unknown` so inference doesnt change surprisingly

* Remove redundant switch
This commit is contained in:
Wesley Wigham authored and GitHub committed 2019-04-04 12:25:15 -07:00
1 parent 8c51115be1
commit 16450a027a
133 files changed
+1309 -835

No files matched your search

+23 -22
View File
@@ -7330,7 +7330,7 @@ namespace ts {
const declaredType = <MappedType>getTypeFromMappedTypeNode(type.declaration);
const constraint = getConstraintTypeFromMappedType(declaredType);
const extendedConstraint = constraint && constraint.flags & TypeFlags.TypeParameter ? getConstraintOfTypeParameter(<TypeParameter>constraint) : constraint;
type.modifiersType = extendedConstraint && extendedConstraint.flags & TypeFlags.Index ? instantiateType((<IndexType>extendedConstraint).type, type.mapper || identityMapper) : emptyObjectType;
type.modifiersType = extendedConstraint && extendedConstraint.flags & TypeFlags.Index ? instantiateType((<IndexType>extendedConstraint).type, type.mapper || identityMapper) : unknownType;
}
}
return type.modifiersType;
@@ -7773,7 +7773,7 @@ namespace ts {
* type itself. Note that the apparent type of a union type is the union type itself.
*/
function getApparentType(type: Type): Type {
const t = type.flags & TypeFlags.Instantiable ? getBaseConstraintOfType(type) || emptyObjectType : type;
const t = type.flags & TypeFlags.Instantiable ? getBaseConstraintOfType(type) || unknownType : type;
return getObjectFlags(t) & ObjectFlags.Mapped ? getApparentTypeOfMappedType(<MappedType>t) :
t.flags & TypeFlags.Intersection ? getApparentTypeOfIntersectionType(<IntersectionType>t) :
t.flags & TypeFlags.StringLike ? globalStringType :
@@ -7783,6 +7783,7 @@ namespace ts {
t.flags & TypeFlags.ESSymbolLike ? getGlobalESSymbolType(/*reportErrors*/ languageVersion >= ScriptTarget.ES2015) :
t.flags & TypeFlags.NonPrimitive ? emptyObjectType :
t.flags & TypeFlags.Index ? keyofConstraintType :
t.flags & TypeFlags.Unknown && !strictNullChecks ? emptyObjectType :
t;
}
@@ -8106,7 +8107,7 @@ namespace ts {
const baseDefaultType = getDefaultTypeArgumentType(isJavaScriptImplicitAny);
for (let i = numTypeArguments; i < numTypeParameters; i++) {
let defaultType = getDefaultFromTypeParameter(typeParameters![i]);
if (isJavaScriptImplicitAny && defaultType && isTypeIdenticalTo(defaultType, emptyObjectType)) {
if (isJavaScriptImplicitAny && defaultType && (isTypeIdenticalTo(defaultType, unknownType) || isTypeIdenticalTo(defaultType, emptyObjectType))) {
defaultType = anyType;
}
result[i] = defaultType ? instantiateType(defaultType, createTypeMapper(typeParameters!, result)) : baseDefaultType;
@@ -8485,7 +8486,7 @@ namespace ts {
const typeParameters = signature.typeParameters;
if (typeParameters) {
const typeEraser = createTypeEraser(typeParameters);
const baseConstraints = map(typeParameters, tp => instantiateType(getBaseConstraintOfType(tp), typeEraser) || emptyObjectType);
const baseConstraints = map(typeParameters, tp => instantiateType(getBaseConstraintOfType(tp), typeEraser) || unknownType);
return instantiateSignature(signature, createTypeMapper(typeParameters, baseConstraints), /*eraseTypeParameters*/ true);
}
return signature;
@@ -10799,7 +10800,7 @@ namespace ts {
* This is used during inference when instantiating type parameter defaults.
*/
function createBackreferenceMapper(context: InferenceContext, index: number): TypeMapper {
return t => findIndex(context.inferences, info => info.typeParameter === t) >= index ? emptyObjectType : t;
return t => findIndex(context.inferences, info => info.typeParameter === t) >= index ? unknownType : t;
}
function combineTypeMappers(mapper1: TypeMapper | undefined, mapper2: TypeMapper): TypeMapper;
@@ -11346,7 +11347,7 @@ namespace ts {
function isTypeDerivedFrom(source: Type, target: Type): boolean {
return source.flags & TypeFlags.Union ? every((<UnionType>source).types, t => isTypeDerivedFrom(t, target)) :
target.flags & TypeFlags.Union ? some((<UnionType>target).types, t => isTypeDerivedFrom(source, t)) :
source.flags & TypeFlags.InstantiableNonPrimitive ? isTypeDerivedFrom(getBaseConstraintOfType(source) || emptyObjectType, target) :
source.flags & TypeFlags.InstantiableNonPrimitive ? isTypeDerivedFrom(getBaseConstraintOfType(source) || unknownType, target) :
target === globalObjectType ? !!(source.flags & (TypeFlags.Object | TypeFlags.NonPrimitive)) :
target === globalFunctionType ? !!(source.flags & TypeFlags.Object) && isFunctionObjectType(source as ObjectType) :
hasBaseType(source, getTargetType(target));
@@ -13349,7 +13350,7 @@ namespace ts {
return indexTypesIdenticalTo(source, target, kind);
}
const targetInfo = getIndexInfoOfType(target, kind);
if (!targetInfo || targetInfo.type.flags & TypeFlags.AnyOrUnknown && !sourceIsPrimitive) {
if (!targetInfo || targetInfo.type.flags & TypeFlags.Any && !sourceIsPrimitive) {
// Index signature of type any permits assignment from everything but primitives
return Ternary.True;
}
@@ -14500,7 +14501,7 @@ namespace ts {
const templateType = getTemplateTypeFromMappedType(target);
const inference = createInferenceInfo(typeParameter);
inferTypes([inference], sourceType, templateType);
return getTypeFromInference(inference) || emptyObjectType;
return getTypeFromInference(inference) || unknownType;
}
function* getUnmatchedProperties(source: Type, target: Type, requireOptionalProperties: boolean, matchDiscriminantProperties: boolean) {
@@ -15099,7 +15100,7 @@ namespace ts {
}
function getDefaultTypeArgumentType(isInJavaScriptFile: boolean): Type {
return isInJavaScriptFile ? anyType : emptyObjectType;
return isInJavaScriptFile ? anyType : unknownType;
}
function getInferredTypes(context: InferenceContext): Type[] {
@@ -15443,7 +15444,7 @@ namespace ts {
return strictNullChecks ? TypeFacts.ObjectStrictFacts : TypeFacts.ObjectFacts;
}
if (flags & TypeFlags.Instantiable) {
return getTypeFacts(getBaseConstraintOfType(type) || emptyObjectType);
return getTypeFacts(getBaseConstraintOfType(type) || unknownType);
}
if (flags & TypeFlags.UnionOrIntersection) {
return getTypeFactsOfTypes((<UnionOrIntersectionType>type).types);
@@ -16754,7 +16755,7 @@ namespace ts {
}
function typeHasNullableConstraint(type: Type) {
return type.flags & TypeFlags.InstantiableNonPrimitive && maybeTypeOfKind(getBaseConstraintOfType(type) || emptyObjectType, TypeFlags.Nullable);
return type.flags & TypeFlags.InstantiableNonPrimitive && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, TypeFlags.Nullable);
}
function getConstraintForLocation(type: Type, node: Node): Type;
@@ -18204,7 +18205,7 @@ namespace ts {
}
function getJsxPropsTypeFromCallSignature(sig: Signature, context: JsxOpeningLikeElement) {
let propsType = getTypeOfFirstParameterOfSignatureWithFallback(sig, emptyObjectType);
let propsType = getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType);
propsType = getJsxManagedAttributesFromLocatedAttributes(context, getJsxNamespaceAt(context), propsType);
const intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
if (intrinsicAttribs !== errorType) {
@@ -18278,7 +18279,7 @@ namespace ts {
const forcedLookupLocation = getJsxElementPropertiesName(ns);
let attributesType = forcedLookupLocation === undefined
// If there is no type ElementAttributesProperty, return the type of the first parameter of the signature, which should be the props type
? getTypeOfFirstParameterOfSignatureWithFallback(sig, emptyObjectType)
? getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType)
: forcedLookupLocation === ""
// If there is no e.g. 'props' member in ElementAttributesProperty, use the element class type instead
? getReturnTypeOfSignature(sig)
@@ -18290,7 +18291,7 @@ namespace ts {
if (!!forcedLookupLocation && !!length(context.attributes.properties)) {
error(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation));
}
return emptyObjectType;
return unknownType;
}
attributesType = getJsxManagedAttributesFromLocatedAttributes(context, ns, attributesType);
@@ -19501,7 +19502,7 @@ namespace ts {
undefinedDiagnostic?: DiagnosticMessage,
nullOrUndefinedDiagnostic?: DiagnosticMessage
): Type {
if (type.flags & TypeFlags.Unknown) {
if (strictNullChecks && type.flags & TypeFlags.Unknown) {
error(node, Diagnostics.Object_is_of_type_unknown);
return errorType;
}
@@ -22000,7 +22001,7 @@ namespace ts {
const decl = parameter.valueDeclaration as ParameterDeclaration;
if (decl.name.kind !== SyntaxKind.Identifier) {
// if inference didn't come up with anything but {}, fall back to the binding pattern if present.
if (links.type === emptyObjectType) {
if (links.type === unknownType) {
links.type = getTypeFromBindingPattern(decl.name);
}
assignBindingElementTypes(decl.name);
@@ -22013,11 +22014,11 @@ namespace ts {
const globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true);
if (globalPromiseType !== emptyGenericType) {
// if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type
promisedType = getAwaitedType(promisedType) || emptyObjectType;
promisedType = getAwaitedType(promisedType) || unknownType;
return createTypeReference(globalPromiseType, [promisedType]);
}
return emptyObjectType;
return unknownType;
}
function createPromiseLikeType(promisedType: Type): Type {
@@ -22025,16 +22026,16 @@ namespace ts {
const globalPromiseLikeType = getGlobalPromiseLikeType(/*reportErrors*/ true);
if (globalPromiseLikeType !== emptyGenericType) {
// if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type
promisedType = getAwaitedType(promisedType) || emptyObjectType;
promisedType = getAwaitedType(promisedType) || unknownType;
return createTypeReference(globalPromiseLikeType, [promisedType]);
}
return emptyObjectType;
return unknownType;
}
function createPromiseReturnType(func: FunctionLikeDeclaration | ImportCall, promisedType: Type) {
const promiseType = createPromiseType(promisedType);
if (promiseType === emptyObjectType) {
if (promiseType === unknownType) {
error(func, isImportCall(func) ?
Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option :
Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
@@ -23467,7 +23468,7 @@ namespace ts {
// If the contextual type is a type variable constrained to a primitive type, consider
// this a literal context for literals of that primitive type. For example, given a
// type parameter 'T extends string', infer string literal types for T.
const constraint = getBaseConstraintOfType(contextualType) || emptyObjectType;
const constraint = getBaseConstraintOfType(contextualType) || unknownType;
return maybeTypeOfKind(constraint, TypeFlags.String) && maybeTypeOfKind(candidateType, TypeFlags.StringLiteral) ||
maybeTypeOfKind(constraint, TypeFlags.Number) && maybeTypeOfKind(candidateType, TypeFlags.NumberLiteral) ||
maybeTypeOfKind(constraint, TypeFlags.BigInt) && maybeTypeOfKind(candidateType, TypeFlags.BigIntLiteral) ||
@@ -136,24 +136,24 @@ class C2<T, U> {
}
}
var r6 = (new C2()).f<number>(1, '');
>r6 : {}
>(new C2()).f<number>(1, '') : {}
>(new C2()).f : (x: {}, y: {}) => {}
>(new C2()) : C2<{}, {}>
>new C2() : C2<{}, {}>
>r6 : unknown
>(new C2()).f<number>(1, '') : unknown
>(new C2()).f : (x: unknown, y: unknown) => unknown
>(new C2()) : C2<unknown, unknown>
>new C2() : C2<unknown, unknown>
>C2 : typeof C2
>f : (x: {}, y: {}) => {}
>f : (x: unknown, y: unknown) => unknown
>1 : 1
>'' : ""
var r6b = (new C2()).f<number, string, number>(1, '');
>r6b : {}
>(new C2()).f<number, string, number>(1, '') : {}
>(new C2()).f : (x: {}, y: {}) => {}
>(new C2()) : C2<{}, {}>
>new C2() : C2<{}, {}>
>r6b : unknown
>(new C2()).f<number, string, number>(1, '') : unknown
>(new C2()).f : (x: unknown, y: unknown) => unknown
>(new C2()) : C2<unknown, unknown>
>new C2() : C2<unknown, unknown>
>C2 : typeof C2
>f : (x: {}, y: {}) => {}
>f : (x: unknown, y: unknown) => unknown
>1 : 1
>'' : ""
@@ -83,13 +83,13 @@ class C2<T> {
}
}
var r6 = (new C2()).f(1);
>r6 : {}
>(new C2()).f(1) : {}
>(new C2()).f : (x: {}) => {}
>(new C2()) : C2<{}>
>new C2() : C2<{}>
>r6 : unknown
>(new C2()).f(1) : unknown
>(new C2()).f : (x: unknown) => unknown
>(new C2()) : C2<unknown>
>new C2() : C2<unknown>
>C2 : typeof C2
>f : (x: {}) => {}
>f : (x: unknown) => unknown
>1 : 1
interface I2<T> {
@@ -0,0 +1,144 @@
tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts(63,84): error TS2344: Type 'GetProps<C>' does not satisfy the constraint 'Shared<TInjectedProps, GetProps<C>>'.
Type 'unknown' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
Type 'Matching<TInjectedProps, GetProps<C>>' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[P] | (TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type '(TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]) | GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] | GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type '(TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]) | GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string] | GetProps<C>[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
==== tests/cases/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts (1 errors) ====
declare class Component<P> {
constructor(props: Readonly<P>);
constructor(props: P, context?: any);
readonly props: Readonly<P> & Readonly<{ children?: {} }>;
}
interface ComponentClass<P = {}> {
new (props: P, context?: any): Component<P>;
propTypes?: WeakValidationMap<P>;
defaultProps?: Partial<P>;
displayName?: string;
}
interface FunctionComponent<P = {}> {
(props: P & { children?: {} }, context?: any): {} | null;
propTypes?: WeakValidationMap<P>;
defaultProps?: Partial<P>;
displayName?: string;
}
export declare const nominalTypeHack: unique symbol;
export interface Validator<T> {
(props: object, propName: string, componentName: string, location: string, propFullName: string): Error | null;
[nominalTypeHack]?: T;
}
type WeakValidationMap<T> = {
[K in keyof T]?: null extends T[K]
? Validator<T[K] | null | undefined>
: undefined extends T[K]
? Validator<T[K] | null | undefined>
: Validator<T[K]>
};
type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
export type Shared<
InjectedProps,
DecorationTargetProps extends Shared<InjectedProps, DecorationTargetProps>
> = {
[P in Extract<keyof InjectedProps, keyof DecorationTargetProps>]?: InjectedProps[P] extends DecorationTargetProps[P] ? DecorationTargetProps[P] : never;
};
// Infers prop type from component C
export type GetProps<C> = C extends ComponentType<infer P> ? P : never;
export type ConnectedComponentClass<
C extends ComponentType<any>,
P
> = ComponentClass<P> & {
WrappedComponent: C;
};
export type Matching<InjectedProps, DecorationTargetProps> = {
[P in keyof DecorationTargetProps]: P extends keyof InjectedProps
? InjectedProps[P] extends DecorationTargetProps[P]
? DecorationTargetProps[P]
: InjectedProps[P]
: DecorationTargetProps[P];
};
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type InferableComponentEnhancerWithProps<TInjectedProps, TNeedsProps> =
<C extends ComponentType<Matching<TInjectedProps, GetProps<C>>>>(
component: C
) => ConnectedComponentClass<C, Omit<GetProps<C>, keyof Shared<TInjectedProps, GetProps<C>>> & TNeedsProps>;
~~~~~~~~~~~
!!! error TS2344: Type 'GetProps<C>' does not satisfy the constraint 'Shared<TInjectedProps, GetProps<C>>'.
!!! error TS2344: Type 'unknown' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
!!! error TS2344: Type 'Matching<TInjectedProps, GetProps<C>>' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[P] | (TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]) | GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] | GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]) | GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string] | GetProps<C>[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
@@ -56,7 +56,7 @@ declare var connect: Connect;
const myStoreConnect: Connect = function(
>myStoreConnect : Connect
>function( mapStateToProps?: any, mapDispatchToProps?: any, mergeProps?: any, options: unknown = {},) { return connect( mapStateToProps, mapDispatchToProps, mergeProps, options, );} : (mapStateToProps?: any, mapDispatchToProps?: any, mergeProps?: any, options?: unknown) => InferableComponentEnhancerWithProps<{}, {}>
>function( mapStateToProps?: any, mapDispatchToProps?: any, mergeProps?: any, options: unknown = {},) { return connect( mapStateToProps, mapDispatchToProps, mergeProps, options, );} : (mapStateToProps?: any, mapDispatchToProps?: any, mergeProps?: any, options?: unknown) => InferableComponentEnhancerWithProps<unknown, unknown>
mapStateToProps?: any,
>mapStateToProps : any
@@ -73,7 +73,7 @@ const myStoreConnect: Connect = function(
) {
return connect(
>connect( mapStateToProps, mapDispatchToProps, mergeProps, options, ) : InferableComponentEnhancerWithProps<{}, {}>
>connect( mapStateToProps, mapDispatchToProps, mergeProps, options, ) : InferableComponentEnhancerWithProps<unknown, unknown>
>connect : Connect
mapStateToProps,
@@ -54,8 +54,8 @@ var d = new D(); // error
>D : typeof D
var d2 = new D(1); // ok
>d2 : D<number, {}>
>new D(1) : D<number, {}>
>d2 : D<number, unknown>
>new D(1) : D<number, unknown>
>D : typeof D
>1 : 1
@@ -78,8 +78,8 @@ var d3 = new D(); // error
>D : typeof D
var d4 = new D(1); // ok
>d4 : D<number, {}>
>new D(1) : D<number, {}>
>d4 : D<number, unknown>
>new D(1) : D<number, unknown>
>D : typeof D
>1 : 1
@@ -101,8 +101,8 @@ var d5 = new D(); // error
>D : typeof D
var d6 = new D(1); // ok
>d6 : D<number, {}>
>new D(1) : D<number, {}>
>d6 : D<number, unknown>
>new D(1) : D<number, unknown>
>D : typeof D
>1 : 1
@@ -113,8 +113,8 @@ module Generics {
>C2 : typeof C2
var c4 = new C2(''); // ok
>c4 : C2<string, {}>
>new C2('') : C2<string, {}>
>c4 : C2<string, unknown>
>new C2('') : C2<string, unknown>
>C2 : typeof C2
>'' : ""
@@ -135,14 +135,14 @@ module Generics {
>D : typeof D
var d2 = new D(1); // ok
>d2 : D<number, {}>
>new D(1) : D<number, {}>
>d2 : D<number, unknown>
>new D(1) : D<number, unknown>
>D : typeof D
>1 : 1
var d3 = new D(''); // ok
>d3 : D<string, {}>
>new D('') : D<string, {}>
>d3 : D<string, unknown>
>new D('') : D<string, unknown>
>D : typeof D
>'' : ""
}
@@ -26,8 +26,8 @@ class D<T,U> {
}
var d = new D();
>d : D<{}, {}>
>new D() : D<{}, {}>
>d : D<unknown, unknown>
>new D() : D<unknown, unknown>
>D : typeof D
var d2 = new D<string, number>();
@@ -673,8 +673,8 @@ function f22<T>(x: T extends (infer U)[] ? U[] : never) {
>x : T extends (infer U)[] ? U[] : never
let e = x[0]; // {}
>e : {}
>x[0] : {}
>e : unknown
>x[0] : unknown
>x : T extends (infer U)[] ? U[] : never
>0 : 0
}
@@ -11,7 +11,7 @@ var a: any;
>a : any
foo(a);
>foo(a) : {}
>foo(a) : unknown
>foo : <Z, T extends <U>(x: U) => Z>(y: T) => Z
>a : any
@@ -31,9 +31,9 @@ var id: <T>(x:T) => T;
>x : T
var r23 = dot(id)(id);
>r23 : <T>(_: T) => {}
>dot(id)(id) : <T>(_: T) => {}
>dot(id) : <U>(g: (_: U) => {}) => (_: U) => {}
>r23 : <T>(_: T) => unknown
>dot(id)(id) : <T>(_: T) => unknown
>dot(id) : <U>(g: (_: U) => unknown) => (_: U) => unknown
>dot : <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S
>id : <T>(x: T) => T
>id : <T>(x: T) => T
@@ -10,13 +10,13 @@ function f6<T>(x: (a: T) => T) {
f6(x => f6(y => x = y));
>f6(x => f6(y => x = y)) : any
>f6 : <T>(x: (a: T) => T) => any
>x => f6(y => x = y) : (x: {}) => any
>x : {}
>x => f6(y => x = y) : (x: unknown) => any
>x : unknown
>f6(y => x = y) : any
>f6 : <T>(x: (a: T) => T) => any
>y => x = y : (y: {}) => {}
>y : {}
>x = y : {}
>x : {}
>y : {}
>y => x = y : (y: unknown) => unknown
>y : unknown
>x = y : unknown
>x : unknown
>y : unknown
@@ -1,21 +1,21 @@
=== tests/cases/conformance/es6/modules/a.ts ===
const x = new Promise( ( resolve, reject ) => { resolve( {} ); } );
>x : Promise<{}>
>new Promise( ( resolve, reject ) => { resolve( {} ); } ) : Promise<{}>
>x : Promise<unknown>
>new Promise( ( resolve, reject ) => { resolve( {} ); } ) : Promise<unknown>
>Promise : PromiseConstructor
>( resolve, reject ) => { resolve( {} ); } : (resolve: (value?: {} | PromiseLike<{}>) => void, reject: (reason?: any) => void) => void
>resolve : (value?: {} | PromiseLike<{}>) => void
>( resolve, reject ) => { resolve( {} ); } : (resolve: (value?: unknown) => void, reject: (reason?: any) => void) => void
>resolve : (value?: unknown) => void
>reject : (reason?: any) => void
>resolve( {} ) : void
>resolve : (value?: {} | PromiseLike<{}>) => void
>resolve : (value?: unknown) => void
>{} : {}
export default x;
>x : Promise<{}>
>x : Promise<unknown>
=== tests/cases/conformance/es6/modules/b.ts ===
import x from './a';
>x : Promise<{}>
>x : Promise<unknown>
( async function() {
>( async function() { const value = await x;}() ) : Promise<void>
@@ -23,9 +23,9 @@ import x from './a';
>async function() { const value = await x;} : () => Promise<void>
const value = await x;
>value : {}
>await x : {}
>x : Promise<{}>
>value : unknown
>await x : unknown
>x : Promise<unknown>
}() );
@@ -1,21 +1,21 @@
=== tests/cases/conformance/es6/modules/a.ts ===
const x = new Promise( ( resolve, reject ) => { resolve( {} ); } );
>x : Promise<{}>
>new Promise( ( resolve, reject ) => { resolve( {} ); } ) : Promise<{}>
>x : Promise<unknown>
>new Promise( ( resolve, reject ) => { resolve( {} ); } ) : Promise<unknown>
>Promise : PromiseConstructor
>( resolve, reject ) => { resolve( {} ); } : (resolve: (value?: {} | PromiseLike<{}>) => void, reject: (reason?: any) => void) => void
>resolve : (value?: {} | PromiseLike<{}>) => void
>( resolve, reject ) => { resolve( {} ); } : (resolve: (value?: unknown) => void, reject: (reason?: any) => void) => void
>resolve : (value?: unknown) => void
>reject : (reason?: any) => void
>resolve( {} ) : void
>resolve : (value?: {} | PromiseLike<{}>) => void
>resolve : (value?: unknown) => void
>{} : {}
export default x;
>x : Promise<{}>
>x : Promise<unknown>
=== tests/cases/conformance/es6/modules/b.ts ===
import x from './a';
>x : Promise<{}>
>x : Promise<unknown>
( async function() {
>( async function() { const value = await x;}() ) : Promise<void>
@@ -23,9 +23,9 @@ import x from './a';
>async function() { const value = await x;} : () => Promise<void>
const value = await x;
>value : {}
>await x : {}
>x : Promise<{}>
>value : unknown
>await x : unknown
>x : Promise<unknown>
}() );
@@ -2,8 +2,8 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(35,5): error TS2322: Type '9.9' is not assignable to type 'string'.
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(36,5): error TS2322: Type '9.9' is not assignable to type 'Date'.
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(38,5): error TS2322: Type '9.9' is not assignable to type 'void'.
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(40,5): error TS2741: Property 'id' is missing in type 'D<{}>' but required in type 'I'.
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(41,5): error TS2741: Property 'id' is missing in type 'D<{}>' but required in type 'C'.
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(40,5): error TS2741: Property 'id' is missing in type 'D<unknown>' but required in type 'I'.
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(41,5): error TS2741: Property 'id' is missing in type 'D<unknown>' but required in type 'C'.
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(42,5): error TS2739: Type 'C' is missing the following properties from type 'D<string>': source, recurse, wrapped
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(43,28): error TS2322: Type 'string' is not assignable to type 'number'.
tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts(44,5): error TS2322: Type 'C' is not assignable to type '{ id: string; }'.
@@ -75,11 +75,11 @@ tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAnd
var anInterface: I = new D();
~~~~~~~~~~~
!!! error TS2741: Property 'id' is missing in type 'D<{}>' but required in type 'I'.
!!! error TS2741: Property 'id' is missing in type 'D<unknown>' but required in type 'I'.
!!! related TS2728 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:2:5: 'id' is declared here.
var aClass: C = new D();
~~~~~~
!!! error TS2741: Property 'id' is missing in type 'D<{}>' but required in type 'C'.
!!! error TS2741: Property 'id' is missing in type 'D<unknown>' but required in type 'C'.
!!! related TS2728 tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts:6:5: 'id' is declared here.
var aGenericClass: D<string> = new C();
~~~~~~~~~~~~~
@@ -92,12 +92,12 @@ var aVoid: void = 9.9;
var anInterface: I = new D();
>anInterface : I
>new D() : D<{}>
>new D() : D<unknown>
>D : typeof D
var aClass: C = new D();
>aClass : C
>new D() : D<{}>
>new D() : D<unknown>
>D : typeof D
var aGenericClass: D<string> = new C();
@@ -7,11 +7,11 @@ var v: a; // this should report error
var v2: any = (new a()).foo;
>v2 : any
>(new a()).foo : {}
>(new a()) : a<{}>
>new a() : a<{}>
>(new a()).foo : unknown
>(new a()) : a<unknown>
>new a() : a<unknown>
>a : typeof a
>foo : {}
>foo : unknown
var v3: number = (new a<number>()).foo;
>v3 : number
@@ -1,5 +1,5 @@
tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts(9,1): error TS2322: Type '<S>() => S[]' is not assignable to type '<T>(x: T) => T'.
Type '{}[]' is not assignable to type 'T'.
Type 'unknown[]' is not assignable to type 'T'.
==== tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts (1 errors) ====
@@ -14,7 +14,7 @@ tests/cases/compiler/functionTypeArgumentAssignmentCompat.ts(9,1): error TS2322:
f = g;
~
!!! error TS2322: Type '<S>() => S[]' is not assignable to type '<T>(x: T) => T'.
!!! error TS2322: Type '{}[]' is not assignable to type 'T'.
!!! error TS2322: Type 'unknown[]' is not assignable to type 'T'.
var s = f("str").toUpperCase();
console.log(s);
@@ -43,8 +43,8 @@ var r2 = foo2('', 1); // number
>1 : 1
var r3 = foo2b(1); // {}
>r3 : {}
>foo2b(1) : {}
>r3 : unknown
>foo2b(1) : unknown
>foo2b : <T, U>(u: U) => T
>1 : 1
@@ -186,23 +186,23 @@ var r8 = c.foo5(true, 1); // boolean
>1 : 1
var r9 = c.foo6(); // {}
>r9 : {}
>c.foo6() : {}
>r9 : unknown
>c.foo6() : unknown
>c.foo6 : <T, U>() => T
>c : C<string, number>
>foo6 : <T, U>() => T
var r10 = c.foo7(''); // {}
>r10 : {}
>c.foo7('') : {}
>r10 : unknown
>c.foo7('') : unknown
>c.foo7 : <T, U>(u: U) => T
>c : C<string, number>
>foo7 : <T, U>(u: U) => T
>'' : ""
var r11 = c.foo8(); // {}
>r11 : {}
>c.foo8() : {}
>r11 : unknown
>c.foo8() : unknown
>c.foo8 : <T, U>() => T
>c : C<string, number>
>foo8 : <T, U>() => T
@@ -297,23 +297,23 @@ var r8 = i.foo5(true, 1); // boolean
>1 : 1
var r9 = i.foo6(); // {}
>r9 : {}
>i.foo6() : {}
>r9 : unknown
>i.foo6() : unknown
>i.foo6 : <T, U>() => T
>i : I<string, number>
>foo6 : <T, U>() => T
var r10 = i.foo7(''); // {}
>r10 : {}
>i.foo7('') : {}
>r10 : unknown
>i.foo7('') : unknown
>i.foo7 : <T, U>(u: U) => T
>i : I<string, number>
>foo7 : <T, U>(u: U) => T
>'' : ""
var r11 = i.foo8(); // {}
>r11 : {}
>i.foo8() : {}
>r11 : unknown
>i.foo8() : unknown
>i.foo8 : <T, U>() => T
>i : I<string, number>
>foo8 : <T, U>() => T
@@ -1,6 +1,6 @@
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(11,14): error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: {}) => string; }'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(11,14): error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: unknown) => string; }'.
Types of property 'cb' are incompatible.
Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: {}) => string'.
Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: unknown) => string'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithConstructorTypedArguments5.ts(13,14): error TS2345: Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'.
Types of property 'cb' are incompatible.
Type 'new (x: string, y: number) => string' is not assignable to type 'new (t: string) => string'.
@@ -19,9 +19,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithCon
var arg2: { cb: new <T>(x: T, y: T) => string };
var r2 = foo(arg2); // error
~~~~
!!! error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: {}) => string; }'.
!!! error TS2345: Argument of type '{ cb: new <T>(x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: unknown) => string; }'.
!!! error TS2345: Types of property 'cb' are incompatible.
!!! error TS2345: Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: {}) => string'.
!!! error TS2345: Type 'new <T>(x: T, y: T) => string' is not assignable to type 'new (t: unknown) => string'.
var arg3: { cb: new (x: string, y: number) => string };
var r3 = foo(arg3); // error
~~~~
@@ -14,8 +14,8 @@ function foo<T>(x: (a: T) => T) {
}
var r = foo(<U>(x: U) => ''); // {}
>r : {}
>foo(<U>(x: U) => '') : {}
>r : unknown
>foo(<U>(x: U) => '') : unknown
>foo : <T>(x: (a: T) => T) => T
><U>(x: U) => '' : <U>(x: U) => string
>x : U
@@ -30,11 +30,11 @@ var r2 = foo<string>(<U>(x: U) => ''); // string
>'' : ""
var r3 = foo(x => ''); // {}
>r3 : {}
>foo(x => '') : {}
>r3 : unknown
>foo(x => '') : unknown
>foo : <T>(x: (a: T) => T) => T
>x => '' : (x: {}) => string
>x : {}
>x => '' : (x: unknown) => string
>x : unknown
>'' : ""
function foo2<T, U>(x: T, cb: (a: T) => U) {
@@ -35,8 +35,8 @@ var a: {
}
var r = foo(i); // any
>r : {}
>foo(i) : {}
>r : unknown
>foo(i) : unknown
>foo : <T>(x: new (a: T) => T) => T
>i : I
@@ -53,8 +53,8 @@ var r3 = foo(i2); // string
>i2 : I2<string>
var r3b = foo(a); // any
>r3b : {}
>foo(a) : {}
>r3b : unknown
>foo(a) : unknown
>foo : <T>(x: new (a: T) => T) => T
>a : new <T>(x: T) => T
@@ -78,15 +78,15 @@ var r4 = foo2(1, i2); // error
>i2 : I2<string>
var r4b = foo2(1, a); // any
>r4b : {}
>foo2(1, a) : {}
>r4b : unknown
>foo2(1, a) : unknown
>foo2 : <T, U>(x: T, cb: new (a: T) => U) => U
>1 : 1
>a : new <T>(x: T) => T
var r5 = foo2(1, i); // any
>r5 : {}
>foo2(1, i) : {}
>r5 : unknown
>foo2(1, i) : unknown
>foo2 : <T, U>(x: T, cb: new (a: T) => U) => U
>1 : 1
>i : I
@@ -112,16 +112,16 @@ function foo3<T, U>(x: T, cb: new(a: T) => U, y: U) {
}
var r7 = foo3(null, i, ''); // any
>r7 : {}
>foo3(null, i, '') : {}
>r7 : unknown
>foo3(null, i, '') : unknown
>foo3 : <T, U>(x: T, cb: new (a: T) => U, y: U) => U
>null : null
>i : I
>'' : ""
var r7b = foo3(null, a, ''); // any
>r7b : {}
>foo3(null, a, '') : {}
>r7b : unknown
>foo3(null, a, '') : unknown
>foo3 : <T, U>(x: T, cb: new (a: T) => U, y: U) => U
>null : null
>a : new <T>(x: T) => T
@@ -1,4 +1,4 @@
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts(10,16): error TS2322: Type '<T>(x: T, y: T) => string' is not assignable to type '(t: {}) => string'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts(10,16): error TS2322: Type '<T>(x: T, y: T) => string' is not assignable to type '(t: unknown) => string'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts(11,16): error TS2322: Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'.
@@ -14,8 +14,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
// more args not allowed
var r2 = foo({ cb: <T>(x: T, y: T) => '' }); // error
~~
!!! error TS2322: Type '<T>(x: T, y: T) => string' is not assignable to type '(t: {}) => string'.
!!! related TS6500 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts:3:27: The expected type comes from property 'cb' which is declared here on type '{ cb: (t: {}) => string; }'
!!! error TS2322: Type '<T>(x: T, y: T) => string' is not assignable to type '(t: unknown) => string'.
!!! related TS6500 tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments5.ts:3:27: The expected type comes from property 'cb' which is declared here on type '{ cb: (t: unknown) => string; }'
var r3 = foo({ cb: (x: string, y: number) => '' }); // error
~~
!!! error TS2322: Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'.
@@ -19,14 +19,14 @@ function foo<T>(a: (x: T) => T, b: (x: T) => T) {
//var r1 = foo((x: number) => 1, (x: string) => ''); // error
var r1b = foo((x) => 1, (x) => ''); // {} => {}
>r1b : (x: {}) => {}
>foo((x) => 1, (x) => '') : (x: {}) => {}
>r1b : (x: unknown) => unknown
>foo((x) => 1, (x) => '') : (x: unknown) => unknown
>foo : <T>(a: (x: T) => T, b: (x: T) => T) => (x: T) => T
>(x) => 1 : (x: {}) => number
>x : {}
>(x) => 1 : (x: unknown) => number
>x : unknown
>1 : 1
>(x) => '' : (x: {}) => string
>x : {}
>(x) => '' : (x: unknown) => string
>x : unknown
>'' : ""
var r2 = foo((x: Object) => null, (x: string) => ''); // Object => Object
@@ -114,15 +114,15 @@ function other<T>(x: T) {
>b : T
var r6b = foo((a) => a, (b) => b); // {} => {}
>r6b : (x: {}) => {}
>foo((a) => a, (b) => b) : (x: {}) => {}
>r6b : (x: unknown) => unknown
>foo((a) => a, (b) => b) : (x: unknown) => unknown
>foo : <T>(a: (x: T) => T, b: (x: T) => T) => (x: T) => T
>(a) => a : (a: {}) => {}
>a : {}
>a : {}
>(b) => b : (b: {}) => {}
>b : {}
>b : {}
>(a) => a : (a: unknown) => unknown
>a : unknown
>a : unknown
>(b) => b : (b: unknown) => unknown
>b : unknown
>b : unknown
}
function other2<T extends Date>(x: T) {
@@ -141,15 +141,15 @@ function other2<T extends Date>(x: T) {
>b : T
var r7b = foo((a) => a, (b) => b); // {} => {}
>r7b : (x: {}) => {}
>foo((a) => a, (b) => b) : (x: {}) => {}
>r7b : (x: unknown) => unknown
>foo((a) => a, (b) => b) : (x: unknown) => unknown
>foo : <T>(a: (x: T) => T, b: (x: T) => T) => (x: T) => T
>(a) => a : (a: {}) => {}
>a : {}
>a : {}
>(b) => b : (b: {}) => {}
>b : {}
>b : {}
>(a) => a : (a: unknown) => unknown
>a : unknown
>a : unknown
>(b) => b : (b: unknown) => unknown
>b : unknown
>b : unknown
var r8 = r7(null);
>r8 : T
@@ -77,8 +77,8 @@ module GenericParameter {
>x : number
var r7 = foo5(b); // new any => string; new(x:number) => any
>r7 : { new (x: {}): string; new (x: number): {}; }
>foo5(b) : { new (x: {}): string; new (x: number): {}; }
>r7 : { new (x: unknown): string; new (x: number): unknown; }
>foo5(b) : { new (x: unknown): string; new (x: number): unknown; }
>foo5 : <T>(cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; }
>b : { new <T>(x: T): string; new <T>(x: number): T; }
@@ -100,8 +100,8 @@ module GenericParameter {
>a : { new (x: boolean): string; new (x: number): boolean; }
var r9 = foo6(b); // new any => string; new(x:any, y?:any) => string
>r9 : { new (x: {}): string; new (x: {}, y?: {}): string; }
>foo6(b) : { new (x: {}): string; new (x: {}, y?: {}): string; }
>r9 : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo6(b) : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo6 : <T>(cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
>b : { new <T>(x: T): string; new <T>(x: number): T; }
@@ -118,8 +118,8 @@ module GenericParameter {
}
var r13 = foo7(1, b); // new any => string; new(x:any, y?:any) => string
>r13 : { new (x: {}): string; new (x: {}, y?: {}): string; }
>foo7(1, b) : { new (x: {}): string; new (x: {}, y?: {}): string; }
>r13 : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7(1, b) : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
>1 : 1
>b : { new <T>(x: T): string; new <T>(x: number): T; }
@@ -135,15 +135,15 @@ module GenericParameter {
>x : number
var r14 = foo7(1, c); // new any => string; new(x:any, y?:any) => string
>r14 : { new (x: {}): string; new (x: {}, y?: {}): string; }
>foo7(1, c) : { new (x: {}): string; new (x: {}, y?: {}): string; }
>r14 : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7(1, c) : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
>1 : 1
>c : { <T>(x: number): T; new <T>(x: T): string; }
var r15 = foo7(1, c2); // new any => string; new(x:any, y?:any) => string
>r15 : { new (x: {}): string; new (x: {}, y?: {}): string; }
>foo7(1, c2) : { new (x: {}): string; new (x: {}, y?: {}): string; }
>r15 : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7(1, c2) : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
>1 : 1
>c2 : { new <T>(x: T): string; new <T>(x: number): T; }
@@ -1,4 +1,4 @@
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts(31,20): error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: {}): string; new (x: {}, y?: {}): string; }'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts(31,20): error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: unknown): string; new (x: unknown, y?: unknown): string; }'.
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts (1 errors) ====
@@ -34,7 +34,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve
var b: { new <T>(x: T, y: T): string };
var r10 = foo6(b); // error
~
!!! error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: {}): string; new (x: {}, y?: {}): string; }'.
!!! error TS2345: Argument of type 'new <T>(x: T, y: T) => string' is not assignable to parameter of type '{ new (x: unknown): string; new (x: unknown, y?: unknown): string; }'.
function foo7<T>(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) {
return cb;
@@ -53,8 +53,8 @@ module GenericParameter {
>x : T
var r6 = foo5(a); // ok
>r6 : { new (x: {}): string; new (x: number): {}; }
>foo5(a) : { new (x: {}): string; new (x: number): {}; }
>r6 : { new (x: unknown): string; new (x: number): unknown; }
>foo5(a) : { new (x: unknown): string; new (x: number): unknown; }
>foo5 : <T>(cb: { new (x: T): string; new (x: number): T; }) => { new (x: T): string; new (x: number): T; }
>a : new <T>(x: T) => T
@@ -93,8 +93,8 @@ module GenericParameter {
}
var r13 = foo7(1, a); // ok
>r13 : { new (x: {}): string; new (x: {}, y?: {}): string; }
>foo7(1, a) : { new (x: {}): string; new (x: {}, y?: {}): string; }
>r13 : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7(1, a) : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
>1 : 1
>a : new <T>(x: T) => T
@@ -105,8 +105,8 @@ module GenericParameter {
>x : number
var r14 = foo7(1, c); // ok
>r14 : { new (x: {}): string; new (x: {}, y?: {}): string; }
>foo7(1, c) : { new (x: {}): string; new (x: {}, y?: {}): string; }
>r14 : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7(1, c) : { new (x: unknown): string; new (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { new (x: T): string; new (x: T, y?: T): string; }) => { new (x: T): string; new (x: T, y?: T): string; }
>1 : 1
>c : { new <T>(x: T): number; new <T>(x: number): T; }
@@ -74,8 +74,8 @@ module GenericParameter {
>x : number
var r7 = foo5(a); // any => string (+1 overload)
>r7 : { (x: {}): string; (x: number): {}; }
>foo5(a) : { (x: {}): string; (x: number): {}; }
>r7 : { (x: unknown): string; (x: number): unknown; }
>foo5(a) : { (x: unknown): string; (x: number): unknown; }
>foo5 : <T>(cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; }
>a : { <T>(x: T): string; <T>(x: number): T; }
@@ -99,16 +99,16 @@ module GenericParameter {
>x : any
var r9 = foo6(<T>(x: T) => ''); // any => string (+1 overload)
>r9 : { (x: {}): string; (x: {}, y?: {}): string; }
>foo6(<T>(x: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
>r9 : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo6(<T>(x: T) => '') : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo6 : <T>(cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
><T>(x: T) => '' : <T>(x: T) => string
>x : T
>'' : ""
var r11 = foo6(<T>(x: T, y?: T) => ''); // any => string (+1 overload)
>r11 : { (x: {}): string; (x: {}, y?: {}): string; }
>foo6(<T>(x: T, y?: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
>r11 : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo6(<T>(x: T, y?: T) => '') : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo6 : <T>(cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
><T>(x: T, y?: T) => '' : <T>(x: T, y?: T) => string
>x : T
@@ -137,8 +137,8 @@ module GenericParameter {
>x : any
var r13 = foo7(1, <T>(x: T) => ''); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]
>r13 : { (x: {}): string; (x: {}, y?: {}): string; }
>foo7(1, <T>(x: T) => '') : { (x: {}): string; (x: {}, y?: {}): string; }
>r13 : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo7(1, <T>(x: T) => '') : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
>1 : 1
><T>(x: T) => '' : <T>(x: T) => string
@@ -151,8 +151,8 @@ module GenericParameter {
>x : number
var r14 = foo7(1, a); // any => string (+1 overload) [inferences are made for T, but lambda not contextually typed]
>r14 : { (x: {}): string; (x: {}, y?: {}): string; }
>foo7(1, a) : { (x: {}): string; (x: {}, y?: {}): string; }
>r14 : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo7(1, a) : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
>1 : 1
>a : { <T>(x: T): string; <T>(x: number): T; }
@@ -1,4 +1,4 @@
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts(28,20): error TS2345: Argument of type '<T>(x: T, y: T) => string' is not assignable to parameter of type '{ (x: {}): string; (x: {}, y?: {}): string; }'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts(28,20): error TS2345: Argument of type '<T>(x: T, y: T) => string' is not assignable to parameter of type '{ (x: unknown): string; (x: unknown, y?: unknown): string; }'.
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts (1 errors) ====
@@ -31,7 +31,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve
var r10 = foo6(<T>(x: T, y: T) => ''); // error
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2345: Argument of type '<T>(x: T, y: T) => string' is not assignable to parameter of type '{ (x: {}): string; (x: {}, y?: {}): string; }'.
!!! error TS2345: Argument of type '<T>(x: T, y: T) => string' is not assignable to parameter of type '{ (x: unknown): string; (x: unknown, y?: unknown): string; }'.
function foo7<T>(x:T, cb: { (x: T): string; (x: T, y?: T): string }) {
return cb;
@@ -48,8 +48,8 @@ module GenericParameter {
}
var r6 = foo5(<T>(x: T) => x); // ok
>r6 : { (x: {}): string; (x: number): {}; }
>foo5(<T>(x: T) => x) : { (x: {}): string; (x: number): {}; }
>r6 : { (x: unknown): string; (x: number): unknown; }
>foo5(<T>(x: T) => x) : { (x: unknown): string; (x: number): unknown; }
>foo5 : <T>(cb: { (x: T): string; (x: number): T; }) => { (x: T): string; (x: number): T; }
><T>(x: T) => x : <T>(x: T) => T
>x : T
@@ -88,8 +88,8 @@ module GenericParameter {
}
var r13 = foo7(1, <T>(x: T) => x); // ok
>r13 : { (x: {}): string; (x: {}, y?: {}): string; }
>foo7(1, <T>(x: T) => x) : { (x: {}): string; (x: {}, y?: {}): string; }
>r13 : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo7(1, <T>(x: T) => x) : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
>1 : 1
><T>(x: T) => x : <T>(x: T) => T
@@ -102,8 +102,8 @@ module GenericParameter {
>x : number
var r14 = foo7(1, a); // ok
>r14 : { (x: {}): string; (x: {}, y?: {}): string; }
>foo7(1, a) : { (x: {}): string; (x: {}, y?: {}): string; }
>r14 : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo7(1, a) : { (x: unknown): string; (x: unknown, y?: unknown): string; }
>foo7 : <T>(x: T, cb: { (x: T): string; (x: T, y?: T): string; }) => { (x: T): string; (x: T, y?: T): string; }
>1 : 1
>a : { <T>(x: T): number; <T>(x: number): T; }
@@ -26,8 +26,8 @@ module ImmediatelyFix {
>C : typeof C
var r = c.foo(<U>(x: U) => ''); // {}
>r : {}
>c.foo(<U>(x: U) => '') : {}
>r : unknown
>c.foo(<U>(x: U) => '') : unknown
>c.foo : <T>(x: (a: T) => T) => T
>c : C<number>
>foo : <T>(x: (a: T) => T) => T
@@ -46,13 +46,13 @@ module ImmediatelyFix {
>'' : ""
var r3 = c.foo(x => ''); // {}
>r3 : {}
>c.foo(x => '') : {}
>r3 : unknown
>c.foo(x => '') : unknown
>c.foo : <T>(x: (a: T) => T) => T
>c : C<number>
>foo : <T>(x: (a: T) => T) => T
>x => '' : (x: {}) => string
>x : {}
>x => '' : (x: unknown) => string
>x : unknown
>'' : ""
class C2<T> {
@@ -15,8 +15,8 @@ class C<T> {
}
var c = new C // C<any>
>c : C<{}>
>new C : C<{}>
>c : C<unknown>
>new C : C<unknown>
>C : typeof C
var c2 = new C<number> // error, type params are actually part of the arg list so you need both
+1 -1
View File
@@ -980,7 +980,7 @@ declare const Base01c02: Base01<number>;
declare const Base01c03: Base01<number>;
declare class Derived01<T> extends Base01<T> {
}
declare const Derived01c00: Derived01<{}>;
declare const Derived01c00: Derived01<unknown>;
declare const Derived01c01: Derived01<number>;
declare const Derived01c02: Derived01<number>;
declare const Derived01c03: Derived01<number>;
+22 -22
View File
@@ -62,7 +62,7 @@ declare function f01<T>(a?: T): T;
// inference
f01();
>f01() : {}
>f01() : unknown
>f01 : <T>(a?: T) => T
f01(a);
@@ -126,7 +126,7 @@ declare function f03<T = T>(a?: T): T;
// inference
f03();
>f03() : {}
>f03() : unknown
>f03 : <T = T>(a?: T) => T
f03(a);
@@ -166,7 +166,7 @@ declare function f04<T, U = B>(a?: T, b?: U): [T, U];
// inference
f04();
>f04() : [{}, B]
>f04() : [unknown, B]
>f04 : <T, U = B>(a?: T, b?: U) => [T, U]
f04(a);
@@ -241,7 +241,7 @@ declare function f05<T, U = T>(a?: T, b?: U): [T, U];
// inference
f05();
>f05() : [{}, {}]
>f05() : [unknown, unknown]
>f05 : <T, U = T>(a?: T, b?: U) => [T, U]
f05(a);
@@ -404,7 +404,7 @@ declare function f07<T, U = B, V = U>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f07();
>f07() : [{}, B, B]
>f07() : [unknown, B, B]
>f07 : <T, U = B, V = U>(a?: T, b?: U, c?: V) => [T, U, V]
f07(a, b);
@@ -627,7 +627,7 @@ declare function f09<T, U extends T = T>(a?: T, b?: U): [T, U];
// inference
f09();
>f09() : [{}, {}]
>f09() : [unknown, unknown]
>f09 : <T, U extends T = T>(a?: T, b?: U) => [T, U]
f09(a);
@@ -780,7 +780,7 @@ declare function f11<T, U = T | B>(a?: T, b?: U): [T, U];
// inference
f11();
>f11() : [{}, {} | B]
>f11() : [unknown, unknown]
>f11 : <T, U = B | T>(a?: T, b?: U) => [T, U]
f11(a);
@@ -852,7 +852,7 @@ declare function f12<T, U = T & B>(a?: T, b?: U): [T, U];
// inference
f12();
>f12() : [{}, B]
>f12() : [unknown, B]
>f12 : <T, U = T & B>(a?: T, b?: U) => [T, U]
f12(a);
@@ -918,7 +918,7 @@ declare function f13<T = U, U = B>(a?: T, b?: U): [T, U];
// inference
f13();
>f13() : [{}, B]
>f13() : [unknown, B]
>f13 : <T = U, U = B>(a?: T, b?: U) => [T, U]
f13(a);
@@ -985,11 +985,11 @@ declare function f14<T, U = V, V = C>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f14();
>f14() : [{}, {}, C]
>f14() : [unknown, unknown, C]
>f14 : <T, U = V, V = C>(a?: T, b?: U, c?: V) => [T, U, V]
f14(a);
>f14(a) : [A, {}, C]
>f14(a) : [A, unknown, C]
>f14 : <T, U = V, V = C>(a?: T, b?: U, c?: V) => [T, U, V]
>a : A
@@ -1089,7 +1089,7 @@ declare function f15<T = U, U = T>(a?: T, b?: U): [T, U];
// inference
f15();
>f15() : [{}, {}]
>f15() : [unknown, unknown]
>f15 : <T = U, U = T>(a?: T, b?: U) => [T, U]
f15(a);
@@ -1144,11 +1144,11 @@ declare function f16<T, U = V, V = U>(a?: T, b?: U, c?: V): [T, U, V];
// no inference
f16();
>f16() : [{}, {}, {}]
>f16() : [unknown, unknown, unknown]
>f16 : <T, U = V, V = U>(a?: T, b?: U, c?: V) => [T, U, V]
f16(a);
>f16(a) : [A, {}, {}]
>f16(a) : [A, unknown, unknown]
>f16 : <T, U = V, V = U>(a?: T, b?: U, c?: V) => [T, U, V]
>a : A
@@ -1241,7 +1241,7 @@ declare function f17<T = U, U = T | B>(a?: T, b?: U): [T, U];
// inference
f17();
>f17() : [{}, {} | B]
>f17() : [unknown, unknown]
>f17 : <T = U, U = B | T>(a?: T, b?: U) => [T, U]
f17(a);
@@ -1314,11 +1314,11 @@ declare function f18<T, U = V, V = U | C>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f18();
>f18() : [{}, {}, {} | C]
>f18() : [unknown, unknown, unknown]
>f18 : <T, U = V, V = C | U>(a?: T, b?: U, c?: V) => [T, U, V]
f18(a);
>f18(a) : [A, {}, {} | C]
>f18(a) : [A, unknown, unknown]
>f18 : <T, U = V, V = C | U>(a?: T, b?: U, c?: V) => [T, U, V]
>a : A
@@ -1432,7 +1432,7 @@ declare function f19<T = U, U = T & B>(a?: T, b?: U): [T, U];
// inference
f19();
>f19() : [{}, B]
>f19() : [unknown, B]
>f19 : <T = U, U = T & B>(a?: T, b?: U) => [T, U]
f19(a);
@@ -1505,11 +1505,11 @@ declare function f20<T, U = V, V = U & C>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f20();
>f20() : [{}, {}, C]
>f20() : [unknown, unknown, C]
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
f20(a);
>f20(a) : [A, {}, C]
>f20(a) : [A, unknown, C]
>f20 : <T, U = V, V = U & C>(a?: T, b?: U, c?: V) => [T, U, V]
>a : A
@@ -1843,8 +1843,8 @@ declare class Derived01<T> extends Base01<T> { }
>Base01 : Base01<T>
const Derived01c00 = new Derived01();
>Derived01c00 : Derived01<{}>
>new Derived01() : Derived01<{}>
>Derived01c00 : Derived01<unknown>
>new Derived01() : Derived01<unknown>
>Derived01 : typeof Derived01
const Derived01c01 = new Derived01(1);
@@ -1,5 +1,5 @@
tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts(6,1): error TS2322: Type '<S>() => S[]' is not assignable to type '<T>(x: T) => T'.
Type '{}[]' is not assignable to type 'T'.
Type 'unknown[]' is not assignable to type 'T'.
==== tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts (1 errors) ====
@@ -11,7 +11,7 @@ tests/cases/compiler/genericFunctionCallSignatureReturnTypeMismatch.ts(6,1): err
f = g;
~
!!! error TS2322: Type '<S>() => S[]' is not assignable to type '<T>(x: T) => T'.
!!! error TS2322: Type '{}[]' is not assignable to type 'T'.
!!! error TS2322: Type 'unknown[]' is not assignable to type 'T'.
var s = f("str").toUpperCase();
@@ -416,8 +416,8 @@ declare function pipe5<A, B>(f: (a: A) => B): { f: (a: A) => B };
>a : A
const f50 = pipe5(list); // No higher order inference
>f50 : { f: (a: {}) => {}[]; }
>pipe5(list) : { f: (a: {}) => {}[]; }
>f50 : { f: (a: unknown) => unknown[]; }
>pipe5(list) : { f: (a: unknown) => unknown[]; }
>pipe5 : <A, B>(f: (a: A) => B) => { f: (a: A) => B; }
>list : <T>(a: T) => T[]
@@ -835,7 +835,7 @@ foo2(() => {});
>() => {} : () => void
foo2(identity);
>foo2(identity) : [<T>(value: T) => T, {}]
>foo2(identity) : [<T>(value: T) => T, unknown]
>foo2 : <T, U = T>(fn: T, a?: U | undefined, b?: U | undefined) => [T, U]
>identity : <T>(value: T) => T
@@ -25,10 +25,10 @@ var x = s(function (a) { return a.init(); }); // x is any, should have been {}
declare function f1<T>(cb: <S>(x: S) => T): T;
declare function f2<T>(cb: <S extends number>(x: S) => T): T;
declare function f3<T>(cb: <S extends Array<S>>(x: S) => T): T;
declare let x1: {};
declare let x1: unknown;
declare let x2: number;
declare let x3: any[];
declare const s: <R>(go: <S>(ops: {
init(): S;
}) => R) => R;
declare const x: {};
declare const x: unknown;
@@ -15,8 +15,8 @@ declare function f3<T>(cb: <S extends Array<S>>(x: S) => T): T;
>x : S
let x1 = f1(x => x); // {}
>x1 : {}
>f1(x => x) : {}
>x1 : unknown
>f1(x => x) : unknown
>f1 : <T>(cb: <S>(x: S) => T) => T
>x => x : <S>(x: S) => S
>x : S
@@ -47,8 +47,8 @@ declare const s: <R>(go: <S>(ops: { init(): S; }) => R) => R;
>init : () => S
const x = s(a => a.init()); // x is any, should have been {}
>x : {}
>s(a => a.init()) : {}
>x : unknown
>s(a => a.init()) : unknown
>s : <R>(go: <S>(ops: { init(): S; }) => R) => R
>a => a.init() : <S>(a: { init(): S; }) => S
>a : { init(): S; }
@@ -13,20 +13,20 @@ var utils: Utils;
>utils : Utils
utils.fold(); // no error
>utils.fold() : {}
>utils.fold() : unknown
>utils.fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T
>utils : Utils
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T
utils.fold(null); // no error
>utils.fold(null) : {}
>utils.fold(null) : unknown
>utils.fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T
>utils : Utils
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T
>null : null
utils.fold(null, null); // no error
>utils.fold(null, null) : {}
>utils.fold(null, null) : unknown
>utils.fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T
>utils : Utils
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T
@@ -34,7 +34,7 @@ utils.fold(null, null); // no error
>null : null
utils.fold(null, null, null); // no error
>utils.fold(null, null, null) : {}
>utils.fold(null, null, null) : unknown
>utils.fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T
>utils : Utils
>fold : <T, S>(c?: T[], folder?: (s: S, t: T) => T, init?: S) => T
@@ -19,14 +19,14 @@ utils.fold(); // error
>fold : <T, S>(c: T[], folder?: (s: S, t: T) => T, init?: S) => T
utils.fold(null); // no error
>utils.fold(null) : {}
>utils.fold(null) : unknown
>utils.fold : <T, S>(c: T[], folder?: (s: S, t: T) => T, init?: S) => T
>utils : Utils
>fold : <T, S>(c: T[], folder?: (s: S, t: T) => T, init?: S) => T
>null : null
utils.fold(null, null); // no error
>utils.fold(null, null) : {}
>utils.fold(null, null) : unknown
>utils.fold : <T, S>(c: T[], folder?: (s: S, t: T) => T, init?: S) => T
>utils : Utils
>fold : <T, S>(c: T[], folder?: (s: S, t: T) => T, init?: S) => T
@@ -34,7 +34,7 @@ utils.fold(null, null); // no error
>null : null
utils.fold(null, null, null); // error: Unable to invoke type with no call signatures
>utils.fold(null, null, null) : {}
>utils.fold(null, null, null) : unknown
>utils.fold : <T, S>(c: T[], folder?: (s: S, t: T) => T, init?: S) => T
>utils : Utils
>fold : <T, S>(c: T[], folder?: (s: S, t: T) => T, init?: S) => T
@@ -15,12 +15,12 @@ var x2 = new SS < number>; // Correctly give error
>SS : typeof SS
var x3 = new SS(); // OK
>x3 : SS<{}>
>new SS() : SS<{}>
>x3 : SS<unknown>
>new SS() : SS<unknown>
>SS : typeof SS
var x4 = new SS; // Should be allowed, but currently give error ('supplied parameters do not match any signature of the call target')
>x4 : SS<{}>
>new SS : SS<{}>
>x4 : SS<unknown>
>new SS : SS<unknown>
>SS : typeof SS
@@ -22,12 +22,12 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(31,21): error TS234
Property '0' is missing in type 'CoolArray<any>' but required in type '[(...args: any[]) => void]'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(38,32): error TS2345: Argument of type '[10, 20]' is not assignable to parameter of type 'CoolArray<number>'.
Property 'hello' is missing in type '[10, 20]' but required in type 'CoolArray<number>'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(43,1): error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray<{}>'.
Property 'hello' is missing in type '[]' but required in type 'CoolArray<{}>'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(44,5): error TS2345: Argument of type '[number]' is not assignable to parameter of type 'CoolArray<{}>'.
Property 'hello' is missing in type '[number]' but required in type 'CoolArray<{}>'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(45,5): error TS2345: Argument of type '[number, number]' is not assignable to parameter of type 'CoolArray<{}>'.
Property 'hello' is missing in type '[number, number]' but required in type 'CoolArray<{}>'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(43,1): error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray<unknown>'.
Property 'hello' is missing in type '[]' but required in type 'CoolArray<unknown>'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(44,5): error TS2345: Argument of type '[number]' is not assignable to parameter of type 'CoolArray<unknown>'.
Property 'hello' is missing in type '[number]' but required in type 'CoolArray<unknown>'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(45,5): error TS2345: Argument of type '[number, number]' is not assignable to parameter of type 'CoolArray<unknown>'.
Property 'hello' is missing in type '[number, number]' but required in type 'CoolArray<unknown>'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(46,5): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'CoolArray<number>'.
Property 'hello' is missing in type 'number[]' but required in type 'CoolArray<number>'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345: Argument of type '["what"]' is not assignable to parameter of type '[] | [number, string]'.
@@ -115,18 +115,18 @@ tests/cases/conformance/types/rest/genericRestParameters3.ts(53,5): error TS2345
baz(); // Error
~~~~~
!!! error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray<{}>'.
!!! error TS2345: Property 'hello' is missing in type '[]' but required in type 'CoolArray<{}>'.
!!! error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray<unknown>'.
!!! error TS2345: Property 'hello' is missing in type '[]' but required in type 'CoolArray<unknown>'.
!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here.
baz(1); // Error
~
!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type 'CoolArray<{}>'.
!!! error TS2345: Property 'hello' is missing in type '[number]' but required in type 'CoolArray<{}>'.
!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type 'CoolArray<unknown>'.
!!! error TS2345: Property 'hello' is missing in type '[number]' but required in type 'CoolArray<unknown>'.
!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here.
baz(1, 2); // Error
~
!!! error TS2345: Argument of type '[number, number]' is not assignable to parameter of type 'CoolArray<{}>'.
!!! error TS2345: Property 'hello' is missing in type '[number, number]' but required in type 'CoolArray<{}>'.
!!! error TS2345: Argument of type '[number, number]' is not assignable to parameter of type 'CoolArray<unknown>'.
!!! error TS2345: Property 'hello' is missing in type '[number, number]' but required in type 'CoolArray<unknown>'.
!!! related TS2728 tests/cases/conformance/types/rest/genericRestParameters3.ts:24:5: 'hello' is declared here.
baz(...ca); // Error
~~~~~
@@ -31,20 +31,20 @@ class C<T> {
}
var x = new C();
>x : C<{}>
>new C() : C<{}>
>x : C<unknown>
>new C() : C<unknown>
>C : typeof C
var r = x.x;
>r : A<{}>
>x.x : A<{}>
>x : C<{}>
>x : A<{}>
>r : A<unknown>
>x.x : A<unknown>
>x : C<unknown>
>x : A<unknown>
x.x = r;
>x.x = r : A<{}>
>x.x : A<{}>
>x : C<{}>
>x : A<{}>
>r : A<{}>
>x.x = r : A<unknown>
>x.x : A<unknown>
>x : C<unknown>
>x : A<unknown>
>r : A<unknown>
@@ -31,20 +31,20 @@ class C<T> {
}
var x = new C();
>x : C<{}>
>new C() : C<{}>
>x : C<unknown>
>new C() : C<unknown>
>C : typeof C
var r = x.x;
>r : A<number>
>x.x : A<number>
>x : C<{}>
>x : C<unknown>
>x : A<number>
x.x = r;
>x.x = r : A<number>
>x.x : A<number>
>x : C<{}>
>x : C<unknown>
>x : A<number>
>r : A<number>
@@ -7,8 +7,8 @@ class C<T> {
}
var c = new C();
>c : C<{}>
>new C() : C<{}>
>c : C<unknown>
>new C() : C<unknown>
>C : typeof C
var c2 = new C<any>();
@@ -69,7 +69,7 @@ function foo<T>(): T { return null; };
>null : null
foo()
>foo() : {}
>foo() : unknown
>foo : <T>() => T
foo<any>();
@@ -0,0 +1,18 @@
tests/cases/compiler/indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts(9,3): error TS2345: Argument of type '{ name: string; age: number; }[]' is not assignable to parameter of type '{ [x: string]: unknown; }'.
Index signature is missing in type '{ name: string; age: number; }[]'.
==== tests/cases/compiler/indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts (1 errors) ====
declare function f<T extends unknown = unknown>(x: { [x: string]: T }): T;
var stooges = [
{ name: "moe", age: 40 },
{ name: "larry", age: 50 },
{ name: "curly", age: 60 }
];
f(stooges); // Should throw
~~~~~~~
!!! error TS2345: Argument of type '{ name: string; age: number; }[]' is not assignable to parameter of type '{ [x: string]: unknown; }'.
!!! error TS2345: Index signature is missing in type '{ name: string; age: number; }[]'.
@@ -0,0 +1,19 @@
//// [indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts]
declare function f<T extends unknown = unknown>(x: { [x: string]: T }): T;
var stooges = [
{ name: "moe", age: 40 },
{ name: "larry", age: 50 },
{ name: "curly", age: 60 }
];
f(stooges); // Should throw
//// [indexSignatureOfTypeUnknownStillRequiresIndexSignature.js]
var stooges = [
{ name: "moe", age: 40 },
{ name: "larry", age: 50 },
{ name: "curly", age: 60 }
];
f(stooges); // Should throw
@@ -0,0 +1,30 @@
=== tests/cases/compiler/indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts ===
declare function f<T extends unknown = unknown>(x: { [x: string]: T }): T;
>f : Symbol(f, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 0, 0))
>T : Symbol(T, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 0, 19))
>x : Symbol(x, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 0, 48))
>x : Symbol(x, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 0, 54))
>T : Symbol(T, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 0, 19))
>T : Symbol(T, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 0, 19))
var stooges = [
>stooges : Symbol(stooges, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 2, 3))
{ name: "moe", age: 40 },
>name : Symbol(name, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 3, 3))
>age : Symbol(age, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 3, 16))
{ name: "larry", age: 50 },
>name : Symbol(name, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 4, 3))
>age : Symbol(age, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 4, 18))
{ name: "curly", age: 60 }
>name : Symbol(name, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 5, 3))
>age : Symbol(age, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 5, 18))
];
f(stooges); // Should throw
>f : Symbol(f, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 0, 0))
>stooges : Symbol(stooges, Decl(indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts, 2, 3))
@@ -0,0 +1,38 @@
=== tests/cases/compiler/indexSignatureOfTypeUnknownStillRequiresIndexSignature.ts ===
declare function f<T extends unknown = unknown>(x: { [x: string]: T }): T;
>f : <T extends unknown = unknown>(x: { [x: string]: T; }) => T
>x : { [x: string]: T; }
>x : string
var stooges = [
>stooges : { name: string; age: number; }[]
>[ { name: "moe", age: 40 }, { name: "larry", age: 50 }, { name: "curly", age: 60 }] : { name: string; age: number; }[]
{ name: "moe", age: 40 },
>{ name: "moe", age: 40 } : { name: string; age: number; }
>name : string
>"moe" : "moe"
>age : number
>40 : 40
{ name: "larry", age: 50 },
>{ name: "larry", age: 50 } : { name: string; age: number; }
>name : string
>"larry" : "larry"
>age : number
>50 : 50
{ name: "curly", age: 60 }
>{ name: "curly", age: 60 } : { name: string; age: number; }
>name : string
>"curly" : "curly"
>age : number
>60 : 60
];
f(stooges); // Should throw
>f(stooges) : any
>f : <T extends unknown = unknown>(x: { [x: string]: T; }) => T
>stooges : { name: string; age: number; }[]
@@ -1,4 +1,4 @@
tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts(18,27): error TS2345: Argument of type 'NumberMap<Function>' is not assignable to parameter of type 'StringMap<{}>'.
tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureTypeInference.ts(18,27): error TS2345: Argument of type 'NumberMap<Function>' is not assignable to parameter of type 'StringMap<unknown>'.
Index signature is missing in type 'NumberMap<Function>'.
@@ -22,7 +22,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/indexSignatureType
var v1 = numberMapToArray(stringMap); // Ok
var v1 = stringMapToArray(numberMap); // Error expected here
~~~~~~~~~
!!! error TS2345: Argument of type 'NumberMap<Function>' is not assignable to parameter of type 'StringMap<{}>'.
!!! error TS2345: Argument of type 'NumberMap<Function>' is not assignable to parameter of type 'StringMap<unknown>'.
!!! error TS2345: Index signature is missing in type 'NumberMap<Function>'.
var v1 = stringMapToArray(stringMap); // Ok
@@ -8,8 +8,8 @@ var a: f;
>a : f
var r = a.groupBy();
>r : { [key: string]: {}[]; }
>a.groupBy() : { [key: string]: {}[]; }
>r : { [key: string]: unknown[]; }
>a.groupBy() : { [key: string]: unknown[]; }
>a.groupBy : <T>() => { [key: string]: T[]; }
>a : f
>groupBy : <T>() => { [key: string]: T[]; }
@@ -29,8 +29,8 @@ var a2: c;
>a2 : c
var r2 = a2.groupBy();
>r2 : { [key: string]: {}[]; }
>a2.groupBy() : { [key: string]: {}[]; }
>r2 : { [key: string]: unknown[]; }
>a2.groupBy() : { [key: string]: unknown[]; }
>a2.groupBy : <T>() => { [key: string]: T[]; }
>a2 : c
>groupBy : <T>() => { [key: string]: T[]; }
+2 -2
View File
@@ -62,7 +62,7 @@ type T11 = ReturnType<(s: string) => void>; // void
>s : string
type T12 = ReturnType<(<T>() => T)>; // {}
>T12 : {}
>T12 : unknown
type T13 = ReturnType<(<T extends U, U extends number[]>() => T)>; // number[]
>T13 : number[]
@@ -110,7 +110,7 @@ type ArgumentType<T extends (x: any) => any> = T extends (a: infer A) => any ? A
>a : A
type T20 = ArgumentType<() => void>; // {}
>T20 : {}
>T20 : unknown
type T21 = ArgumentType<(x: string) => number>; // string
>T21 : string
+11 -11
View File
@@ -29,15 +29,15 @@ export class BrokenClass {
>[] : undefined[]
let populateItems = (order) => {
>populateItems : (order: any) => Promise<{}>
>(order) => { return new Promise((resolve, reject) => { this.doStuff(order.id) .then((items) => { order.items = items; resolve(order); }); }); } : (order: any) => Promise<{}>
>populateItems : (order: any) => Promise<unknown>
>(order) => { return new Promise((resolve, reject) => { this.doStuff(order.id) .then((items) => { order.items = items; resolve(order); }); }); } : (order: any) => Promise<unknown>
>order : any
return new Promise((resolve, reject) => {
>new Promise((resolve, reject) => { this.doStuff(order.id) .then((items) => { order.items = items; resolve(order); }); }) : Promise<{}>
>new Promise((resolve, reject) => { this.doStuff(order.id) .then((items) => { order.items = items; resolve(order); }); }) : Promise<unknown>
>Promise : PromiseConstructor
>(resolve, reject) => { this.doStuff(order.id) .then((items) => { order.items = items; resolve(order); }); } : (resolve: (value?: {} | PromiseLike<{}>) => void, reject: (reason?: any) => void) => void
>resolve : (value?: {} | PromiseLike<{}>) => void
>(resolve, reject) => { this.doStuff(order.id) .then((items) => { order.items = items; resolve(order); }); } : (resolve: (value?: unknown) => void, reject: (reason?: any) => void) => void
>resolve : (value?: unknown) => void
>reject : (reason?: any) => void
this.doStuff(order.id)
@@ -65,7 +65,7 @@ export class BrokenClass {
resolve(order);
>resolve(order) : void
>resolve : (value?: {} | PromiseLike<{}>) => void
>resolve : (value?: unknown) => void
>order : any
});
@@ -74,19 +74,19 @@ export class BrokenClass {
return Promise.all(result.map(populateItems))
>Promise.all(result.map(populateItems)) .then((orders: Array<MyModule.MyModel>) => { resolve(orders); }) : Promise<void>
>Promise.all(result.map(populateItems)) .then : <TResult1 = {}[], TResult2 = never>(onfulfilled?: (value: {}[]) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Promise.all(result.map(populateItems)) : Promise<{}[]>
>Promise.all(result.map(populateItems)) .then : <TResult1 = unknown[], TResult2 = never>(onfulfilled?: (value: unknown[]) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Promise.all(result.map(populateItems)) : Promise<unknown[]>
>Promise.all : { <TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; <T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; <T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; <T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; <T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>; <T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>; <T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<[T1, T2, T3, T4]>; <T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>; <T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>; <T>(values: (T | PromiseLike<T>)[]): Promise<T[]>; }
>Promise : PromiseConstructor
>all : { <TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>; <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; <T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; <T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; <T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; <T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>; <T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>; <T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<[T1, T2, T3, T4]>; <T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>; <T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>; <T>(values: (T | PromiseLike<T>)[]): Promise<T[]>; }
>result.map(populateItems) : Promise<{}>[]
>result.map(populateItems) : Promise<unknown>[]
>result.map : <U>(callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any) => U[]
>result : MyModule.MyModel[]
>map : <U>(callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any) => U[]
>populateItems : (order: any) => Promise<{}>
>populateItems : (order: any) => Promise<unknown>
.then((orders: Array<MyModule.MyModel>) => {
>then : <TResult1 = {}[], TResult2 = never>(onfulfilled?: (value: {}[]) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>then : <TResult1 = unknown[], TResult2 = never>(onfulfilled?: (value: unknown[]) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>(orders: Array<MyModule.MyModel>) => { resolve(orders); } : (orders: MyModule.MyModel[]) => void
>orders : MyModule.MyModel[]
>MyModule : any
@@ -38,8 +38,8 @@ class ObjectField<A, T extends { [name: string]: Field<any> }> {
}
var person = new ObjectField({
>person : ObjectField<{}, { id: NumberField; name: CharField; }>
>new ObjectField({ id: new NumberField(), name: new CharField()}) : ObjectField<{}, { id: NumberField; name: CharField; }>
>person : ObjectField<unknown, { id: NumberField; name: CharField; }>
>new ObjectField({ id: new NumberField(), name: new CharField()}) : ObjectField<unknown, { id: NumberField; name: CharField; }>
>ObjectField : typeof ObjectField
>{ id: new NumberField(), name: new CharField()} : { id: NumberField; name: CharField; }
@@ -58,7 +58,7 @@ var person = new ObjectField({
person.fields.id;
>person.fields.id : NumberField
>person.fields : { id: NumberField; name: CharField; }
>person : ObjectField<{}, { id: NumberField; name: CharField; }>
>person : ObjectField<unknown, { id: NumberField; name: CharField; }>
>fields : { id: NumberField; name: CharField; }
>id : NumberField
@@ -15,8 +15,8 @@ var zipWith: <T, S, U>(a: T[], b: S[], f: (x: T) => (y: S) => U) => U[];
>y : S
var result = zipWith([1, 2], ['a', 'b'], pair);
>result : { x: number; y: {}; }[]
>zipWith([1, 2], ['a', 'b'], pair) : { x: number; y: {}; }[]
>result : { x: number; y: unknown; }[]
>zipWith([1, 2], ['a', 'b'], pair) : { x: number; y: unknown; }[]
>zipWith : <T, S, U>(a: T[], b: S[], f: (x: T) => (y: S) => U) => U[]
>[1, 2] : number[]
>1 : 1
@@ -29,8 +29,8 @@ var result = zipWith([1, 2], ['a', 'b'], pair);
var i = result[0].x; // number
>i : number
>result[0].x : number
>result[0] : { x: number; y: {}; }
>result : { x: number; y: {}; }[]
>result[0] : { x: number; y: unknown; }
>result : { x: number; y: unknown; }[]
>0 : 0
>x : number
@@ -12,8 +12,8 @@ var a = new A<Date>();
>A : typeof A
var b1 = new B(); // no error
>b1 : B<{}>
>new B() : B<{}>
>b1 : B<unknown>
>new B() : B<unknown>
>B : typeof B
var b2: B<Date> = new B<Date>(); // no error
@@ -46,8 +46,8 @@ var n2 = new N.D2<number>(); // error
>D2 : typeof N.D2
var n3 = new N.D2(); // no error, D2<any>
>n3 : N.D2<{}>
>new N.D2() : N.D2<{}>
>n3 : N.D2<unknown>
>new N.D2() : N.D2<unknown>
>N.D2 : typeof N.D2
>N : typeof N
>D2 : typeof N.D2
@@ -9,8 +9,8 @@ class C<T> {
}
var c = new C();
>c : C<{}>
>new C() : C<{}>
>c : C<unknown>
>new C() : C<unknown>
>C : typeof C
class D<T, U> {
@@ -24,7 +24,7 @@ class D<T, U> {
}
var d = new D();
>d : D<{}, {}>
>new D() : D<{}, {}>
>d : D<unknown, unknown>
>new D() : D<unknown, unknown>
>D : typeof D
@@ -15,7 +15,7 @@ declare function createComponentClass<P>(factory: () => React.ComponentClass<P>)
class Foo extends createComponentClass(() => class extends React.Component<{}, {}> {
>Foo : Foo
>createComponentClass(() => class extends React.Component<{}, {}> { render() { return <span>Hello, world!</span>; }}) : React.Component<{}, {}>
>createComponentClass(() => class extends React.Component<{}, {}> { render() { return <span>Hello, world!</span>; }}) : React.Component<unknown, {}>
>createComponentClass : <P>(factory: () => React.ComponentClass<P>) => React.ComponentClass<P>
>() => class extends React.Component<{}, {}> { render() { return <span>Hello, world!</span>; }} : () => typeof (Anonymous class)
>class extends React.Component<{}, {}> { render() { return <span>Hello, world!</span>; }} : typeof (Anonymous class)
@@ -1255,13 +1255,13 @@ declare type Thing = {
declare function f1(thing: Thing): void;
declare const assignTo2: <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) => (value: T[K1][K2]) => T[K1][K2];
declare function one<T>(handler: (t: T) => void): T;
declare var empty: {};
declare var empty: unknown;
declare type Handlers<T> = {
[K in keyof T]: (t: T[K]) => void;
};
declare function on<T>(handlerHash: Handlers<T>): T;
declare var hashOfEmpty1: {
test: {};
test: unknown;
};
declare var hashOfEmpty2: {
test: boolean;
@@ -1276,7 +1276,7 @@ declare class Component1<Data, Computed> {
}
declare let c1: Component1<{
hello: string;
}, {}>;
}, unknown>;
interface Options2<Data, Computed> {
data?: Data;
computed?: Computed;
@@ -1523,8 +1523,8 @@ declare function one<T>(handler: (t: T) => void): T
>t : T
var empty = one(() => {}) // inferred as {}, expected
>empty : {}
>one(() => {}) : {}
>empty : unknown
>one(() => {}) : unknown
>one : <T>(handler: (t: T) => void) => T
>() => {} : () => void
@@ -1537,8 +1537,8 @@ declare function on<T>(handlerHash: Handlers<T>): T
>handlerHash : Handlers<T>
var hashOfEmpty1 = on({ test: () => {} }); // {}
>hashOfEmpty1 : { test: {}; }
>on({ test: () => {} }) : { test: {}; }
>hashOfEmpty1 : { test: unknown; }
>on({ test: () => {} }) : { test: unknown; }
>on : <T>(handlerHash: Handlers<T>) => T
>{ test: () => {} } : { test: () => void; }
>test : () => void
@@ -1575,8 +1575,8 @@ declare class Component1<Data, Computed> {
}
let c1 = new Component1({
>c1 : Component1<{ hello: string; }, {}>
>new Component1({ data: { hello: "" }}) : Component1<{ hello: string; }, {}>
>c1 : Component1<{ hello: string; }, unknown>
>new Component1({ data: { hello: "" }}) : Component1<{ hello: string; }, unknown>
>Component1 : typeof Component1
>{ data: { hello: "" }} : { data: { hello: string; }; }
@@ -1593,7 +1593,7 @@ let c1 = new Component1({
c1.get("hello");
>c1.get("hello") : string
>c1.get : <K extends "hello">(key: K) => { hello: string; }[K]
>c1 : Component1<{ hello: string; }, {}>
>c1 : Component1<{ hello: string; }, unknown>
>get : <K extends "hello">(key: K) => { hello: string; }[K]
>"hello" : "hello"
@@ -1,4 +1,4 @@
tests/cases/conformance/types/mapped/mappedTypeInferenceErrors.ts(16,9): error TS2322: Type 'number' is not assignable to type '() => {}'.
tests/cases/conformance/types/mapped/mappedTypeInferenceErrors.ts(16,9): error TS2322: Type 'number' is not assignable to type '() => unknown'.
==== tests/cases/conformance/types/mapped/mappedTypeInferenceErrors.ts (1 errors) ====
@@ -19,8 +19,8 @@ tests/cases/conformance/types/mapped/mappedTypeInferenceErrors.ts(16,9): error T
},
baz: 42
~~~
!!! error TS2322: Type 'number' is not assignable to type '() => {}'.
!!! related TS6500 tests/cases/conformance/types/mapped/mappedTypeInferenceErrors.ts:16:9: The expected type comes from property 'baz' which is declared here on type 'ComputedOf<{ bar: number; baz: {}; }>'
!!! error TS2322: Type 'number' is not assignable to type '() => unknown'.
!!! related TS6500 tests/cases/conformance/types/mapped/mappedTypeInferenceErrors.ts:16:9: The expected type comes from property 'baz' which is declared here on type 'ComputedOf<{ bar: number; baz: unknown; }>'
}
});
@@ -1,8 +1,8 @@
error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: {}; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: {}; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTouch: any; createTouchList: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; evaluate: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChild: Line truncated
tests/cases/compiler/mappedTypeRecursiveInference.ts(19,18): error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: {}; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: {}; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTouch: any; createTouchList: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; evaluate: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespLine truncated
error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTouch: any; createTouchList: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; evaluate: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; remLine truncated
tests/cases/compiler/mappedTypeRecursiveInference.ts(19,18): error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTouch: any; createTouchList: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; evaluate: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; loLine truncated
!!! error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: {}; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: {}; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTouch: any; createTouchList: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; evaluate: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChiLine truncated
!!! error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTouch: any; createTouchList: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; evaluate: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any;Line truncated
==== tests/cases/compiler/mappedTypeRecursiveInference.ts (1 errors) ====
interface A { a: A }
declare let a: A;
@@ -24,7 +24,7 @@ tests/cases/compiler/mappedTypeRecursiveInference.ts(19,18): error TS2321: Exces
let xhr: XMLHttpRequest;
const out2 = foo(xhr);
~~~
!!! error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: {}; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: {}; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTouch: any; createTouchList: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; evaluate: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any; removeChiLine truncated
!!! error TS2321: Excessive stack depth comparing types 'XMLHttpRequest' and 'Deep<{ onreadystatechange: unknown; readonly readyState: { toString: any; toFixed: any; toExponential: any; toPrecision: any; valueOf: any; toLocaleString: any; }; readonly response: unknown; readonly responseText: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; responseType: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseURL: { toString: any; charAt: any; charCodeAt: any; concat: any; indexOf: any; lastIndexOf: any; localeCompare: any; match: any; replace: any; search: any; slice: any; split: any; substring: any; toLowerCase: any; toLocaleLowerCase: any; toUpperCase: any; toLocaleUpperCase: any; trim: any; readonly length: any; substr: any; valueOf: any; codePointAt: any; includes: any; endsWith: any; normalize: any; repeat: any; startsWith: any; anchor: any; big: any; blink: any; bold: any; fixed: any; fontcolor: any; fontsize: any; italics: any; link: any; small: any; strike: any; sub: any; sup: any; [Symbol.iterator]: any; }; readonly responseXML: { readonly URL: any; readonly activeElement: any; alinkColor: any; readonly all: any; readonly anchors: any; readonly applets: any; bgColor: any; body: any; readonly characterSet: any; readonly charset: any; readonly compatMode: any; readonly contentType: any; cookie: any; readonly currentScript: any; readonly defaultView: any; designMode: any; dir: any; readonly doctype: any; readonly documentElement: any; readonly documentURI: any; domain: any; readonly embeds: any; fgColor: any; readonly forms: any; readonly fullscreen: any; readonly fullscreenEnabled: any; readonly head: any; readonly hidden: any; readonly images: any; readonly implementation: any; readonly inputEncoding: any; readonly lastModified: any; linkColor: any; readonly links: any; location: any; onfullscreenchange: any; onfullscreenerror: any; onpointerlockchange: any; onpointerlockerror: any; onreadystatechange: any; onvisibilitychange: any; readonly origin: any; readonly plugins: any; readonly readyState: any; readonly referrer: any; readonly scripts: any; readonly scrollingElement: any; readonly timeline: any; title: any; readonly visibilityState: any; vlinkColor: any; adoptNode: any; captureEvents: any; caretPositionFromPoint: any; caretRangeFromPoint: any; clear: any; close: any; createAttribute: any; createAttributeNS: any; createCDATASection: any; createComment: any; createDocumentFragment: any; createElement: any; createElementNS: any; createEvent: any; createNodeIterator: any; createProcessingInstruction: any; createRange: any; createTextNode: any; createTouch: any; createTouchList: any; createTreeWalker: any; elementFromPoint: any; elementsFromPoint: any; evaluate: any; execCommand: any; exitFullscreen: any; exitPointerLock: any; getAnimations: any; getElementById: any; getElementsByClassName: any; getElementsByName: any; getElementsByTagName: any; getElementsByTagNameNS: any; getSelection: any; hasFocus: any; importNode: any; open: any; queryCommandEnabled: any; queryCommandIndeterm: any; queryCommandState: any; queryCommandSupported: any; queryCommandValue: any; releaseEvents: any; write: any; writeln: any; addEventListener: any; removeEventListener: any; readonly baseURI: any; readonly childNodes: any; readonly firstChild: any; readonly isConnected: any; readonly lastChild: any; readonly namespaceURI: any; readonly nextSibling: any; readonly nodeName: any; readonly nodeType: any; nodeValue: any; readonly ownerDocument: any; readonly parentElement: any; readonly parentNode: any; readonly previousSibling: any; textContent: any; appendChild: any; cloneNode: any; compareDocumentPosition: any; contains: any; getRootNode: any; hasChildNodes: any; insertBefore: any; isDefaultNamespace: any; isEqualNode: any; isSameNode: any; lookupNamespaceURI: any; lookupPrefix: any; normalize: any;Line truncated
out2.responseXML
out2.responseXML.activeElement.className.length
@@ -133,13 +133,13 @@ o.hasOwnProperty(Symbol.hasInstance);
// Using ES6 promise
async function out() {
>out : () => Promise<{}>
>out : () => Promise<unknown>
return new Promise(function (resolve, reject) {});
>new Promise(function (resolve, reject) {}) : Promise<{}>
>new Promise(function (resolve, reject) {}) : Promise<unknown>
>Promise : PromiseConstructor
>function (resolve, reject) {} : (resolve: (value?: {} | PromiseLike<{}>) => void, reject: (reason?: any) => void) => void
>resolve : (value?: {} | PromiseLike<{}>) => void
>function (resolve, reject) {} : (resolve: (value?: unknown) => void, reject: (reason?: any) => void) => void
>resolve : (value?: unknown) => void
>reject : (reason?: any) => void
}
@@ -148,10 +148,10 @@ declare var console: any;
out().then(() => {
>out().then(() => { console.log("Yea!");}) : Promise<void>
>out().then : <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out() : Promise<{}>
>out : () => Promise<{}>
>then : <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out().then : <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out() : Promise<unknown>
>out : () => Promise<unknown>
>then : <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>() => { console.log("Yea!");} : () => void
console.log("Yea!");
@@ -133,13 +133,13 @@ o.hasOwnProperty(Symbol.hasInstance);
// Using ES6 promise
async function out() {
>out : () => Promise<{}>
>out : () => Promise<unknown>
return new Promise(function (resolve, reject) {});
>new Promise(function (resolve, reject) {}) : Promise<{}>
>new Promise(function (resolve, reject) {}) : Promise<unknown>
>Promise : PromiseConstructor
>function (resolve, reject) {} : (resolve: (value?: {} | PromiseLike<{}>) => void, reject: (reason?: any) => void) => void
>resolve : (value?: {} | PromiseLike<{}>) => void
>function (resolve, reject) {} : (resolve: (value?: unknown) => void, reject: (reason?: any) => void) => void
>resolve : (value?: unknown) => void
>reject : (reason?: any) => void
}
@@ -148,10 +148,10 @@ declare var console: any;
out().then(() => {
>out().then(() => { console.log("Yea!");}) : Promise<void>
>out().then : <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out() : Promise<{}>
>out : () => Promise<{}>
>then : <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out().then : <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out() : Promise<unknown>
>out : () => Promise<unknown>
>then : <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>() => { console.log("Yea!");} : () => void
console.log("Yea!");
@@ -133,13 +133,13 @@ o.hasOwnProperty(Symbol.hasInstance);
// Using ES6 promise
async function out() {
>out : () => Promise<{}>
>out : () => Promise<unknown>
return new Promise(function (resolve, reject) {});
>new Promise(function (resolve, reject) {}) : Promise<{}>
>new Promise(function (resolve, reject) {}) : Promise<unknown>
>Promise : PromiseConstructor
>function (resolve, reject) {} : (resolve: (value?: {} | PromiseLike<{}>) => void, reject: (reason?: any) => void) => void
>resolve : (value?: {} | PromiseLike<{}>) => void
>function (resolve, reject) {} : (resolve: (value?: unknown) => void, reject: (reason?: any) => void) => void
>resolve : (value?: unknown) => void
>reject : (reason?: any) => void
}
@@ -148,10 +148,10 @@ declare var console: any;
out().then(() => {
>out().then(() => { console.log("Yea!");}) : Promise<void>
>out().then : <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out() : Promise<{}>
>out : () => Promise<{}>
>then : <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out().then : <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>out() : Promise<unknown>
>out : () => Promise<unknown>
>then : <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>() => { console.log("Yea!");} : () => void
console.log("Yea!");
@@ -1,9 +1,9 @@
tests/cases/compiler/mutuallyRecursiveCallbacks.ts(7,1): error TS2322: Type '<T>(bar: Bar<T>) => void' is not assignable to type 'Bar<{}>'.
Types of parameters 'bar' and 'foo' are incompatible.
Types of parameters 'bar' and 'foo' are incompatible.
Type 'Foo<{}>' is not assignable to type 'Bar<{}>'.
Type 'Foo<unknown>' is not assignable to type 'Bar<{}>'.
Types of parameters 'bar' and 'foo' are incompatible.
Type 'void' is not assignable to type 'Foo<{}>'.
Type 'void' is not assignable to type 'Foo<unknown>'.
==== tests/cases/compiler/mutuallyRecursiveCallbacks.ts (1 errors) ====
@@ -18,7 +18,7 @@ tests/cases/compiler/mutuallyRecursiveCallbacks.ts(7,1): error TS2322: Type '<T>
!!! error TS2322: Type '<T>(bar: Bar<T>) => void' is not assignable to type 'Bar<{}>'.
!!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible.
!!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible.
!!! error TS2322: Type 'Foo<{}>' is not assignable to type 'Bar<{}>'.
!!! error TS2322: Type 'Foo<unknown>' is not assignable to type 'Bar<{}>'.
!!! error TS2322: Types of parameters 'bar' and 'foo' are incompatible.
!!! error TS2322: Type 'void' is not assignable to type 'Foo<{}>'.
!!! error TS2322: Type 'void' is not assignable to type 'Foo<unknown>'.
@@ -1,5 +1,5 @@
tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts(13,17): error TS2345: Argument of type 'B<T>' is not assignable to parameter of type 'A<{}>'.
Property 'a' is missing in type 'B<T>' but required in type 'A<{}>'.
tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts(13,17): error TS2345: Argument of type 'B<T>' is not assignable to parameter of type 'A<unknown>'.
Property 'a' is missing in type 'B<T>' but required in type 'A<unknown>'.
==== tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts (1 errors) ====
@@ -17,8 +17,8 @@ tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeF
if (x instanceof B) {
acceptA(x);
~
!!! error TS2345: Argument of type 'B<T>' is not assignable to parameter of type 'A<{}>'.
!!! error TS2345: Property 'a' is missing in type 'B<T>' but required in type 'A<{}>'.
!!! error TS2345: Argument of type 'B<T>' is not assignable to parameter of type 'A<unknown>'.
!!! error TS2345: Property 'a' is missing in type 'B<T>' but required in type 'A<unknown>'.
!!! related TS2728 tests/cases/conformance/types/typeRelationships/instanceOf/narrowingGenericTypeFromInstanceof01.ts:2:17: 'a' is declared here.
}
@@ -50,12 +50,12 @@ var a: C0;
// Generic construct expression with no parentheses
var c1 = new T;
>c1 : T<{}>
>new T : T<{}>
>c1 : T<unknown>
>new T : T<unknown>
>T : typeof T
var c1: T<{}>;
>c1 : T<{}>
>c1 : T<unknown>
// Construct expression where constructor is of type 'any' with no parentheses
var d = new anyCtor;
@@ -49,12 +49,12 @@ var b = new C0 32, ''; // Parse error
// Generic construct expression with no parentheses
var c1 = new T;
>c1 : T<{}>
>new T : T<{}>
>c1 : T<unknown>
>new T : T<unknown>
>T : typeof T
var c1: T<{}>;
>c1 : T<{}>
>c1 : T<unknown>
var c2 = new T<string>; // Parse error
>c2 : T<string>
@@ -0,0 +1,36 @@
tests/cases/conformance/expressions/contextualTyping/objectLiteralContextualTyping.ts(29,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'unknown', but here has type '{}'.
==== tests/cases/conformance/expressions/contextualTyping/objectLiteralContextualTyping.ts (1 errors) ====
// In a contextually typed object literal, each property value expression is contextually typed by
// the type of the property with a matching name in the contextual type, if any, or otherwise
// for a numerically named property, the numeric index type of the contextual type, if any, or otherwise
// the string index type of the contextual type, if any.
interface Item {
name: string;
description?: string;
}
declare function foo(item: Item): string;
declare function foo(item: any): number;
var x = foo({ name: "Sprocket" });
var x: string;
var y = foo({ name: "Sprocket", description: "Bumpy wheel" });
var y: string;
var z = foo({ name: "Sprocket", description: false });
var z: number;
var w = foo({ a: 10 });
var w: number;
declare function bar<T>(param: { x?: T }): T;
var b = bar({});
var b: {};
~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'unknown', but here has type '{}'.
@@ -74,11 +74,11 @@ declare function bar<T>(param: { x?: T }): T;
>x : T
var b = bar({});
>b : {}
>bar({}) : {}
>b : unknown
>bar({}) : unknown
>bar : <T>(param: { x?: T; }) => T
>{} : {}
var b: {};
>b : {}
>b : unknown
@@ -94,7 +94,7 @@ new fn2<Date>('', 0); // OK
// Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments
new fn2('', 0); // OK
>new fn2('', 0) : fn2<{}>
>new fn2('', 0) : fn2<unknown>
>fn2 : typeof fn2
>'' : ""
>0 : 0
@@ -120,12 +120,12 @@ class fn3<T, U, V> {
}
new fn3(3);
>new fn3(3) : fn3<number, {}, {}>
>new fn3(3) : fn3<number, unknown, unknown>
>fn3 : typeof fn3
>3 : 3
new fn3('', 3, '');
>new fn3('', 3, '') : fn3<number, string, {}>
>new fn3('', 3, '') : fn3<number, string, unknown>
>fn3 : typeof fn3
>'' : ""
>3 : 3
@@ -20,8 +20,8 @@ class C {
>y : Y
public x = fn(y, (y, x) => y.x = x) // expected to work, but actually doesn't
>x : {}
>fn(y, (y, x) => y.x = x) : {}
>x : unknown
>fn(y, (y, x) => y.x = x) : unknown
>fn : <a>(y: Y, set: (y: Y, x: number) => void) => a
>y : Y
>(y, x) => y.x = x : (y: Y, x: number) => number
@@ -19,13 +19,13 @@ module Query {
}
function fromOrderBy() {
>fromOrderBy : () => Iterator<{}>
>fromOrderBy : () => Iterator<unknown>
return fromDoWhile(test => {
>fromDoWhile(test => { return true; }) : Iterator<{}>
>fromDoWhile(test => { return true; }) : Iterator<unknown>
>fromDoWhile : <T>(doWhile: (test: Iterator<T>) => boolean) => Iterator<T>
>test => { return true; } : (test: Iterator<{}>) => true
>test : Iterator<{}>
>test => { return true; } : (test: Iterator<unknown>) => true
>test : Iterator<unknown>
return true;
>true : true
@@ -26,7 +26,7 @@ module Q {
>bar : () => void
foo(null);
>foo(null) : (a: Iterator<{}>) => number
>foo(null) : (a: Iterator<unknown>) => number
>foo : <T>(x: (a: Iterator<T>) => number) => (a: Iterator<T>) => number
>null : null
}
@@ -1018,19 +1018,19 @@ var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise,
>sIPromise : (x: any) => IPromise<string>
var r10 = testFunction10(x => x);
>r10 : IPromise<{}>
>testFunction10(x => x) : IPromise<{}>
>r10 : IPromise<unknown>
>testFunction10(x => x) : IPromise<unknown>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>x => x : <U>(x: U) => U
>x : U
>x : U
var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok
>r10a : IPromise<{}>
>r10.then(testFunction10, testFunction10, testFunction10) : IPromise<{}>
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10a : IPromise<unknown>
>r10.then(testFunction10, testFunction10, testFunction10) : IPromise<unknown>
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
@@ -1038,9 +1038,9 @@ var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok
var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok
>r10b : IPromise<string>
>r10.then(sIPromise, sIPromise, sIPromise) : IPromise<string>
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>sIPromise : (x: any) => IPromise<string>
>sIPromise : (x: any) => IPromise<string>
>sIPromise : (x: any) => IPromise<string>
@@ -1048,9 +1048,9 @@ var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok
var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok
>r10c : IPromise<number>
>r10.then(nIPromise, nIPromise, nIPromise) : IPromise<number>
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>nIPromise : (x: any) => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
@@ -1058,9 +1058,9 @@ var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok
var r10d = r10.then(testFunction, sIPromise, nIPromise); // ok
>r10d : any
>r10.then(testFunction, sIPromise, nIPromise) : any
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>testFunction : () => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
>nIPromise : (x: any) => IPromise<number>
@@ -1070,9 +1070,9 @@ var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromis
>r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise) : IPromise<string>
>r10.then(testFunction, nIPromise, sIPromise).then : { <U>(success?: (value: number) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: number) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: number) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then(testFunction, nIPromise, sIPromise) : IPromise<number>
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>testFunction : () => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
@@ -1082,39 +1082,39 @@ var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromis
>sIPromise : (x: any) => IPromise<string>
var s10 = testFunction10P(x => x);
>s10 : Promise<{}>
>testFunction10P(x => x) : Promise<{}>
>s10 : Promise<unknown>
>testFunction10P(x => x) : Promise<unknown>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>x => x : <U>(x: U) => U
>x : U
>x : U
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
>s10a : Promise<IPromise<{}>>
>s10.then(testFunction10, testFunction10, testFunction10) : Promise<IPromise<{}>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10a : Promise<IPromise<unknown>>
>s10.then(testFunction10, testFunction10, testFunction10) : Promise<IPromise<unknown>>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok
>s10b : Promise<{}>
>s10.then(testFunction10P, testFunction10P, testFunction10P) : Promise<{}>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10b : Promise<unknown>
>s10.then(testFunction10P, testFunction10P, testFunction10P) : Promise<unknown>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok
>s10c : Promise<{}>
>s10.then(testFunction10P, testFunction10, testFunction10) : Promise<{}>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10c : Promise<unknown>
>s10.then(testFunction10P, testFunction10, testFunction10) : Promise<unknown>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
@@ -1122,9 +1122,9 @@ var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok
var s10d = s10.then(sPromise, sPromise, sPromise); // ok
>s10d : Promise<string>
>s10.then(sPromise, sPromise, sPromise) : Promise<string>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>sPromise : (x: any) => Promise<string>
>sPromise : (x: any) => Promise<string>
>sPromise : (x: any) => Promise<string>
@@ -1132,9 +1132,9 @@ var s10d = s10.then(sPromise, sPromise, sPromise); // ok
var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok
>s10e : Promise<IPromise<number>>
>s10.then(nIPromise, nPromise, nIPromise) : Promise<IPromise<number>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>nIPromise : (x: any) => IPromise<number>
>nPromise : (x: any) => Promise<number>
>nIPromise : (x: any) => IPromise<number>
@@ -1142,9 +1142,9 @@ var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok
var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error
>s10f : any
>s10.then(testFunctionP, sIPromise, nIPromise) : any
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunctionP : () => Promise<number>
>sIPromise : (x: any) => IPromise<string>
>nIPromise : (x: any) => IPromise<number>
@@ -1154,9 +1154,9 @@ var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromis
>s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise) : Promise<IPromise<string>>
>s10.then(testFunctionP, nIPromise, sIPromise).then : { <TResult1 = IPromise<number>, TResult2 = never>(onfulfilled?: (value: IPromise<number>) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: IPromise<number>) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: IPromise<number>) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: IPromise<number>) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: IPromise<number>) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then(testFunctionP, nIPromise, sIPromise) : Promise<IPromise<number>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunctionP : () => Promise<number>
>nIPromise : (x: any) => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
@@ -1220,8 +1220,8 @@ var r12 = testFunction12(x => x);
>x : any
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
>r12a : IPromise<{}>
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<{}>
>r12a : IPromise<unknown>
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<unknown>
>r12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r12 : IPromise<(x: any) => any>
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
@@ -1238,8 +1238,8 @@ var s12 = testFunction12(x => x);
>x : any
var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
>s12a : IPromise<{}>
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<{}>
>s12a : IPromise<unknown>
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<unknown>
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>s12 : IPromise<(x: any) => any>
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
@@ -1248,8 +1248,8 @@ var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
>testFunction12 : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): IPromise<T>; }
var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
>s12b : IPromise<{}>
>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise<{}>
>s12b : IPromise<unknown>
>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise<unknown>
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>s12 : IPromise<(x: any) => any>
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
@@ -1258,8 +1258,8 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
>testFunction12P : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
>s12c : IPromise<{}>
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<{}>
>s12c : IPromise<unknown>
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<unknown>
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>s12 : IPromise<(x: any) => any>
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
@@ -993,19 +993,19 @@ var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise,
>sIPromise : (x: any) => IPromise<string>
var r10 = testFunction10(x => x);
>r10 : IPromise<{}>
>testFunction10(x => x) : IPromise<{}>
>r10 : IPromise<unknown>
>testFunction10(x => x) : IPromise<unknown>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>x => x : <U>(x: U) => U
>x : U
>x : U
var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok
>r10a : IPromise<{}>
>r10.then(testFunction10, testFunction10, testFunction10) : IPromise<{}>
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10a : IPromise<unknown>
>r10.then(testFunction10, testFunction10, testFunction10) : IPromise<unknown>
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
@@ -1013,9 +1013,9 @@ var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok
var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok
>r10b : IPromise<string>
>r10.then(sIPromise, sIPromise, sIPromise) : IPromise<string>
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>sIPromise : (x: any) => IPromise<string>
>sIPromise : (x: any) => IPromise<string>
>sIPromise : (x: any) => IPromise<string>
@@ -1023,9 +1023,9 @@ var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok
var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok
>r10c : IPromise<number>
>r10.then(nIPromise, nIPromise, nIPromise) : IPromise<number>
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>nIPromise : (x: any) => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
@@ -1033,9 +1033,9 @@ var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok
var r10d = r10.then(testFunction, sIPromise, nIPromise); // error
>r10d : any
>r10.then(testFunction, sIPromise, nIPromise) : any
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>testFunction : () => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
>nIPromise : (x: any) => IPromise<number>
@@ -1045,9 +1045,9 @@ var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromis
>r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise) : IPromise<string>
>r10.then(testFunction, nIPromise, sIPromise).then : { <U>(success?: (value: number) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: number) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: number) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: number) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then(testFunction, nIPromise, sIPromise) : IPromise<number>
>r10.then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<{}>
>then : { <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10.then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r10 : IPromise<unknown>
>then : { <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>testFunction : () => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
@@ -1057,39 +1057,39 @@ var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromis
>sIPromise : (x: any) => IPromise<string>
var s10 = testFunction10P(x => x);
>s10 : Promise<{}>
>testFunction10P(x => x) : Promise<{}>
>s10 : Promise<unknown>
>testFunction10P(x => x) : Promise<unknown>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>x => x : <U>(x: U) => U
>x : U
>x : U
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
>s10a : Promise<IPromise<{}>>
>s10.then(testFunction10, testFunction10, testFunction10) : Promise<IPromise<{}>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10a : Promise<IPromise<unknown>>
>s10.then(testFunction10, testFunction10, testFunction10) : Promise<IPromise<unknown>>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok
>s10b : Promise<Promise<{}>>
>s10.then(testFunction10P, testFunction10P, testFunction10P) : Promise<Promise<{}>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10b : Promise<Promise<unknown>>
>s10.then(testFunction10P, testFunction10P, testFunction10P) : Promise<Promise<unknown>>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok
>s10c : Promise<IPromise<{}>>
>s10.then(testFunction10P, testFunction10, testFunction10) : Promise<IPromise<{}>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10c : Promise<IPromise<unknown>>
>s10.then(testFunction10P, testFunction10, testFunction10) : Promise<IPromise<unknown>>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
@@ -1097,9 +1097,9 @@ var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok
var s10d = s10.then(sPromise, sPromise, sPromise); // ok
>s10d : Promise<Promise<string>>
>s10.then(sPromise, sPromise, sPromise) : Promise<Promise<string>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>sPromise : (x: any) => Promise<string>
>sPromise : (x: any) => Promise<string>
>sPromise : (x: any) => Promise<string>
@@ -1107,9 +1107,9 @@ var s10d = s10.then(sPromise, sPromise, sPromise); // ok
var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok
>s10e : Promise<IPromise<number>>
>s10.then(nIPromise, nPromise, nIPromise) : Promise<IPromise<number>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>nIPromise : (x: any) => IPromise<number>
>nPromise : (x: any) => Promise<number>
>nIPromise : (x: any) => IPromise<number>
@@ -1117,9 +1117,9 @@ var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok
var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error
>s10f : any
>s10.then(testFunctionP, sIPromise, nIPromise) : any
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunctionP : () => Promise<number>
>sIPromise : (x: any) => IPromise<string>
>nIPromise : (x: any) => IPromise<number>
@@ -1129,9 +1129,9 @@ var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromis
>s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise) : Promise<IPromise<string>>
>s10.then(testFunctionP, nIPromise, sIPromise).then : { <TResult1 = IPromise<number>, TResult2 = never>(onfulfilled?: (value: IPromise<number>) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: IPromise<number>) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then(testFunctionP, nIPromise, sIPromise) : Promise<IPromise<number>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunctionP : () => Promise<number>
>nIPromise : (x: any) => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
@@ -1195,8 +1195,8 @@ var r12 = testFunction12(x => x);
>x : any
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
>r12a : IPromise<{}>
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<{}>
>r12a : IPromise<unknown>
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<unknown>
>r12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>r12 : IPromise<(x: any) => any>
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
@@ -1213,8 +1213,8 @@ var s12 = testFunction12(x => x);
>x : any
var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
>s12a : IPromise<{}>
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<{}>
>s12a : IPromise<unknown>
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<unknown>
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>s12 : IPromise<(x: any) => any>
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
@@ -1223,8 +1223,8 @@ var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
>testFunction12 : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): IPromise<T>; }
var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
>s12b : IPromise<{}>
>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise<{}>
>s12b : IPromise<unknown>
>s12.then(testFunction12P, testFunction12P, testFunction12P) : IPromise<unknown>
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>s12 : IPromise<(x: any) => any>
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
@@ -1233,8 +1233,8 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
>testFunction12P : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
>s12c : IPromise<{}>
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<{}>
>s12c : IPromise<unknown>
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<unknown>
>s12.then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
>s12 : IPromise<(x: any) => any>
>then : { <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => IPromise<U>, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => IPromise<U>, progress?: (progress: any) => void): IPromise<U>; <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>; }
@@ -65,8 +65,8 @@ tests/cases/compiler/promisePermutations3.ts(159,21): error TS2345: Argument of
Types of parameters 'onfulfilled' and 'success' are incompatible.
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 '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise<{}>'.
Property 'catch' is missing in type 'IPromise<any>' but required in type 'Promise<{}>'.
tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of type '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise<unknown>'.
Property 'catch' is missing in type 'IPromise<any>' but required in type 'Promise<unknown>'.
==== tests/cases/compiler/promisePermutations3.ts (35 errors) ====
@@ -338,7 +338,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of
var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
~~~~~~~~~~~~~~~
!!! error TS2345: Argument of type '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise<{}>'.
!!! error TS2345: Property 'catch' is missing in type 'IPromise<any>' but required in type 'Promise<{}>'.
!!! error TS2345: Argument of type '{ <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise<unknown>'.
!!! error TS2345: Property 'catch' is missing in type 'IPromise<any>' but required in type 'Promise<unknown>'.
!!! related TS2728 /.ts/lib.es5.d.ts:1413:5: 'catch' is declared here.
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
@@ -993,19 +993,19 @@ var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise,
>sIPromise : (x: any) => IPromise<string>
var r10 = testFunction10(x => x);
>r10 : IPromise<{}>
>testFunction10(x => x) : IPromise<{}>
>r10 : IPromise<unknown>
>testFunction10(x => x) : IPromise<unknown>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>x => x : <U>(x: U) => U
>x : U
>x : U
var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok
>r10a : IPromise<IPromise<{}>>
>r10.then(testFunction10, testFunction10, testFunction10) : IPromise<IPromise<{}>>
>r10.then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<{}>
>then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10a : IPromise<IPromise<unknown>>
>r10.then(testFunction10, testFunction10, testFunction10) : IPromise<IPromise<unknown>>
>r10.then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<unknown>
>then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
@@ -1013,9 +1013,9 @@ var r10a = r10.then(testFunction10, testFunction10, testFunction10); // ok
var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok
>r10b : IPromise<IPromise<string>>
>r10.then(sIPromise, sIPromise, sIPromise) : IPromise<IPromise<string>>
>r10.then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<{}>
>then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10.then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<unknown>
>then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>sIPromise : (x: any) => IPromise<string>
>sIPromise : (x: any) => IPromise<string>
>sIPromise : (x: any) => IPromise<string>
@@ -1023,9 +1023,9 @@ var r10b = r10.then(sIPromise, sIPromise, sIPromise); // ok
var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok
>r10c : IPromise<IPromise<number>>
>r10.then(nIPromise, nIPromise, nIPromise) : IPromise<IPromise<number>>
>r10.then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<{}>
>then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10.then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<unknown>
>then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>nIPromise : (x: any) => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
@@ -1033,9 +1033,9 @@ var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok
var r10d = r10.then(testFunction, sIPromise, nIPromise); // error
>r10d : any
>r10.then(testFunction, sIPromise, nIPromise) : any
>r10.then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<{}>
>then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10.then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<unknown>
>then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>testFunction : () => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
>nIPromise : (x: any) => IPromise<number>
@@ -1045,9 +1045,9 @@ var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromis
>r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise) : IPromise<IPromise<string>>
>r10.then(testFunction, nIPromise, sIPromise).then : <U>(success?: (value: IPromise<number>) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10.then(testFunction, nIPromise, sIPromise) : IPromise<IPromise<number>>
>r10.then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<{}>
>then : <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10.then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r10 : IPromise<unknown>
>then : <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>testFunction : () => IPromise<number>
>nIPromise : (x: any) => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
@@ -1057,39 +1057,39 @@ var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromis
>sIPromise : (x: any) => IPromise<string>
var s10 = testFunction10P(x => x);
>s10 : Promise<{}>
>testFunction10P(x => x) : Promise<{}>
>s10 : Promise<unknown>
>testFunction10P(x => x) : Promise<unknown>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>x => x : <U>(x: U) => U
>x : U
>x : U
var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok
>s10a : Promise<IPromise<{}>>
>s10.then(testFunction10, testFunction10, testFunction10) : Promise<IPromise<{}>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10a : Promise<IPromise<unknown>>
>s10.then(testFunction10, testFunction10, testFunction10) : Promise<IPromise<unknown>>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
var s10b = s10.then(testFunction10P, testFunction10P, testFunction10P); // ok
>s10b : Promise<{}>
>s10.then(testFunction10P, testFunction10P, testFunction10P) : Promise<{}>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10b : Promise<unknown>
>s10.then(testFunction10P, testFunction10P, testFunction10P) : Promise<unknown>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok
>s10c : Promise<{}>
>s10.then(testFunction10P, testFunction10, testFunction10) : Promise<{}>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10c : Promise<unknown>
>s10.then(testFunction10P, testFunction10, testFunction10) : Promise<unknown>
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunction10P : <T>(cb: <U>(a: U) => U) => Promise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
>testFunction10 : <T>(cb: <U>(a: U) => U) => IPromise<T>
@@ -1097,9 +1097,9 @@ var s10c = s10.then(testFunction10P, testFunction10, testFunction10); // ok
var s10d = s10.then(sPromise, sPromise, sPromise); // ok
>s10d : Promise<string>
>s10.then(sPromise, sPromise, sPromise) : Promise<string>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>sPromise : (x: any) => Promise<string>
>sPromise : (x: any) => Promise<string>
>sPromise : (x: any) => Promise<string>
@@ -1107,9 +1107,9 @@ var s10d = s10.then(sPromise, sPromise, sPromise); // ok
var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok
>s10e : Promise<IPromise<number>>
>s10.then(nIPromise, nPromise, nIPromise) : Promise<IPromise<number>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>nIPromise : (x: any) => IPromise<number>
>nPromise : (x: any) => Promise<number>
>nIPromise : (x: any) => IPromise<number>
@@ -1117,9 +1117,9 @@ var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok
var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error
>s10f : any
>s10.then(testFunctionP, sIPromise, nIPromise) : any
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunctionP : () => Promise<number>
>sIPromise : (x: any) => IPromise<string>
>nIPromise : (x: any) => IPromise<number>
@@ -1129,9 +1129,9 @@ var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromis
>s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise) : Promise<IPromise<string>>
>s10.then(testFunctionP, nIPromise, sIPromise).then : { <TResult1 = IPromise<number>, TResult2 = never>(onfulfilled?: (value: IPromise<number>) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: IPromise<number>) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: IPromise<number>) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: IPromise<number>) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: IPromise<number>) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then(testFunctionP, nIPromise, sIPromise) : Promise<IPromise<number>>
>s10.then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<{}>
>then : { <TResult1 = {}, TResult2 = never>(onfulfilled?: (value: {}) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: {}) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10.then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>s10 : Promise<unknown>
>then : { <TResult1 = unknown, TResult2 = never>(onfulfilled?: (value: unknown) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => Promise<U>, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => Promise<U>, progress?: (progress: any) => void): Promise<U>; <U>(success?: (value: unknown) => U, error?: (error: any) => U, progress?: (progress: any) => void): Promise<U>; }
>testFunctionP : () => Promise<number>
>nIPromise : (x: any) => IPromise<number>
>sIPromise : (x: any) => IPromise<string>
@@ -1195,8 +1195,8 @@ var r12 = testFunction12(x => x);
>x : any
var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok
>r12a : IPromise<IPromise<{}>>
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<IPromise<{}>>
>r12a : IPromise<IPromise<unknown>>
>r12.then(testFunction12, testFunction12, testFunction12) : IPromise<IPromise<unknown>>
>r12.then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>r12 : IPromise<(x: any) => any>
>then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
@@ -1213,8 +1213,8 @@ var s12 = testFunction12(x => x);
>x : any
var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok
>s12a : IPromise<IPromise<{}>>
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<IPromise<{}>>
>s12a : IPromise<IPromise<unknown>>
>s12.then(testFunction12, testFunction12, testFunction12) : IPromise<IPromise<unknown>>
>s12.then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>s12 : IPromise<(x: any) => any>
>then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
@@ -1233,8 +1233,8 @@ var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok
>testFunction12P : { <T>(x: T): IPromise<T>; <T>(x: T, y: T): Promise<T>; }
var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok
>s12c : IPromise<IPromise<{}>>
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<IPromise<{}>>
>s12c : IPromise<IPromise<unknown>>
>s12.then(testFunction12P, testFunction12, testFunction12) : IPromise<IPromise<unknown>>
>s12.then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
>s12 : IPromise<(x: any) => any>
>then : <U>(success?: (value: (x: any) => any) => U, error?: (error: any) => U, progress?: (progress: any) => void) => IPromise<U>
@@ -68,7 +68,7 @@ var r3: string = a().toString();
>r3 : string
>a().toString() : string
>a().toString : () => string
>a() : {}
>a() : unknown
>a : <T>() => T
>toString : () => string
@@ -76,7 +76,7 @@ var r3b: string = a()['toString']();
>r3b : string
>a()['toString']() : string
>a()['toString'] : () => string
>a() : {}
>a() : unknown
>a : <T>() => T
>'toString' : "toString"
@@ -0,0 +1,225 @@
tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts(76,50): error TS2344: Type 'GetProps<C>' does not satisfy the constraint 'Shared<TInjectedProps, GetProps<C>>'.
Type 'unknown' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
Type 'Matching<TInjectedProps, GetProps<C>>' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[P] | (TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type '(TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]) | GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] | GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type '(TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]) | GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string] | GetProps<C>[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
Type 'TInjectedProps[keyof TInjectedProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
==== tests/cases/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.ts (1 errors) ====
declare class Component<P> {
constructor(props: Readonly<P>);
constructor(props: P, context?: any);
readonly props: Readonly<P> & Readonly<{ children?: {} }>;
}
interface ComponentClass<P = {}> {
new (props: P, context?: any): Component<P>;
propTypes?: WeakValidationMap<P>;
defaultProps?: Partial<P>;
displayName?: string;
}
interface FunctionComponent<P = {}> {
(props: P & { children?: {} }, context?: any): {} | null;
propTypes?: WeakValidationMap<P>;
defaultProps?: Partial<P>;
displayName?: string;
}
declare const nominalTypeHack: unique symbol;
interface Validator<T> {
(
props: object,
propName: string,
componentName: string,
location: string,
propFullName: string
): Error | null;
[nominalTypeHack]?: T;
}
type WeakValidationMap<T> = {
[K in keyof T]?: null extends T[K]
? Validator<T[K] | null | undefined>
: undefined extends T[K]
? Validator<T[K] | null | undefined>
: Validator<T[K]>
};
type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
type Shared<
InjectedProps,
DecorationTargetProps extends Shared<InjectedProps, DecorationTargetProps>
> = {
[P in Extract<
keyof InjectedProps,
keyof DecorationTargetProps
>]?: InjectedProps[P] extends DecorationTargetProps[P]
? DecorationTargetProps[P]
: never
};
// Infers prop type from component C
type GetProps<C> = C extends ComponentType<infer P> ? P : never;
type ConnectedComponentClass<C extends ComponentType<any>, P> = ComponentClass<
P
> & {
WrappedComponent: C;
};
type Matching<InjectedProps, DecorationTargetProps> = {
[P in keyof DecorationTargetProps]: P extends keyof InjectedProps
? InjectedProps[P] extends DecorationTargetProps[P]
? DecorationTargetProps[P]
: InjectedProps[P]
: DecorationTargetProps[P]
};
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type InferableComponentEnhancerWithProps<TInjectedProps, TNeedsProps> = <
C extends ComponentType<Matching<TInjectedProps, GetProps<C>>>
>(
component: C
) => ConnectedComponentClass<
C,
Omit<GetProps<C>, keyof Shared<TInjectedProps, GetProps<C>>> & TNeedsProps
~~~~~~~~~~~
!!! error TS2344: Type 'GetProps<C>' does not satisfy the constraint 'Shared<TInjectedProps, GetProps<C>>'.
!!! error TS2344: Type 'unknown' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
!!! error TS2344: Type 'Matching<TInjectedProps, GetProps<C>>' is not assignable to type 'Shared<TInjectedProps, GetProps<C>>'.
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[P] | (TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] | (TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type '(Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]) | (Extract<number, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<number, keyof GetProps<C>>] : GetProps<C>[Extract<number, keyof GetProps<C>>]) | (Extract<symbol, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<symbol, keyof GetProps<C>>] : GetProps<C>[Extract<symbol, keyof GetProps<C>>])' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]) | GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] | GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]) | GetProps<C>[keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] | GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]) | GetProps<C>[string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string] | GetProps<C>[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never) | undefined'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps<C>[keyof TInjectedProps & string] ? GetProps<C>[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps<C>[string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'keyof GetProps<C> & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] extends GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] ? GetProps<C>[keyof TInjectedProps & keyof GetProps<C> & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps<C> & string] : GetProps<C>[keyof GetProps<C> & string]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'Extract<string, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] extends GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] ? GetProps<C>[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : TInjectedProps[keyof TInjectedProps & Extract<string, keyof GetProps<C>>] : GetProps<C>[Extract<string, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'Extract<keyof TInjectedProps, keyof GetProps<C>> extends keyof TInjectedProps ? TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] extends GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] ? GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>] : TInjectedProps[Extract<keyof TInjectedProps, keyof GetProps<C>>] : GetProps<C>[Extract<keyof TInjectedProps, keyof GetProps<C>>]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
!!! error TS2344: Type 'P extends keyof TInjectedProps ? TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : TInjectedProps[P] : GetProps<C>[P]' is not assignable to type 'TInjectedProps[P] extends GetProps<C>[P] ? GetProps<C>[P] : never'.
>;
declare const connect: {
<no_state = {}, TDispatchProps = {}, TOwnProps = {}>(
mapStateToProps: null | undefined,
mapDispatchToProps: TDispatchProps
): InferableComponentEnhancerWithProps<
ResolveThunks<TDispatchProps>,
TOwnProps
>;
};
type InferThunkActionCreatorType<
TActionCreator extends (...args: any[]) => any
> = TActionCreator extends (
...args: infer TParams
) => (...args: any[]) => infer TReturn
? (...args: TParams) => TReturn
: TActionCreator;
type HandleThunkActionCreator<TActionCreator> = TActionCreator extends (
...args: any[]
) => any
? InferThunkActionCreatorType<TActionCreator>
: TActionCreator;
type ResolveThunks<TDispatchProps> = TDispatchProps extends {
[key: string]: any;
}
? { [C in keyof TDispatchProps]: HandleThunkActionCreator<TDispatchProps[C]> }
: TDispatchProps;
interface Dispatch<A extends Action = AnyAction> {
<T extends A>(action: T): T;
}
interface Action<T = any> {
type: T;
}
interface AnyAction extends Action {
[extraProps: string]: any;
}
const simpleAction = (payload: boolean) => ({
type: "SIMPLE_ACTION",
payload
});
const thunkAction = (param1: number, param2: string) => async (
dispatch: Dispatch,
{ foo }: OwnProps
) => {
return foo;
};
interface OwnProps {
foo: string;
}
interface TestComponentProps extends OwnProps {
simpleAction: typeof simpleAction;
thunkAction(param1: number, param2: string): Promise<string>;
}
class TestComponent extends Component<TestComponentProps> {}
const mapDispatchToProps = { simpleAction, thunkAction };
type Q = HandleThunkActionCreator<typeof simpleAction>;
const Test1 = connect(
null,
mapDispatchToProps
)(TestComponent);
@@ -1,7 +1,7 @@
tests/cases/compiler/recursiveBaseCheck3.ts(1,7): error TS2506: 'A' is referenced directly or indirectly in its own base expression.
tests/cases/compiler/recursiveBaseCheck3.ts(1,20): error TS2449: Class 'C' used before its declaration.
tests/cases/compiler/recursiveBaseCheck3.ts(2,7): error TS2506: 'C' is referenced directly or indirectly in its own base expression.
tests/cases/compiler/recursiveBaseCheck3.ts(4,9): error TS2339: Property 'blah' does not exist on type 'C<{}>'.
tests/cases/compiler/recursiveBaseCheck3.ts(4,9): error TS2339: Property 'blah' does not exist on type 'C<unknown>'.
==== tests/cases/compiler/recursiveBaseCheck3.ts (4 errors) ====
@@ -17,4 +17,4 @@ tests/cases/compiler/recursiveBaseCheck3.ts(4,9): error TS2339: Property 'blah'
(new C).blah;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'C<{}>'.
!!! error TS2339: Property 'blah' does not exist on type 'C<unknown>'.
@@ -9,8 +9,8 @@ class C<T> extends A<T> { }
(new C).blah;
>(new C).blah : any
>(new C) : C<{}>
>new C : C<{}>
>(new C) : C<unknown>
>new C : C<unknown>
>C : typeof C
>blah : any
@@ -1,5 +1,5 @@
tests/cases/compiler/recursiveBaseCheck4.ts(1,7): error TS2506: 'M' is referenced directly or indirectly in its own base expression.
tests/cases/compiler/recursiveBaseCheck4.ts(2,9): error TS2339: Property 'blah' does not exist on type 'M<{}>'.
tests/cases/compiler/recursiveBaseCheck4.ts(2,9): error TS2339: Property 'blah' does not exist on type 'M<unknown>'.
==== tests/cases/compiler/recursiveBaseCheck4.ts (2 errors) ====
@@ -8,4 +8,4 @@ tests/cases/compiler/recursiveBaseCheck4.ts(2,9): error TS2339: Property 'blah'
!!! error TS2506: 'M' is referenced directly or indirectly in its own base expression.
(new M).blah;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'M<{}>'.
!!! error TS2339: Property 'blah' does not exist on type 'M<unknown>'.
@@ -5,8 +5,8 @@ class M<T> extends M<string> { }
(new M).blah;
>(new M).blah : any
>(new M) : M<{}>
>new M : M<{}>
>(new M) : M<unknown>
>new M : M<unknown>
>M : typeof M
>blah : any
@@ -1,5 +1,5 @@
tests/cases/compiler/recursiveBaseCheck5.ts(1,11): error TS2310: Type 'I1<T>' recursively references itself as a base type.
tests/cases/compiler/recursiveBaseCheck5.ts(4,9): error TS2339: Property 'blah' does not exist on type 'X<{}, {}>'.
tests/cases/compiler/recursiveBaseCheck5.ts(4,9): error TS2339: Property 'blah' does not exist on type 'X<unknown, unknown>'.
==== tests/cases/compiler/recursiveBaseCheck5.ts (2 errors) ====
@@ -10,4 +10,4 @@ tests/cases/compiler/recursiveBaseCheck5.ts(4,9): error TS2339: Property 'blah'
class X<T, U> implements I2<T> { }
(new X).blah;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'X<{}, {}>'.
!!! error TS2339: Property 'blah' does not exist on type 'X<unknown, unknown>'.
@@ -6,8 +6,8 @@ class X<T, U> implements I2<T> { }
(new X).blah;
>(new X).blah : any
>(new X) : X<{}, {}>
>new X : X<{}, {}>
>(new X) : X<unknown, unknown>
>new X : X<unknown, unknown>
>X : typeof X
>blah : any
@@ -1,5 +1,5 @@
tests/cases/compiler/recursiveBaseCheck6.ts(1,7): error TS2506: 'S18' is referenced directly or indirectly in its own base expression.
tests/cases/compiler/recursiveBaseCheck6.ts(2,13): error TS2339: Property 'blah' does not exist on type 'S18<{}>'.
tests/cases/compiler/recursiveBaseCheck6.ts(2,13): error TS2339: Property 'blah' does not exist on type 'S18<unknown>'.
==== tests/cases/compiler/recursiveBaseCheck6.ts (2 errors) ====
@@ -8,4 +8,4 @@ tests/cases/compiler/recursiveBaseCheck6.ts(2,13): error TS2339: Property 'blah'
!!! error TS2506: 'S18' is referenced directly or indirectly in its own base expression.
(new S18()).blah;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'S18<{}>'.
!!! error TS2339: Property 'blah' does not exist on type 'S18<unknown>'.
@@ -6,8 +6,8 @@ class S18<A> extends S18<{ S19: A; }>{ }
(new S18()).blah;
>(new S18()).blah : any
>(new S18()) : S18<{}>
>new S18() : S18<{}>
>(new S18()) : S18<unknown>
>new S18() : S18<unknown>
>S18 : typeof S18
>blah : any
@@ -22,8 +22,8 @@ tests/cases/conformance/types/tuple/restTupleElements1.ts(34,31): error TS2344:
tests/cases/conformance/types/tuple/restTupleElements1.ts(35,31): error TS2344: Type '[number, number, number, string]' does not satisfy the constraint '[number, ...number[]]'.
Property '3' is incompatible with rest element type.
Type 'string' is not assignable to type 'number'.
tests/cases/conformance/types/tuple/restTupleElements1.ts(59,4): error TS2345: Argument of type '[]' is not assignable to parameter of type '[{}, ...{}[]]'.
Property '0' is missing in type '[]' but required in type '[{}, ...{}[]]'.
tests/cases/conformance/types/tuple/restTupleElements1.ts(59,4): error TS2345: Argument of type '[]' is not assignable to parameter of type '[unknown, ...unknown[]]'.
Property '0' is missing in type '[]' but required in type '[unknown, ...unknown[]]'.
==== tests/cases/conformance/types/tuple/restTupleElements1.ts (14 errors) ====
@@ -124,8 +124,8 @@ tests/cases/conformance/types/tuple/restTupleElements1.ts(59,4): error TS2345: A
f0([]); // Error
~~
!!! error TS2345: Argument of type '[]' is not assignable to parameter of type '[{}, ...{}[]]'.
!!! error TS2345: Property '0' is missing in type '[]' but required in type '[{}, ...{}[]]'.
!!! error TS2345: Argument of type '[]' is not assignable to parameter of type '[unknown, ...unknown[]]'.
!!! error TS2345: Property '0' is missing in type '[]' but required in type '[unknown, ...unknown[]]'.
f0([1]);
f0([1, 2, 3]);
f0([1, "hello", true]);
@@ -39,7 +39,7 @@ module M2 {
>compose : () => void
A.reduce(arguments, compose2);
>A.reduce(arguments, compose2) : {}[]
>A.reduce(arguments, compose2) : unknown[]
>A.reduce : <A>(ar: any, f: any, e?: any) => A[]
>A : typeof A
>reduce : <A>(ar: any, f: any, e?: any) => A[]
@@ -177,29 +177,29 @@ someGenerics6 `${ n => n }${ n => n}${ n => n}`;
>someGenerics6 `${ n => n }${ n => n}${ n => n}` : void
>someGenerics6 : <A>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void
>`${ n => n }${ n => n}${ n => n}` : string
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
>someGenerics6 `${ n => n }${ n => n}${ n => n}` : void
>someGenerics6 : <A>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void
>`${ n => n }${ n => n}${ n => n}` : string
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`;
>someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }` : void
@@ -230,29 +230,29 @@ someGenerics7 `${ n => n }${ n => n }${ n => n }`;
>someGenerics7 `${ n => n }${ n => n }${ n => n }` : void
>someGenerics7 : <A, B, C>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void
>`${ n => n }${ n => n }${ n => n }` : string
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
>someGenerics7 `${ n => n }${ n => n }${ n => n }` : void
>someGenerics7 : <A, B, C>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void
>`${ n => n }${ n => n }${ n => n }` : string
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`;
>someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}` : void
@@ -177,29 +177,29 @@ someGenerics6 `${ n => n }${ n => n}${ n => n}`;
>someGenerics6 `${ n => n }${ n => n}${ n => n}` : void
>someGenerics6 : <A>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void
>`${ n => n }${ n => n}${ n => n}` : string
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
someGenerics6 `${ n => n }${ n => n}${ n => n}`;
>someGenerics6 `${ n => n }${ n => n}${ n => n}` : void
>someGenerics6 : <A>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) => void
>`${ n => n }${ n => n}${ n => n}` : string
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }`;
>someGenerics6 `${ (n: number) => n }${ (n: number) => n }${ (n: number) => n }` : void
@@ -230,29 +230,29 @@ someGenerics7 `${ n => n }${ n => n }${ n => n }`;
>someGenerics7 `${ n => n }${ n => n }${ n => n }` : void
>someGenerics7 : <A, B, C>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void
>`${ n => n }${ n => n }${ n => n }` : string
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
someGenerics7 `${ n => n }${ n => n }${ n => n }`;
>someGenerics7 `${ n => n }${ n => n }${ n => n }` : void
>someGenerics7 : <A, B, C>(strs: TemplateStringsArray, a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void
>`${ n => n }${ n => n }${ n => n }` : string
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: {}) => {}
>n : {}
>n : {}
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
>n => n : (n: unknown) => unknown
>n : unknown
>n : unknown
someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}`;
>someGenerics7 `${(n: number) => n}${ (n: string) => n}${ (n: number) => n}` : void
@@ -1,12 +1,10 @@
tests/cases/conformance/jsx/file.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property.
tests/cases/conformance/jsx/file.tsx(23,2): error TS2322: Type '{ x: number; }' is not assignable to type '{}'.
Property 'x' does not exist on type '{}'.
tests/cases/conformance/jsx/file.tsx(25,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property.
tests/cases/conformance/jsx/file.tsx(26,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property.
tests/cases/conformance/jsx/file.tsx(33,7): error TS2322: Type 'string' is not assignable to type 'number'.
==== tests/cases/conformance/jsx/file.tsx (5 errors) ====
==== tests/cases/conformance/jsx/file.tsx (4 errors) ====
declare module JSX {
interface Element { }
interface ElementAttributesProperty { pr: any; }
@@ -32,9 +30,6 @@ tests/cases/conformance/jsx/file.tsx(33,7): error TS2322: Type 'string' is not a
<Obj3 x={10} />; // Error
~~~~~~~~~~~~~~~
!!! error TS2607: JSX element class does not support attributes because it does not have a 'pr' property.
~~~~
!!! error TS2322: Type '{ x: number; }' is not assignable to type '{}'.
!!! error TS2322: Property 'x' does not exist on type '{}'.
var attributes: any;
<Obj3 {...attributes} />; // Error
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1,6 +1,6 @@
tests/cases/conformance/jsx/file.tsx(8,43): error TS2322: Type '10' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(13,15): error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: {}; "ignore-prop": string; }'.
Type 'T' is not assignable to type '{ prop: {}; "ignore-prop": string; }'.
tests/cases/conformance/jsx/file.tsx(13,15): error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: unknown; "ignore-prop": string; }'.
Type 'T' is not assignable to type '{ prop: unknown; "ignore-prop": string; }'.
tests/cases/conformance/jsx/file.tsx(20,19): error TS2322: Type '(a: number, b: string) => void' is not assignable to type '(arg: number) => void'.
tests/cases/conformance/jsx/file.tsx(31,52): error TS2322: Type '(val: string) => void' is not assignable to type '(selectedVal: number) => void'.
Types of parameters 'val' and 'selectedVal' are incompatible.
@@ -25,8 +25,8 @@ tests/cases/conformance/jsx/file.tsx(31,52): error TS2322: Type '(val: string) =
function Baz<T>(arg: T) {
let a0 = <ComponentSpecific1 {...arg} />
~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: {}; "ignore-prop": string; }'.
!!! error TS2322: Type 'T' is not assignable to type '{ prop: {}; "ignore-prop": string; }'.
!!! error TS2322: Type 'T' is not assignable to type 'IntrinsicAttributes & { prop: unknown; "ignore-prop": string; }'.
!!! error TS2322: Type 'T' is not assignable to type '{ prop: unknown; "ignore-prop": string; }'.
}
declare function Link<U>(l: {func: (arg: U)=>void}): JSX.Element;
@@ -1,6 +1,6 @@
tests/cases/conformance/jsx/file.tsx(9,15): error TS2741: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: {}; a: number; }'.
tests/cases/conformance/jsx/file.tsx(10,15): error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: {}; a: {}; }'.
Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: {}; a: {}; }'.
tests/cases/conformance/jsx/file.tsx(9,15): error TS2741: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: unknown; a: number; }'.
tests/cases/conformance/jsx/file.tsx(10,15): error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: unknown; }'.
Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: unknown; a: unknown; }'.
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
@@ -14,11 +14,11 @@ tests/cases/conformance/jsx/file.tsx(10,15): error TS2322: Type 'T & { ignore-pr
function Baz<T extends {b: number}, U extends {a: boolean, b:string}>(arg1: T, arg2: U) {
let a0 = <OverloadComponent a={arg1.b}/>
~~~~~~~~~~~~~~~~~
!!! error TS2741: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: {}; a: number; }'.
!!! error TS2741: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: unknown; a: number; }'.
!!! related TS2728 tests/cases/conformance/jsx/file.tsx:5:49: 'b' is declared here.
let a2 = <OverloadComponent {...arg1} ignore-prop /> // missing a
~~~~~~~~~~~~~~~~~
!!! error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: {}; a: {}; }'.
!!! error TS2322: Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: {}; a: {}; }'.
!!! error TS2322: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: unknown; }'.
!!! error TS2322: Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: unknown; a: unknown; }'.
!!! related TS2728 tests/cases/conformance/jsx/file.tsx:5:55: 'a' is declared here.
}
@@ -1,46 +0,0 @@
tests/cases/conformance/jsx/tsxTypeErrors.tsx(25,11): error TS2322: Type '{ reqd: boolean; }' is not assignable to type '{}'.
Property 'reqd' does not exist on type '{}'.
tests/cases/conformance/jsx/tsxTypeErrors.tsx(31,11): error TS2322: Type '{ pt: { x: number; y: string; }; }' is not assignable to type '{}'.
Property 'pt' does not exist on type '{}'.
==== tests/cases/conformance/jsx/tsxTypeErrors.tsx (2 errors) ====
// A built-in element (OK)
var a1 = <div id="foo" />;
// A built-in element with a mistyped property (error)
var a2 = <img srce="foo.jpg" />
// A built-in element with a badly-typed attribute value (error)
var thing = { oops: 100 };
var a3 = <div id={thing} />
// Mistyped html name (error)
var e1 = <imag src="bar.jpg" />
// A custom type
class MyClass {
props: {
pt?: { x: number; y: number; };
name?: string;
reqd: boolean;
}
}
// Let's use it
// TODO: Error on missing 'reqd'
var b1 = <MyClass reqd={true} />;
~~~~~~~
!!! error TS2322: Type '{ reqd: boolean; }' is not assignable to type '{}'.
!!! error TS2322: Property 'reqd' does not exist on type '{}'.
// Mistyped attribute member
// sample.tsx(23,22): error TS2322: Type '{ x: number; y: string; }' is not assignable to type '{ x: number; y: number; }'.
// Types of property 'y' are incompatible.
// Type 'string' is not assignable to type 'number'.
var b2 = <MyClass pt={{x: 4, y: 'oops'}} />;
~~~~~~~
!!! error TS2322: Type '{ pt: { x: number; y: string; }; }' is not assignable to type '{}'.
!!! error TS2322: Property 'pt' does not exist on type '{}'.
+12 -12
View File
@@ -1,15 +1,15 @@
=== tests/cases/conformance/jsx/tsxTypeErrors.tsx ===
// A built-in element (OK)
var a1 = <div id="foo" />;
>a1 : any
><div id="foo" /> : any
>a1 : error
><div id="foo" /> : error
>div : any
>id : string
// A built-in element with a mistyped property (error)
var a2 = <img srce="foo.jpg" />
>a2 : any
><img srce="foo.jpg" /> : any
>a2 : error
><img srce="foo.jpg" /> : error
>img : any
>srce : string
@@ -21,16 +21,16 @@ var thing = { oops: 100 };
>100 : 100
var a3 = <div id={thing} />
>a3 : any
><div id={thing} /> : any
>a3 : error
><div id={thing} /> : error
>div : any
>id : { oops: number; }
>thing : { oops: number; }
// Mistyped html name (error)
var e1 = <imag src="bar.jpg" />
>e1 : any
><imag src="bar.jpg" /> : any
>e1 : error
><imag src="bar.jpg" /> : error
>imag : any
>src : string
@@ -57,8 +57,8 @@ class MyClass {
// Let's use it
// TODO: Error on missing 'reqd'
var b1 = <MyClass reqd={true} />;
>b1 : any
><MyClass reqd={true} /> : any
>b1 : error
><MyClass reqd={true} /> : error
>MyClass : typeof MyClass
>reqd : boolean
>true : true
@@ -68,8 +68,8 @@ var b1 = <MyClass reqd={true} />;
// Types of property 'y' are incompatible.
// Type 'string' is not assignable to type 'number'.
var b2 = <MyClass pt={{x: 4, y: 'oops'}} />;
>b2 : any
><MyClass pt={{x: 4, y: 'oops'}} /> : any
>b2 : error
><MyClass pt={{x: 4, y: 'oops'}} /> : error
>MyClass : typeof MyClass
>pt : { x: number; y: string; }
>{x: 4, y: 'oops'} : { x: number; y: string; }
@@ -34,7 +34,7 @@ declare function g<T, U>(f: B<T, U>): U;
>f : B<T, U>
g([[]] as [void[]]); // U: {}
>g([[]] as [void[]]) : {}
>g([[]] as [void[]]) : unknown
>g : <T, U>(f: B<T, U>) => U
>[[]] as [void[]] : [void[]]
>[[]] : [never[]]
@@ -48,7 +48,7 @@ declare function h<T, U>(f: C<T, U>): U;
>f : C<T, U>
h([[]] as [void[]]); // U: {}
>h([[]] as [void[]]) : {}
>h([[]] as [void[]]) : unknown
>h : <T, U>(f: C<T, U>) => U
>[[]] as [void[]] : [void[]]
>[[]] : [never[]]
Loaded 100 of 133 files, more files were not shown because too many files have changed in this diff. Show more