Skip to content
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

Fix: Correct constructor type inference in checker.ts (#29707). #61121

Closed

Conversation

aman1-2
Copy link

@aman1-2 aman1-2 commented Feb 5, 2025

Fixes #29707

This PR fixes an issue where the constructor type was incorrectly inferred in checker.ts. The fix ensures that the correct type is assigned, preventing potential type errors in class instantiation.
Adjusted type-checking logic in checker.ts to correctly infer the constructor type.

Changes Made

  • Updated logic in checker.ts to handle constructor type inference correctly.
  • Added/updated unit tests to validate the fix.

Verification Steps

  • Ran hereby runtests locally to confirm all tests pass.
  • Code is up-to-date with the main branch.

Please do Guide if my approach was wrong or if further refinements are needed!

@aman1-2
Copy link
Author

aman1-2 commented Feb 5, 2025

@microsoft-github-policy-service agree

@aman1-2 aman1-2 closed this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

TS is overly picky when declaring a class constructor type
1 participant