Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/compiler",
"comment": "Fix `@format` decorator doc.",
"type": "none"
}
],
"packageName": "@typespec/compiler"
}
3 changes: 2 additions & 1 deletion docs/standard-library/built-in-decorators.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ message: string;
### `@format` {#@format}

Specify a known data format hint for this string type. For example `uuid`, `uri`, etc.
This differ from the
This differ from the `@pattern` decorator that is meant to specify a regular expression while `@format` takes in a known format name.
Comment thread
timotheeguerin marked this conversation as resolved.
Outdated
The format names are open ended and are left to emitter to interpret.

```typespec
dec format(target: string | bytes | ModelProperty, format: string)
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler/lib/decorators.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ extern dec error(target: Model);

/**
* Specify a known data format hint for this string type. For example `uuid`, `uri`, etc.
* This differ from the @pattern decorator that is meant to specify a regular expression while @format takes in a known format name.
* This differ from the `@pattern` decorator that is meant to specify a regular expression while `@format` takes in a known format name.
Comment thread
timotheeguerin marked this conversation as resolved.
Outdated
* The format names are open ended and are left to emitter to interpret.
*
* @param format format name.
Expand Down