Skip to content

Add tests for contextual param type assignment in nested return type inference scenarios #62189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Aug 4, 2025

Those are newly functional since #61668

@Copilot Copilot AI review requested due to automatic review settings August 4, 2025 08:00
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Aug 4, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds test cases for contextual parameter type assignment in nested return type inference scenarios. The tests verify that TypeScript correctly infers parameter types when functions are used in nested contexts where the return type must align with expected interfaces.

  • Add four new test files demonstrating different variations of the type inference scenario
  • Tests focus on ensuring parameter a is correctly inferred as string type in nested function contexts
  • Baseline files confirm the expected type inference behavior is working correctly

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
contextualParamTypeVsNestedReturnTypeInference1.ts Basic test case with simple Effect interface and function parameter inference
contextualParamTypeVsNestedReturnTypeInference2.ts Extended test with complex conditional type inference for Effect parameters
contextualParamTypeVsNestedReturnTypeInference3.ts Simplified conditional types without explicit never checks
contextualParamTypeVsNestedReturnTypeInference4.ts Most basic test with direct type parameter passing to effectGen
Multiple baseline files Expected type and symbol outputs for the test cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

1 participant