Skip to content

Port "Fix getEffectiveCheckNode" #1083

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 1 commit into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Jun 6, 2025

Co-authored-by: Gabriela Araujo Britto <[email protected]>
@Copilot Copilot AI review requested due to automatic review settings June 6, 2025 08:42
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

Ports the fix for correctly identifying the effective node to check by centralizing outer‐expression skipping and adding support for satisfies expressions.

  • Updated baseline error-location offsets in test fixtures for satisfies syntax
  • Extended SkipOuterExpressions and assertion utilities to recognize satisfies
  • Refactored getEffectiveCheckNode to use the unified SkipOuterExpressions flags

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
testdata/baselines/.../typeSatisfaction_errorLocations1.errors.txt.diff Adjusted diff for updated error-location offsets
testdata/baselines/.../typeSatisfaction_errorLocations1.errors.txt Updated baseline error positions
internal/transformers/typeeraser.go Switched to new OEKAssertions mask in SkipOuterExpressions
internal/checker/checker.go Replaced manual parentheses/satisfies logic in getEffectiveCheckNode
internal/ast/utilities.go Introduced OEKSatisfies, bumped OEKExcludeJSDocTypeAssertion bit, and updated OEKAssertions and IsOuterExpression

Copy link
Member

@gabritto gabritto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correctly ported, but I'm wondering why the JSDoc error baseline diff remains for arrowExpressionBodyJSDoc.error.txt: https://github.com/microsoft/typescript-go/blob/main/testdata/baselines/reference/submoduleAccepted/compiler/arrowExpressionBodyJSDoc.errors.txt.diff

@sandersn any idea why this is the case? Is this difference expected to remain forever, or are we missing some JSDoc thing still?

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