Skip to content

Commit

Permalink
move referencing model properties to alias (#5960)
Browse files Browse the repository at this point in the history
issue: #5431
  • Loading branch information
AlitzelMendez authored Feb 12, 2025
1 parent 925a5a6 commit f539659
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions website/src/content/docs/docs/language-basics/alias.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ You can define an alias using the `alias` keyword.
```typespec
alias Options = "one" | "two";
```

## Referencing model properties

You can reference model properties using the `.` operator for identifiers.

```tsp
alias PetName = Pet.name;
```
8 changes: 0 additions & 8 deletions website/src/content/docs/docs/language-basics/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ You can reference the operation template using `is`:
op readPet is ReadResource<Pet>;
```

## Referencing model properties

You can reference model properties using the `.` operator for identifiers.

```tsp
alias PetName = Pet.name;
```

## Meta type references

Certain operation meta types can be referenced using `::`
Expand Down

0 comments on commit f539659

Please sign in to comment.