diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts
index 75959107c3f2c..7071cafd8e72a 100644
--- a/src/compiler/checker.ts
+++ b/src/compiler/checker.ts
@@ -1756,7 +1756,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
const node = getParseTreeNode(nodeIn, isJsxAttributeLike);
return node && getContextualTypeForJsxAttribute(node, /*contextFlags*/ undefined);
},
- isContextSensitive,
+ containsContextSensitive,
getTypeOfPropertyOfContextualType,
getFullyQualifiedName,
getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, CheckMode.Normal),
@@ -6136,7 +6136,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
function symbolValueDeclarationIsContextSensitive(symbol: Symbol): boolean {
- return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);
+ return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !containsContextSensitive(symbol.valueDeclaration);
}
function toNodeBuilderFlags(flags = TypeFormatFlags.None): NodeBuilderFlags {
@@ -12875,7 +12875,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
case SyntaxKind.MappedType:
case SyntaxKind.ConditionalType: {
const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
- if ((kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction || isObjectLiteralMethod(node)) && isContextSensitive(node as Expression | MethodDeclaration)) {
+ if ((kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction || isObjectLiteralMethod(node)) && containsContextSensitive(node as Expression | MethodDeclaration)) {
const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfDeclaration(node as FunctionLikeDeclaration)), SignatureKind.Call));
if (signature && signature.typeParameters) {
return [...(outerTypeParameters || emptyArray), ...signature.typeParameters];
@@ -20969,47 +20969,56 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration, info.components);
}
- // Returns true if the given expression contains (at any level of nesting) a function or arrow expression
- // that is subject to contextual typing.
- function isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElementLike | JsxAttributeLike | JsxChild): boolean {
+ function containsContextRelatedNode(node: Expression | MethodDeclaration | ObjectLiteralElementLike | JsxAttributeLike | JsxChild, predicate: (node: Node) => boolean): boolean {
Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node));
switch (node.kind) {
case SyntaxKind.FunctionExpression:
case SyntaxKind.ArrowFunction:
case SyntaxKind.MethodDeclaration:
- case SyntaxKind.FunctionDeclaration: // Function declarations can have context when annotated with a jsdoc @type
- return isContextSensitiveFunctionLikeDeclaration(node as FunctionExpression | ArrowFunction | MethodDeclaration);
+ case SyntaxKind.FunctionDeclaration:
+ case SyntaxKind.CallExpression:
+ case SyntaxKind.NewExpression:
+ return predicate(node);
case SyntaxKind.ObjectLiteralExpression:
- return some((node as ObjectLiteralExpression).properties, isContextSensitive);
+ return some((node as ObjectLiteralExpression).properties, p => containsContextRelatedNode(p, predicate));
case SyntaxKind.ArrayLiteralExpression:
- return some((node as ArrayLiteralExpression).elements, isContextSensitive);
+ return some((node as ArrayLiteralExpression).elements, e => containsContextRelatedNode(e, predicate));
case SyntaxKind.ConditionalExpression:
- return isContextSensitive((node as ConditionalExpression).whenTrue) ||
- isContextSensitive((node as ConditionalExpression).whenFalse);
+ return containsContextRelatedNode((node as ConditionalExpression).whenTrue, predicate) ||
+ containsContextRelatedNode((node as ConditionalExpression).whenFalse, predicate);
case SyntaxKind.BinaryExpression:
return ((node as BinaryExpression).operatorToken.kind === SyntaxKind.BarBarToken || (node as BinaryExpression).operatorToken.kind === SyntaxKind.QuestionQuestionToken) &&
- (isContextSensitive((node as BinaryExpression).left) || isContextSensitive((node as BinaryExpression).right));
+ (containsContextRelatedNode((node as BinaryExpression).left, predicate) || containsContextRelatedNode((node as BinaryExpression).right, predicate));
case SyntaxKind.PropertyAssignment:
- return isContextSensitive((node as PropertyAssignment).initializer);
+ return containsContextRelatedNode((node as PropertyAssignment).initializer, predicate);
case SyntaxKind.ParenthesizedExpression:
- return isContextSensitive((node as ParenthesizedExpression).expression);
+ return containsContextRelatedNode((node as ParenthesizedExpression).expression, predicate);
case SyntaxKind.JsxAttributes:
- return some((node as JsxAttributes).properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive);
+ return some((node as JsxAttributes).properties, p => containsContextRelatedNode(p, predicate)) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, c => containsContextRelatedNode(c, predicate));
case SyntaxKind.JsxAttribute: {
- // If there is no initializer, JSX attribute has a boolean value of true which is not context sensitive.
const { initializer } = node as JsxAttribute;
- return !!initializer && isContextSensitive(initializer);
+ return !!initializer && containsContextRelatedNode(initializer, predicate);
}
case SyntaxKind.JsxExpression: {
// It is possible to that node.expression is undefined (e.g
)
const { expression } = node as JsxExpression;
- return !!expression && isContextSensitive(expression);
+ return !!expression && containsContextRelatedNode(expression, predicate);
}
}
return false;
}
+ // Returns true if the given expression contains (at any level of nesting) a function or arrow expression
+ // that is subject to contextual typing.
+ function containsContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElementLike | JsxAttributeLike | JsxChild): boolean {
+ return containsContextRelatedNode(node, isContextSensitiveFunctionOrObjectLiteralMethod);
+ }
+
+ function containsContextSensitiveOrCallOrNewExpression(node: Expression | MethodDeclaration | ObjectLiteralElementLike | JsxAttributeLike | JsxChild): boolean {
+ return containsContextRelatedNode(node, n => isContextSensitiveFunctionOrObjectLiteralMethod(n) || isCallOrNewExpression(n));
+ }
+
function isContextSensitiveFunctionLikeDeclaration(node: FunctionLikeDeclaration): boolean {
return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node);
}
@@ -21019,9 +21028,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return false;
}
if (node.body.kind !== SyntaxKind.Block) {
- return isContextSensitive(node.body);
+ return containsContextSensitive(node.body);
}
- return !!forEachReturnStatement(node.body as Block, statement => !!statement.expression && isContextSensitive(statement.expression));
+ return !!forEachReturnStatement(node.body as Block, statement => !!statement.expression && containsContextSensitive(statement.expression));
}
function isContextSensitiveFunctionOrObjectLiteralMethod(func: Node): func is FunctionExpression | ArrowFunction | MethodDeclaration {
@@ -33091,7 +33100,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
const type = checkExpressionForMutableLocation(e, checkMode, forceTuple);
elementTypes.push(addOptionality(type, /*isProperty*/ true, hasOmittedExpression));
elementFlags.push(hasOmittedExpression ? ElementFlags.Optional : ElementFlags.Required);
- if (inTupleContext && checkMode && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) && isContextSensitive(e)) {
+ if (inTupleContext && checkMode && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) && containsContextSensitiveOrCallOrNewExpression(e)) {
const inferenceContext = getInferenceContext(node);
Debug.assert(inferenceContext); // In CheckMode.Inferential we should always have an inference context
addIntraExpressionInferenceSite(inferenceContext, e, type);
@@ -33332,7 +33341,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (
contextualType && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) &&
- (memberDecl.kind === SyntaxKind.PropertyAssignment || memberDecl.kind === SyntaxKind.MethodDeclaration) && isContextSensitive(memberDecl)
+ (memberDecl.kind === SyntaxKind.PropertyAssignment || memberDecl.kind === SyntaxKind.MethodDeclaration) && containsContextSensitiveOrCallOrNewExpression(memberDecl)
) {
const inferenceContext = getInferenceContext(node);
Debug.assert(inferenceContext); // In CheckMode.Inferential we should always have an inference context
@@ -33571,7 +33580,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText as string);
}
}
- if (contextualType && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) && isContextSensitive(attributeDecl)) {
+ if (contextualType && checkMode & CheckMode.Inferential && !(checkMode & CheckMode.SkipContextSensitive) && containsContextSensitiveOrCallOrNewExpression(attributeDecl)) {
const inferenceContext = getInferenceContext(attributes);
Debug.assert(inferenceContext); // In CheckMode.Inferential we should always have an inference context
const inferenceNode = (attributeDecl.initializer as JsxExpression).expression!;
@@ -36329,7 +36338,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// For a decorator, no arguments are susceptible to contextual typing due to the fact
// decorators are applied to a declaration by the emitter, and not to an expression.
const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
- if (!isDecorator && !isSingleNonGenericCandidate && some(args, isContextSensitive)) {
+ if (!isDecorator && !isSingleNonGenericCandidate && some(args, containsContextSensitive)) {
argCheckMode = CheckMode.SkipContextSensitive;
}
@@ -39318,7 +39327,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
// The identityMapper object is used to indicate that function expressions are wildcards
- if (checkMode && checkMode & CheckMode.SkipContextSensitive && isContextSensitive(node)) {
+ if (checkMode && checkMode & CheckMode.SkipContextSensitive && containsContextSensitive(node)) {
// Skip parameters, return signature with return type that retains noncontextual parts so inferences can still be drawn in an early stage
if (!getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) {
// Return plain anyFunctionType if there is no possibility we'll make inferences from the return type
@@ -39363,7 +39372,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (!signature) {
return;
}
- if (isContextSensitive(node)) {
+ if (containsContextSensitive(node)) {
if (contextualSignature) {
const inferenceContext = getInferenceContext(node);
let instantiatedContextualSignature: Signature | undefined;
diff --git a/src/compiler/types.ts b/src/compiler/types.ts
index 232605341b592..1d94dbb223377 100644
--- a/src/compiler/types.ts
+++ b/src/compiler/types.ts
@@ -5216,7 +5216,7 @@ export interface TypeChecker {
/** @internal */ getContextualTypeForObjectLiteralElement(element: ObjectLiteralElementLike): Type | undefined;
/** @internal */ getContextualTypeForArgumentAtIndex(call: CallLikeExpression, argIndex: number): Type | undefined;
/** @internal */ getContextualTypeForJsxAttribute(attribute: JsxAttribute | JsxSpreadAttribute): Type | undefined;
- /** @internal */ isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElementLike | JsxAttributeLike): boolean;
+ /** @internal */ containsContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElementLike | JsxAttributeLike): boolean;
/** @internal */ getTypeOfPropertyOfContextualType(type: Type, name: __String): Type | undefined;
/**
diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts
index 2d59e42c433d6..b4fa0cecaf29f 100644
--- a/src/services/refactors/extractSymbol.ts
+++ b/src/services/refactors/extractSymbol.ts
@@ -1379,7 +1379,7 @@ function extractConstantInScope(
const localNameText = getIdentifierForNode(node, scope, checker, file);
const isJS = isInJSFile(scope);
- let variableType = isJS || !checker.isContextSensitive(node)
+ let variableType = isJS || !checker.containsContextSensitive(node)
? undefined
: checker.typeToTypeNode(checker.getContextualType(node)!, scope, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames); // TODO: GH#18217
diff --git a/tests/baselines/reference/intraExpressionInferences.errors.txt b/tests/baselines/reference/intraExpressionInferences.errors.txt
index 82da18c788e9b..5e29182af2f2a 100644
--- a/tests/baselines/reference/intraExpressionInferences.errors.txt
+++ b/tests/baselines/reference/intraExpressionInferences.errors.txt
@@ -344,4 +344,27 @@ intraExpressionInferences.ts(133,26): error TS2339: Property 'nonexistent' does
},
consumer: (val) => {},
});
+
+ type ErrorFn = (error: unknown) => void;
+
+ declare const genericFn: (args: {
+ parser: (p: unknown, errorFn: ErrorFn) => T;
+ handler: (data: { body: T }) => unknown;
+ }) => T;
+
+ declare const createParser: (arg: T) => (p: unknown, errorFn: ErrorFn) => T;
+
+ genericFn({
+ parser: createParser(1 as const),
+ handler: ({ body: _ }) => {},
+ });
+
+ declare const genericFnTuple: (
+ args: [
+ parser: (p: unknown, errorFn: ErrorFn) => T,
+ handler: (data: { body: T }) => unknown
+ ]
+ ) => T;
+
+ genericFnTuple([createParser(1 as const), ({ body: _ }) => {}]);
\ No newline at end of file
diff --git a/tests/baselines/reference/intraExpressionInferences.js b/tests/baselines/reference/intraExpressionInferences.js
index fbdd0e64bd30e..ee7f8bbaeb1f8 100644
--- a/tests/baselines/reference/intraExpressionInferences.js
+++ b/tests/baselines/reference/intraExpressionInferences.js
@@ -331,6 +331,29 @@ const distantRes = distant({
},
consumer: (val) => {},
});
+
+type ErrorFn = (error: unknown) => void;
+
+declare const genericFn: (args: {
+ parser: (p: unknown, errorFn: ErrorFn) => T;
+ handler: (data: { body: T }) => unknown;
+}) => T;
+
+declare const createParser: (arg: T) => (p: unknown, errorFn: ErrorFn) => T;
+
+genericFn({
+ parser: createParser(1 as const),
+ handler: ({ body: _ }) => {},
+});
+
+declare const genericFnTuple: (
+ args: [
+ parser: (p: unknown, errorFn: ErrorFn) => T,
+ handler: (data: { body: T }) => unknown
+ ]
+) => T;
+
+genericFnTuple([createParser(1 as const), ({ body: _ }) => {}]);
//// [intraExpressionInferences.js]
@@ -518,6 +541,15 @@ var distantRes = distant({
},
consumer: function (val) { },
});
+genericFn({
+ parser: createParser(1),
+ handler: function (_b) {
+ var _ = _b.body;
+ },
+});
+genericFnTuple([createParser(1), function (_b) {
+ var _ = _b.body;
+ }]);
//// [intraExpressionInferences.d.ts]
@@ -648,3 +680,17 @@ declare function distant(args: {
consumer: (val: T) => unknown;
}): T;
declare const distantRes: number;
+type ErrorFn = (error: unknown) => void;
+declare const genericFn: (args: {
+ parser: (p: unknown, errorFn: ErrorFn) => T;
+ handler: (data: {
+ body: T;
+ }) => unknown;
+}) => T;
+declare const createParser: (arg: T) => (p: unknown, errorFn: ErrorFn) => T;
+declare const genericFnTuple: (args: [
+ parser: (p: unknown, errorFn: ErrorFn) => T,
+ handler: (data: {
+ body: T;
+ }) => unknown
+]) => T;
diff --git a/tests/baselines/reference/intraExpressionInferences.symbols b/tests/baselines/reference/intraExpressionInferences.symbols
index f0a01515373d5..a9721855e0609 100644
--- a/tests/baselines/reference/intraExpressionInferences.symbols
+++ b/tests/baselines/reference/intraExpressionInferences.symbols
@@ -1076,3 +1076,82 @@ const distantRes = distant({
});
+type ErrorFn = (error: unknown) => void;
+>ErrorFn : Symbol(ErrorFn, Decl(intraExpressionInferences.ts, 329, 3))
+>error : Symbol(error, Decl(intraExpressionInferences.ts, 331, 16))
+
+declare const genericFn: (args: {
+>genericFn : Symbol(genericFn, Decl(intraExpressionInferences.ts, 333, 13))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 333, 26))
+>args : Symbol(args, Decl(intraExpressionInferences.ts, 333, 29))
+
+ parser: (p: unknown, errorFn: ErrorFn) => T;
+>parser : Symbol(parser, Decl(intraExpressionInferences.ts, 333, 36))
+>p : Symbol(p, Decl(intraExpressionInferences.ts, 334, 11))
+>errorFn : Symbol(errorFn, Decl(intraExpressionInferences.ts, 334, 22))
+>ErrorFn : Symbol(ErrorFn, Decl(intraExpressionInferences.ts, 329, 3))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 333, 26))
+
+ handler: (data: { body: T }) => unknown;
+>handler : Symbol(handler, Decl(intraExpressionInferences.ts, 334, 46))
+>data : Symbol(data, Decl(intraExpressionInferences.ts, 335, 12))
+>body : Symbol(body, Decl(intraExpressionInferences.ts, 335, 19))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 333, 26))
+
+}) => T;
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 333, 26))
+
+declare const createParser: (arg: T) => (p: unknown, errorFn: ErrorFn) => T;
+>createParser : Symbol(createParser, Decl(intraExpressionInferences.ts, 338, 13))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 338, 29))
+>arg : Symbol(arg, Decl(intraExpressionInferences.ts, 338, 32))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 338, 29))
+>p : Symbol(p, Decl(intraExpressionInferences.ts, 338, 44))
+>errorFn : Symbol(errorFn, Decl(intraExpressionInferences.ts, 338, 55))
+>ErrorFn : Symbol(ErrorFn, Decl(intraExpressionInferences.ts, 329, 3))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 338, 29))
+
+genericFn({
+>genericFn : Symbol(genericFn, Decl(intraExpressionInferences.ts, 333, 13))
+
+ parser: createParser(1 as const),
+>parser : Symbol(parser, Decl(intraExpressionInferences.ts, 340, 11))
+>createParser : Symbol(createParser, Decl(intraExpressionInferences.ts, 338, 13))
+>const : Symbol(const)
+
+ handler: ({ body: _ }) => {},
+>handler : Symbol(handler, Decl(intraExpressionInferences.ts, 341, 35))
+>body : Symbol(body, Decl(intraExpressionInferences.ts, 335, 19))
+>_ : Symbol(_, Decl(intraExpressionInferences.ts, 342, 13))
+
+});
+
+declare const genericFnTuple: (
+>genericFnTuple : Symbol(genericFnTuple, Decl(intraExpressionInferences.ts, 345, 13))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 345, 31))
+
+ args: [
+>args : Symbol(args, Decl(intraExpressionInferences.ts, 345, 34))
+
+ parser: (p: unknown, errorFn: ErrorFn) => T,
+>p : Symbol(p, Decl(intraExpressionInferences.ts, 347, 13))
+>errorFn : Symbol(errorFn, Decl(intraExpressionInferences.ts, 347, 24))
+>ErrorFn : Symbol(ErrorFn, Decl(intraExpressionInferences.ts, 329, 3))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 345, 31))
+
+ handler: (data: { body: T }) => unknown
+>data : Symbol(data, Decl(intraExpressionInferences.ts, 348, 14))
+>body : Symbol(body, Decl(intraExpressionInferences.ts, 348, 21))
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 345, 31))
+
+ ]
+) => T;
+>T : Symbol(T, Decl(intraExpressionInferences.ts, 345, 31))
+
+genericFnTuple([createParser(1 as const), ({ body: _ }) => {}]);
+>genericFnTuple : Symbol(genericFnTuple, Decl(intraExpressionInferences.ts, 345, 13))
+>createParser : Symbol(createParser, Decl(intraExpressionInferences.ts, 338, 13))
+>const : Symbol(const)
+>body : Symbol(body, Decl(intraExpressionInferences.ts, 348, 21))
+>_ : Symbol(_, Decl(intraExpressionInferences.ts, 352, 44))
+
diff --git a/tests/baselines/reference/intraExpressionInferences.types b/tests/baselines/reference/intraExpressionInferences.types
index 37c49da2a03a3..570fdbf20d4f3 100644
--- a/tests/baselines/reference/intraExpressionInferences.types
+++ b/tests/baselines/reference/intraExpressionInferences.types
@@ -1743,3 +1743,120 @@ const distantRes = distant({
});
+type ErrorFn = (error: unknown) => void;
+>ErrorFn : ErrorFn
+> : ^^^^^^^
+>error : unknown
+> : ^^^^^^^
+
+declare const genericFn: (args: {
+>genericFn : (args: { parser: (p: unknown, errorFn: ErrorFn) => T; handler: (data: { body: T; }) => unknown; }) => T
+> : ^ ^^ ^^ ^^^^^
+>args : { parser: (p: unknown, errorFn: ErrorFn) => T; handler: (data: { body: T; }) => unknown; }
+> : ^^^^^^^^^^ ^^^^^^^^^^^ ^^^
+
+ parser: (p: unknown, errorFn: ErrorFn) => T;
+>parser : (p: unknown, errorFn: ErrorFn) => T
+> : ^ ^^ ^^ ^^ ^^^^^
+>p : unknown
+> : ^^^^^^^
+>errorFn : ErrorFn
+> : ^^^^^^^
+
+ handler: (data: { body: T }) => unknown;
+>handler : (data: { body: T; }) => unknown
+> : ^ ^^ ^^^^^
+>data : { body: T; }
+> : ^^^^^^^^ ^^^
+>body : T
+> : ^
+
+}) => T;
+
+declare const createParser: (arg: T) => (p: unknown, errorFn: ErrorFn) => T;
+>createParser : (arg: T) => (p: unknown, errorFn: ErrorFn) => T
+> : ^ ^^ ^^ ^^^^^
+>arg : T
+> : ^
+>p : unknown
+> : ^^^^^^^
+>errorFn : ErrorFn
+> : ^^^^^^^
+
+genericFn({
+>genericFn({ parser: createParser(1 as const), handler: ({ body: _ }) => {},}) : 1
+> : ^
+>genericFn : (args: { parser: (p: unknown, errorFn: ErrorFn) => T; handler: (data: { body: T; }) => unknown; }) => T
+> : ^ ^^ ^^ ^^^^^
+>{ parser: createParser(1 as const), handler: ({ body: _ }) => {},} : { parser: (p: unknown, errorFn: ErrorFn) => 1; handler: ({ body: _ }: { body: 1; }) => void; }
+> : ^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ parser: createParser(1 as const),
+>parser : (p: unknown, errorFn: ErrorFn) => 1
+> : ^ ^^ ^^ ^^ ^^^^^^
+>createParser(1 as const) : (p: unknown, errorFn: ErrorFn) => 1
+> : ^ ^^ ^^ ^^ ^^^^^^
+>createParser : (arg: T) => (p: unknown, errorFn: ErrorFn) => T
+> : ^ ^^ ^^ ^^^^^
+>1 as const : 1
+> : ^
+>1 : 1
+> : ^
+
+ handler: ({ body: _ }) => {},
+>handler : ({ body: _ }: { body: 1; }) => void
+> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
+>({ body: _ }) => {} : ({ body: _ }: { body: 1; }) => void
+> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
+>body : any
+> : ^^^
+>_ : 1
+> : ^
+
+});
+
+declare const genericFnTuple: (
+>genericFnTuple : (args: [parser: (p: unknown, errorFn: ErrorFn) => T, handler: (data: { body: T; }) => unknown]) => T
+> : ^ ^^ ^^ ^^^^^
+
+ args: [
+>args : [parser: (p: unknown, errorFn: ErrorFn) => T, handler: (data: { body: T; }) => unknown]
+> : ^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^ ^
+
+ parser: (p: unknown, errorFn: ErrorFn) => T,
+>p : unknown
+> : ^^^^^^^
+>errorFn : ErrorFn
+> : ^^^^^^^
+
+ handler: (data: { body: T }) => unknown
+>data : { body: T; }
+> : ^^^^^^^^ ^^^
+>body : T
+> : ^
+
+ ]
+) => T;
+
+genericFnTuple([createParser(1 as const), ({ body: _ }) => {}]);
+>genericFnTuple([createParser(1 as const), ({ body: _ }) => {}]) : 1
+> : ^
+>genericFnTuple : (args: [parser: (p: unknown, errorFn: ErrorFn) => T, handler: (data: { body: T; }) => unknown]) => T
+> : ^ ^^ ^^ ^^^^^
+>[createParser(1 as const), ({ body: _ }) => {}] : [(p: unknown, errorFn: ErrorFn) => 1, ({ body: _ }: { body: 1; }) => void]
+> : ^^ ^^ ^^ ^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
+>createParser(1 as const) : (p: unknown, errorFn: ErrorFn) => 1
+> : ^ ^^ ^^ ^^ ^^^^^^
+>createParser : (arg: T) => (p: unknown, errorFn: ErrorFn) => T
+> : ^ ^^ ^^ ^^^^^
+>1 as const : 1
+> : ^
+>1 : 1
+> : ^
+>({ body: _ }) => {} : ({ body: _ }: { body: 1; }) => void
+> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
+>body : any
+> : ^^^
+>_ : 1
+> : ^
+
diff --git a/tests/baselines/reference/intraExpressionInferencesJsx.symbols b/tests/baselines/reference/intraExpressionInferencesJsx.symbols
index ca7efab1b40bd..7c310035b1c83 100644
--- a/tests/baselines/reference/intraExpressionInferencesJsx.symbols
+++ b/tests/baselines/reference/intraExpressionInferencesJsx.symbols
@@ -274,3 +274,48 @@ function Foo(props: Props) {
}} />;
+type ErrorFn = (error: unknown) => void;
+>ErrorFn : Symbol(ErrorFn, Decl(intraExpressionInferencesJsx.tsx, 107, 6))
+>error : Symbol(error, Decl(intraExpressionInferencesJsx.tsx, 109, 16))
+
+function GenericComp(props: {
+>GenericComp : Symbol(GenericComp, Decl(intraExpressionInferencesJsx.tsx, 109, 40))
+>T : Symbol(T, Decl(intraExpressionInferencesJsx.tsx, 111, 21))
+>props : Symbol(props, Decl(intraExpressionInferencesJsx.tsx, 111, 24))
+
+ parser: (p: unknown, errorFn: ErrorFn) => T;
+>parser : Symbol(parser, Decl(intraExpressionInferencesJsx.tsx, 111, 32))
+>p : Symbol(p, Decl(intraExpressionInferencesJsx.tsx, 112, 11))
+>errorFn : Symbol(errorFn, Decl(intraExpressionInferencesJsx.tsx, 112, 22))
+>ErrorFn : Symbol(ErrorFn, Decl(intraExpressionInferencesJsx.tsx, 107, 6))
+>T : Symbol(T, Decl(intraExpressionInferencesJsx.tsx, 111, 21))
+
+ handler: (data: { body: T }) => unknown;
+>handler : Symbol(handler, Decl(intraExpressionInferencesJsx.tsx, 112, 46))
+>data : Symbol(data, Decl(intraExpressionInferencesJsx.tsx, 113, 12))
+>body : Symbol(body, Decl(intraExpressionInferencesJsx.tsx, 113, 19))
+>T : Symbol(T, Decl(intraExpressionInferencesJsx.tsx, 111, 21))
+
+}) {
+ return null;
+}
+
+declare const createParser: (arg: T) => (p: unknown, errorFn: ErrorFn) => T;
+>createParser : Symbol(createParser, Decl(intraExpressionInferencesJsx.tsx, 118, 13))
+>T : Symbol(T, Decl(intraExpressionInferencesJsx.tsx, 118, 29))
+>arg : Symbol(arg, Decl(intraExpressionInferencesJsx.tsx, 118, 32))
+>T : Symbol(T, Decl(intraExpressionInferencesJsx.tsx, 118, 29))
+>p : Symbol(p, Decl(intraExpressionInferencesJsx.tsx, 118, 44))
+>errorFn : Symbol(errorFn, Decl(intraExpressionInferencesJsx.tsx, 118, 55))
+>ErrorFn : Symbol(ErrorFn, Decl(intraExpressionInferencesJsx.tsx, 107, 6))
+>T : Symbol(T, Decl(intraExpressionInferencesJsx.tsx, 118, 29))
+
+ {}} />;
+>GenericComp : Symbol(GenericComp, Decl(intraExpressionInferencesJsx.tsx, 109, 40))
+>parser : Symbol(parser, Decl(intraExpressionInferencesJsx.tsx, 120, 12))
+>createParser : Symbol(createParser, Decl(intraExpressionInferencesJsx.tsx, 118, 13))
+>const : Symbol(const)
+>handler : Symbol(handler, Decl(intraExpressionInferencesJsx.tsx, 120, 46))
+>body : Symbol(body, Decl(intraExpressionInferencesJsx.tsx, 113, 19))
+>_ : Symbol(_, Decl(intraExpressionInferencesJsx.tsx, 120, 58))
+
diff --git a/tests/baselines/reference/intraExpressionInferencesJsx.types b/tests/baselines/reference/intraExpressionInferencesJsx.types
index 194a4452b0040..2b5451ce13c23 100644
--- a/tests/baselines/reference/intraExpressionInferencesJsx.types
+++ b/tests/baselines/reference/intraExpressionInferencesJsx.types
@@ -432,3 +432,69 @@ function Foo(props: Props) {
}} />;
+type ErrorFn = (error: unknown) => void;
+>ErrorFn : ErrorFn
+> : ^^^^^^^
+>error : unknown
+> : ^^^^^^^
+
+function GenericComp(props: {
+>GenericComp : (props: { parser: (p: unknown, errorFn: ErrorFn) => T; handler: (data: { body: T; }) => unknown; }) => null
+> : ^ ^^ ^^ ^^^^^^^^^
+>props : { parser: (p: unknown, errorFn: ErrorFn) => T; handler: (data: { body: T; }) => unknown; }
+> : ^^^^^^^^^^ ^^^^^^^^^^^ ^^^
+
+ parser: (p: unknown, errorFn: ErrorFn) => T;
+>parser : (p: unknown, errorFn: ErrorFn) => T
+> : ^ ^^ ^^ ^^ ^^^^^
+>p : unknown
+> : ^^^^^^^
+>errorFn : ErrorFn
+> : ^^^^^^^
+
+ handler: (data: { body: T }) => unknown;
+>handler : (data: { body: T; }) => unknown
+> : ^ ^^ ^^^^^
+>data : { body: T; }
+> : ^^^^^^^^ ^^^
+>body : T
+> : ^
+
+}) {
+ return null;
+}
+
+declare const createParser: (arg: T) => (p: unknown, errorFn: ErrorFn) => T;
+>createParser : (arg: T) => (p: unknown, errorFn: ErrorFn) => T
+> : ^ ^^ ^^ ^^^^^
+>arg : T
+> : ^
+>p : unknown
+> : ^^^^^^^
+>errorFn : ErrorFn
+> : ^^^^^^^
+
+ {}} />;
+> {}} /> : JSX.Element
+> : ^^^^^^^^^^^
+>GenericComp : (props: { parser: (p: unknown, errorFn: ErrorFn) => T; handler: (data: { body: T; }) => unknown; }) => null
+> : ^ ^^ ^^ ^^^^^^^^^
+>parser : (p: unknown, errorFn: ErrorFn) => 1
+> : ^ ^^ ^^ ^^ ^^^^^^
+>createParser(1 as const) : (p: unknown, errorFn: ErrorFn) => 1
+> : ^ ^^ ^^ ^^ ^^^^^^
+>createParser : (arg: T) => (p: unknown, errorFn: ErrorFn) => T
+> : ^ ^^ ^^ ^^^^^
+>1 as const : 1
+> : ^
+>1 : 1
+> : ^
+>handler : ({ body: _ }: { body: 1; }) => void
+> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
+>({ body: _ }) => {} : ({ body: _ }: { body: 1; }) => void
+> : ^ ^^^^^^^^^^^^^^^^^^^^^^^
+>body : any
+> : ^^^
+>_ : 1
+> : ^
+
diff --git a/tests/baselines/reference/intraExpressionInferencesNestedGenericCall1.symbols b/tests/baselines/reference/intraExpressionInferencesNestedGenericCall1.symbols
new file mode 100644
index 0000000000000..1e26325176225
--- /dev/null
+++ b/tests/baselines/reference/intraExpressionInferencesNestedGenericCall1.symbols
@@ -0,0 +1,294 @@
+//// [tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferencesNestedGenericCall1.ts] ////
+
+=== intraExpressionInferencesNestedGenericCall1.ts ===
+interface FastifyTypeProvider {
+>FastifyTypeProvider : Symbol(FastifyTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 0))
+
+ readonly input: unknown;
+>input : Symbol(FastifyTypeProvider.input, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 31))
+
+ readonly output: unknown;
+>output : Symbol(FastifyTypeProvider.output, Decl(intraExpressionInferencesNestedGenericCall1.ts, 1, 26))
+}
+
+export interface FastifyTypeProviderDefault extends FastifyTypeProvider {}
+>FastifyTypeProviderDefault : Symbol(FastifyTypeProviderDefault, Decl(intraExpressionInferencesNestedGenericCall1.ts, 3, 1))
+>FastifyTypeProvider : Symbol(FastifyTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 0))
+
+type CallTypeProvider = (F & {
+>CallTypeProvider : Symbol(CallTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 5, 74))
+>F : Symbol(F, Decl(intraExpressionInferencesNestedGenericCall1.ts, 7, 22))
+>FastifyTypeProvider : Symbol(FastifyTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 0))
+>I : Symbol(I, Decl(intraExpressionInferencesNestedGenericCall1.ts, 7, 52))
+>F : Symbol(F, Decl(intraExpressionInferencesNestedGenericCall1.ts, 7, 22))
+
+ input: I;
+>input : Symbol(input, Decl(intraExpressionInferencesNestedGenericCall1.ts, 7, 64))
+>I : Symbol(I, Decl(intraExpressionInferencesNestedGenericCall1.ts, 7, 52))
+
+})["output"];
+type UndefinedToUnknown = [T] extends [undefined] ? unknown : T;
+>UndefinedToUnknown : Symbol(UndefinedToUnknown, Decl(intraExpressionInferencesNestedGenericCall1.ts, 9, 13))
+>T : Symbol(T, Decl(intraExpressionInferencesNestedGenericCall1.ts, 10, 24))
+>T : Symbol(T, Decl(intraExpressionInferencesNestedGenericCall1.ts, 10, 24))
+>T : Symbol(T, Decl(intraExpressionInferencesNestedGenericCall1.ts, 10, 24))
+
+interface RouteGenericInterface {
+>RouteGenericInterface : Symbol(RouteGenericInterface, Decl(intraExpressionInferencesNestedGenericCall1.ts, 10, 67))
+
+ Querystring?: unknown;
+>Querystring : Symbol(RouteGenericInterface.Querystring, Decl(intraExpressionInferencesNestedGenericCall1.ts, 12, 33))
+}
+
+interface FastifySchema {
+>FastifySchema : Symbol(FastifySchema, Decl(intraExpressionInferencesNestedGenericCall1.ts, 14, 1))
+
+ querystring?: unknown;
+>querystring : Symbol(FastifySchema.querystring, Decl(intraExpressionInferencesNestedGenericCall1.ts, 16, 25))
+
+ headers?: unknown;
+>headers : Symbol(FastifySchema.headers, Decl(intraExpressionInferencesNestedGenericCall1.ts, 17, 24))
+}
+
+interface FastifyRequestType {
+>FastifyRequestType : Symbol(FastifyRequestType, Decl(intraExpressionInferencesNestedGenericCall1.ts, 19, 1))
+>Querystring : Symbol(Querystring, Decl(intraExpressionInferencesNestedGenericCall1.ts, 21, 29))
+
+ query: Querystring;
+>query : Symbol(FastifyRequestType.query, Decl(intraExpressionInferencesNestedGenericCall1.ts, 21, 53))
+>Querystring : Symbol(Querystring, Decl(intraExpressionInferencesNestedGenericCall1.ts, 21, 29))
+}
+
+type ResolveRequestQuerystring<
+>ResolveRequestQuerystring : Symbol(ResolveRequestQuerystring, Decl(intraExpressionInferencesNestedGenericCall1.ts, 23, 1))
+
+ TypeProvider extends FastifyTypeProvider,
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 25, 31))
+>FastifyTypeProvider : Symbol(FastifyTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 0))
+
+ SchemaCompiler extends FastifySchema,
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 26, 43))
+>FastifySchema : Symbol(FastifySchema, Decl(intraExpressionInferencesNestedGenericCall1.ts, 14, 1))
+
+> = UndefinedToUnknown<
+>UndefinedToUnknown : Symbol(UndefinedToUnknown, Decl(intraExpressionInferencesNestedGenericCall1.ts, 9, 13))
+
+ CallTypeProvider
+>CallTypeProvider : Symbol(CallTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 5, 74))
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 25, 31))
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 26, 43))
+
+>;
+
+interface ResolveFastifyRequestType<
+>ResolveFastifyRequestType : Symbol(ResolveFastifyRequestType, Decl(intraExpressionInferencesNestedGenericCall1.ts, 30, 2))
+
+ TypeProvider extends FastifyTypeProvider,
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 32, 36))
+>FastifyTypeProvider : Symbol(FastifyTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 0))
+
+ SchemaCompiler extends FastifySchema,
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 33, 43))
+>FastifySchema : Symbol(FastifySchema, Decl(intraExpressionInferencesNestedGenericCall1.ts, 14, 1))
+
+> {
+ query: ResolveRequestQuerystring;
+>query : Symbol(ResolveFastifyRequestType.query, Decl(intraExpressionInferencesNestedGenericCall1.ts, 35, 3))
+>ResolveRequestQuerystring : Symbol(ResolveRequestQuerystring, Decl(intraExpressionInferencesNestedGenericCall1.ts, 23, 1))
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 32, 36))
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 33, 43))
+}
+
+interface FastifyRequest<
+>FastifyRequest : Symbol(FastifyRequest, Decl(intraExpressionInferencesNestedGenericCall1.ts, 37, 1))
+
+ RouteGeneric extends RouteGenericInterface = RouteGenericInterface,
+>RouteGeneric : Symbol(RouteGeneric, Decl(intraExpressionInferencesNestedGenericCall1.ts, 39, 25))
+>RouteGenericInterface : Symbol(RouteGenericInterface, Decl(intraExpressionInferencesNestedGenericCall1.ts, 10, 67))
+>RouteGenericInterface : Symbol(RouteGenericInterface, Decl(intraExpressionInferencesNestedGenericCall1.ts, 10, 67))
+
+ SchemaCompiler extends FastifySchema = FastifySchema,
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 40, 69))
+>FastifySchema : Symbol(FastifySchema, Decl(intraExpressionInferencesNestedGenericCall1.ts, 14, 1))
+>FastifySchema : Symbol(FastifySchema, Decl(intraExpressionInferencesNestedGenericCall1.ts, 14, 1))
+
+ TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault,
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 41, 55))
+>FastifyTypeProvider : Symbol(FastifyTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 0))
+>FastifyTypeProviderDefault : Symbol(FastifyTypeProviderDefault, Decl(intraExpressionInferencesNestedGenericCall1.ts, 3, 1))
+
+ RequestType extends FastifyRequestType = ResolveFastifyRequestType<
+>RequestType : Symbol(RequestType, Decl(intraExpressionInferencesNestedGenericCall1.ts, 42, 72))
+>FastifyRequestType : Symbol(FastifyRequestType, Decl(intraExpressionInferencesNestedGenericCall1.ts, 19, 1))
+>ResolveFastifyRequestType : Symbol(ResolveFastifyRequestType, Decl(intraExpressionInferencesNestedGenericCall1.ts, 30, 2))
+
+ TypeProvider,
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 41, 55))
+
+ SchemaCompiler
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 40, 69))
+
+ >,
+> {
+ query: RequestType["query"];
+>query : Symbol(FastifyRequest.query, Decl(intraExpressionInferencesNestedGenericCall1.ts, 47, 3))
+>RequestType : Symbol(RequestType, Decl(intraExpressionInferencesNestedGenericCall1.ts, 42, 72))
+}
+
+interface RouteOptions<
+>RouteOptions : Symbol(RouteOptions, Decl(intraExpressionInferencesNestedGenericCall1.ts, 49, 1))
+
+ RouteGeneric extends RouteGenericInterface,
+>RouteGeneric : Symbol(RouteGeneric, Decl(intraExpressionInferencesNestedGenericCall1.ts, 51, 23))
+>RouteGenericInterface : Symbol(RouteGenericInterface, Decl(intraExpressionInferencesNestedGenericCall1.ts, 10, 67))
+
+ SchemaCompiler extends FastifySchema,
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 52, 45))
+>FastifySchema : Symbol(FastifySchema, Decl(intraExpressionInferencesNestedGenericCall1.ts, 14, 1))
+
+ TypeProvider extends FastifyTypeProvider,
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 53, 39))
+>FastifyTypeProvider : Symbol(FastifyTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 0))
+
+> {
+ schema?: SchemaCompiler;
+>schema : Symbol(RouteOptions.schema, Decl(intraExpressionInferencesNestedGenericCall1.ts, 55, 3))
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 52, 45))
+
+ onRequest?: (
+>onRequest : Symbol(RouteOptions.onRequest, Decl(intraExpressionInferencesNestedGenericCall1.ts, 56, 26))
+
+ request: FastifyRequest,
+>request : Symbol(request, Decl(intraExpressionInferencesNestedGenericCall1.ts, 57, 15))
+>FastifyRequest : Symbol(FastifyRequest, Decl(intraExpressionInferencesNestedGenericCall1.ts, 37, 1))
+>RouteGeneric : Symbol(RouteGeneric, Decl(intraExpressionInferencesNestedGenericCall1.ts, 51, 23))
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 52, 45))
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 53, 39))
+
+ ) => void;
+ method: "GET" | "POST";
+>method : Symbol(RouteOptions.method, Decl(intraExpressionInferencesNestedGenericCall1.ts, 59, 12))
+
+ url: string;
+>url : Symbol(RouteOptions.url, Decl(intraExpressionInferencesNestedGenericCall1.ts, 60, 25))
+
+ handler: (
+>handler : Symbol(RouteOptions.handler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 61, 14))
+
+ request: FastifyRequest,
+>request : Symbol(request, Decl(intraExpressionInferencesNestedGenericCall1.ts, 62, 12))
+>FastifyRequest : Symbol(FastifyRequest, Decl(intraExpressionInferencesNestedGenericCall1.ts, 37, 1))
+>RouteGeneric : Symbol(RouteGeneric, Decl(intraExpressionInferencesNestedGenericCall1.ts, 51, 23))
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 52, 45))
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 53, 39))
+
+ ) => void;
+}
+
+interface FastifyInstance {
+>FastifyInstance : Symbol(FastifyInstance, Decl(intraExpressionInferencesNestedGenericCall1.ts, 65, 1))
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 67, 26))
+>FastifyTypeProvider : Symbol(FastifyTypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 0, 0))
+
+ route<
+>route : Symbol(FastifyInstance.route, Decl(intraExpressionInferencesNestedGenericCall1.ts, 67, 69))
+
+ RouteGeneric extends RouteGenericInterface,
+>RouteGeneric : Symbol(RouteGeneric, Decl(intraExpressionInferencesNestedGenericCall1.ts, 68, 8))
+>RouteGenericInterface : Symbol(RouteGenericInterface, Decl(intraExpressionInferencesNestedGenericCall1.ts, 10, 67))
+
+ SchemaCompiler extends FastifySchema,
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 69, 47))
+>FastifySchema : Symbol(FastifySchema, Decl(intraExpressionInferencesNestedGenericCall1.ts, 14, 1))
+
+ >(
+ opts: RouteOptions,
+>opts : Symbol(opts, Decl(intraExpressionInferencesNestedGenericCall1.ts, 71, 4))
+>RouteOptions : Symbol(RouteOptions, Decl(intraExpressionInferencesNestedGenericCall1.ts, 49, 1))
+>RouteGeneric : Symbol(RouteGeneric, Decl(intraExpressionInferencesNestedGenericCall1.ts, 68, 8))
+>SchemaCompiler : Symbol(SchemaCompiler, Decl(intraExpressionInferencesNestedGenericCall1.ts, 69, 47))
+>TypeProvider : Symbol(TypeProvider, Decl(intraExpressionInferencesNestedGenericCall1.ts, 67, 26))
+
+ ): void;
+}
+
+type Type