Skip to content

Add more descriptive message for @pattern decorator when applied to union type #7586

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

Conversation

AlitzelMendez
Copy link
Contributor

Copy link
Contributor

github-actions bot commented Jun 6, 2025

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

Improved the error message for the @pattern decorator when applied to a union type. The new message is more descriptive and helps users understand how to correctly define string-compatible union types.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jun 6, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@AlitzelMendez AlitzelMendez marked this pull request as ready for review June 9, 2025 16:24
Copy link

pkg-pr-new bot commented Jun 13, 2025

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/compiler@7586

commit: 9721103

@AlitzelMendez AlitzelMendez added this pull request to the merge queue Jun 17, 2025
Merged via the queue into microsoft:main with commit 4dda8d6 Jun 17, 2025
26 checks passed
@AlitzelMendez AlitzelMendez deleted the add-more-descriptive-message-for-union branch June 17, 2025 18:39
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.

ResourceNameParameter broken for non-string Types
4 participants