Skip to content

Conversation

@MorphCodeBot
Copy link
Collaborator

Fixed issue where TypeScript generic types using the extends keyword broke syntax highlighting from version 10.3.0 onwards.

Changes

  • Added new GENERIC_TYPE_PARAMETER mode to handle generic type parameters
  • Integrated extends keyword support within generic type declarations
  • Maintained proper highlighting for generic type constraints

Technical Details

  • Created dedicated mode for generic type parameters
  • Enhanced TypeScript grammar to properly handle extends clauses
  • Integrated with existing TypeScript language definition
  • Preserved compatibility with other TypeScript features

Example Fixed Code:

interface Prefixer<Something extends string> {
  (): `other__${Something}`;
}

Testing

  • Verified fix with provided test cases
  • Confirmed proper highlighting of extends keyword
  • Tested compatibility with existing TypeScript syntax

Related Issues

  • Fixes issue reported in Stack Overflow meta
  • Resolves highlighting breaks in VSCode markdown preview

Additional ticket processing details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants