-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix formatting of object and array literal in decorator (#3577)
Currently formats to ``` @example( #{ id: "some", bar: "thing", date: utcDateTime.fromISO("2020-01-01T00:00:00Z"), unixDate: unixTimestamp32.fromISO("2020-01-01T00:00:00Z"), encodedAsRfc7231: utcDateTime.fromISO("2020-01-01T00:00:00Z"), dob: plainDate.fromISO("2020-01-01"), timeout: duration.fromISO("PT1M"), timeoutInSeconds: duration.fromISO("PT1M1.5S"), timeoutInSecondsFloat: duration.fromISO("PT0.5S"), } ) ``` woudl get formatted to ``` @example(#{ id: "some", bar: "thing", date: utcDateTime.fromISO("2020-01-01T00:00:00Z"), unixDate: unixTimestamp32.fromISO("2020-01-01T00:00:00Z"), encodedAsRfc7231: utcDateTime.fromISO("2020-01-01T00:00:00Z"), dob: plainDate.fromISO("2020-01-01"), timeout: duration.fromISO("PT1M"), timeoutInSeconds: duration.fromISO("PT1M1.5S"), timeoutInSecondsFloat: duration.fromISO("PT0.5S"), }) ```
- Loading branch information
1 parent
9c701cc
commit 6bbc247
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
.chronus/changes/fix-formatting-object-array-literal-hug-2024-5-13-20-4-7.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking | ||
changeKind: fix | ||
packages: | ||
- "@typespec/compiler" | ||
--- | ||
|
||
Fix formatting of object and array literal in decorator to hug parenthesis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters