Skip to content

fix(parser): Correctly handle ? postfixed element type in TupleType#10390

Merged
Boshen merged 1 commit intomainfrom
fix/optional-tuple-type
Apr 14, 2025
Merged

fix(parser): Correctly handle ? postfixed element type in TupleType#10390
Boshen merged 1 commit intomainfrom
fix/optional-tuple-type

Conversation

@leaysgur
Copy link
Member

For example:

declare let tx4: [(string | undefined)?]

The current logic relied on the span position to determine whether ? should mean JSDocNullableType or OptionalType.

Therefore, the parsing results seemed to change depending on whether the preserveParens option was enabled or not.

@graphite-app
Copy link
Contributor

graphite-app bot commented Apr 14, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-parser Area - Parser C-bug Category - Bug labels Apr 14, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 14, 2025

CodSpeed Instrumentation Performance Report

Merging #10390 will not alter performance

Comparing fix/optional-tuple-type (7e0b370) with main (41d8e9d)

Summary

✅ 36 untouched benchmarks

@Boshen Boshen merged commit 385d009 into main Apr 14, 2025
29 checks passed
@Boshen Boshen deleted the fix/optional-tuple-type branch April 14, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants