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

Decorators cannot augment alias properties #4749

Closed
l0lawrence opened this issue Oct 15, 2024 · 0 comments · Fixed by #4849
Closed

Decorators cannot augment alias properties #4749

l0lawrence opened this issue Oct 15, 2024 · 0 comments · Fixed by #4849
Assignees
Labels
compiler:core Issues for @typespec/compiler feature New feature or request triaged:core

Comments

@l0lawrence
Copy link
Member

l0lawrence commented Oct 15, 2024

alias Foo = {
  id: string
};

model Bar {
  ...Foo;
}


@@doc(Foo.id, "Doesn't work");
@@doc(Bar.id, "This either");

Playground

@timotheeguerin timotheeguerin changed the title @clientName not applying to spread alias property Decorators cannot augment alias properties Oct 15, 2024
@markcowl markcowl added design:needed A design request has been raised that needs a proposal compiler:core Issues for @typespec/compiler labels Oct 16, 2024
@markcowl markcowl added feature New feature or request and removed design:needed A design request has been raised that needs a proposal labels Oct 16, 2024
@markcowl markcowl added this to the Backlog milestone Oct 16, 2024
@timotheeguerin timotheeguerin self-assigned this Oct 29, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 5, 2024
### Augment decorator issues
Fix #4749 Augment/ref alias
properties
Fix #2867 Augment/ref `model
is` properties
Fix #4818 Augment/ref nested
model properties

### Circular reference issues
Fix #4908 freeze when using
circular model extends with aliases

### Others
FIx #4915 (Duplicate usings
not scoped per namespace)

Doesn't resolve the alias circular issue
#2824 but I think setup the
solution for fixing it later in the name resolver where we could detect
that cycle instead of the checker

---------

Co-authored-by: Brian Terlson <[email protected]>
swatkatz pushed a commit to swatkatz/typespec that referenced this issue Nov 5, 2024
### Augment decorator issues
Fix microsoft#4749 Augment/ref alias
properties
Fix microsoft#2867 Augment/ref `model
is` properties
Fix microsoft#4818 Augment/ref nested
model properties

### Circular reference issues
Fix microsoft#4908 freeze when using
circular model extends with aliases

### Others
FIx microsoft#4915 (Duplicate usings
not scoped per namespace)

Doesn't resolve the alias circular issue
microsoft#2824 but I think setup the
solution for fixing it later in the name resolver where we could detect
that cycle instead of the checker

---------

Co-authored-by: Brian Terlson <[email protected]>
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 feature New feature or request triaged:core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants