Fix declaration emit readonly tuple regression from as const satisfies#3199
Draft
Fix declaration emit readonly tuple regression from as const satisfies#3199
as const satisfies#3199Conversation
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/typescript-go/sessions/69ed8fd3-8200-40eb-9fea-76f2981bcf67
#3192) The pseudoTypeEquivalentToType check for PseudoTypeKindTuple didn't verify the readonly flag on the real tuple type. Since pseudoTypeToNode always emits tuples as readonly, non-readonly tuples (e.g. from `as const satisfies T` where T has a mutable array) were incorrectly emitted with readonly. Added a readonly check so non-readonly tuples fall back to the regular type serialization path which correctly handles the readonly flag. Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/typescript-go/sessions/69ed8fd3-8200-40eb-9fea-76f2981bcf67
Copilot
AI
changed the title
[WIP] Fix declaration emit issue in tsgo version 7.0.0-dev.20260321.1
Fix declaration emit readonly tuple regression from Mar 22, 2026
as const satisfies
jakebailey
reviewed
Mar 22, 2026
investigation-3192.md
Outdated
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/typescript-go/sessions/0ad4fe84-2fcc-4899-829b-a10744f8f15a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
readonlyis incorrectly added to tuple types after PR Port --isolatedDeclarations related node builder logic, with baseline updates #2459pseudoTypeEquivalentToTypedoesn't check the tuplereadonlyflag, andpseudoTypeToNodealways emits tuples as readonlypseudoTypeEquivalentToTypeinpseudotypenodebuilder.goOriginal prompt
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.