Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve TypeScript error messages for long type assignments #61776

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 2 commits into
base: main
Choose a base branch
Loading
from

Conversation

shaischaudhry
Copy link

Problem:
TypeScript error messages for long type assignments become unreadable when types are complex, making debugging difficult.

Solution:

  • Format long type assignment errors (>30 chars) with newlines for better readability
  • Remove quotes from type strings in error messages
  • Maintain backward compatibility for shorter type names
  • Only applies to "Type X is not assignable to type Y" errors

Example:
Before: Type 'VeryLongComplexType...' is not assignable to type 'AnotherLongType...'
After:

…sifier - Add missing case for ClassificationType.regularExpressionLiteral in convertClassification function - Add missing case for ClassificationType.regularExpressionLiteral in getClassificationTypeName function - Maps regularExpressionLiteral to stringLiteral classification to match existing behavior - Fixes compilation errors and makes switch statements exhaustive
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog May 28, 2025
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label May 28, 2025
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.