Skip to content

Port TS PR 59803 (Remove redundant getStringLiteralType call) #1254

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

jakebailey
Copy link
Member

@Copilot Copilot AI review requested due to automatic review settings June 21, 2025 06:24
Copy link
Contributor

@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 ports changes from TypeScript PR 59803 to update type validation in the Checker module.

  • Modifies the check for TypeFlagsStringMapping by passing the source type directly instead of converting a value to a string literal type.
  • Adjusts template literal placeholder validation.
Comments suppressed due to low confidence (1)

internal/checker/relater.go:2445

  • Replacing c.getStringLiteralType(value) with source may lead to unintended type checking if source is not already a string literal type. Please verify that passing source directly to isMemberOfStringMapping maintains the intended logic.
			target.flags&TypeFlagsStringMapping != 0 && c.isMemberOfStringMapping(source, target) ||

@jakebailey jakebailey changed the title Port TS PR 59803 Port TS PR 59803 (Remove redundant getStringLiteralType call) Jun 23, 2025
@jakebailey jakebailey added this pull request to the merge queue Jun 24, 2025
Merged via the queue into main with commit e0b7a15 Jun 24, 2025
22 checks passed
@jakebailey jakebailey deleted the jabaile/port-59803 branch June 24, 2025 04:51
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