Skip to content
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

Add an extra test for as const satisfies with a mutable array #55522

Conversation

Andarist
Copy link
Contributor

a small, test-only, followup to: #55229

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 26, 2023
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Aug 28, 2023

Love that you added this test. Can you add the other ordering of satisfies ... as const?

@Andarist
Copy link
Contributor Author

as const can only be applied on literals so the only thing that we'd get out of this test is that it errors properly with:

A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals.ts(1355)

@DanielRosenwasser
Copy link
Member

Hm - then I can go either way on it.

@DanielRosenwasser DanielRosenwasser merged commit 4b15830 into microsoft:main Aug 28, 2023
19 checks passed
@Andarist Andarist deleted the tests/as-const-satisfies-mutable-arrays branch August 28, 2023 07:03
snovader pushed a commit to mestro-se/TypeScript that referenced this pull request Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants