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

[core] Decorators are not added onto the anonymous type via metadata syntax #6169

Open
ArcturusZhang opened this issue Feb 27, 2025 · 0 comments
Labels
compiler:core Issues for @typespec/compiler

Comments

@ArcturusZhang
Copy link
Member

If we have this:

model Foo {
  p: {
    a: string;
  };

we have the following syntax to add decorators to the anonymous model:

@@clientName(Foo.p::type, "NewName");

but in its type graph, the anonymous type never gets that decorator. And therefore it does not work at all.
Playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:core Issues for @typespec/compiler
Projects
None yet
Development

No branches or pull requests

1 participant