Skip to content

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
@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Feb 6, 2025
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS is overly picky when declaring a class constructor type

2 participants