Skip to content

Commit

Permalink
Update docs: non-optional properties can have defaults
Browse files Browse the repository at this point in the history
Since #1815, any property can have a default value. This commit updates the documentation to reflect that.
  • Loading branch information
steverice committed Nov 21, 2024
1 parent f892353 commit 36bbe84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/src/content/docs/docs/language-basics/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ model Dog {

#### Default values

[Optional properties](#optional-properties) can be assigned a default value using the `=` operator.
Properties can be assigned a default value using the `=` operator.

```typespec
model Dog {
address?: string = "wild";
age: number = 0;
}
```

Expand Down

0 comments on commit 36bbe84

Please sign in to comment.