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 authored Nov 20, 2024
1 parent 1cf8601 commit 2666357
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 2666357

Please sign in to comment.