Skip to content

Commit 7b97e0b

Browse files
committed
Switch to use blockquotes and not asides - closes #1610
1 parent 476c87b commit 7b97e0b

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

packages/documentation/copy/en/handbook-v2/Object Types.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,8 @@ function paintShape({ shape, xPos = 0, yPos = 0 }: PaintOptions) {
176176
Here we used [a destructuring pattern](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) for `paintShape`'s parameter, and provided [default values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Default_values) for `xPos` and `yPos`.
177177
Now `xPos` and `yPos` are both definitely present within the body of `paintShape`, but optional for any callers to `paintShape`.
178178

179-
<aside>
180-
Note that there is currently no way to place type annotations within destructuring patterns.
181-
This is because the following syntax already means something different in JavaScript.
182-
</aside>
179+
> Note that there is currently no way to place type annotations within destructuring patterns.
180+
> This is because the following syntax already means something different in JavaScript.
183181
184182
```ts twoslash
185183
// @noImplicitAny: false
@@ -726,14 +724,11 @@ function doSomething(stringHash: [string, number]) {
726724
}
727725
```
728726

729-
<aside>
730-
Tuple types are useful in heavily convention-based APIs, where each element's meaning is "obvious".
731-
This gives us flexibility in whatever we want to name our variables when we destructure them.
732-
In the above example, we were able to name elements `0` and `1` to whatever we wanted.
733-
734-
However, since not every user holds the same view of what's obvious, it may be worth reconsidering whether using objects with descriptive property names may be better for your API.
735-
736-
</aside>
727+
> Tuple types are useful in heavily convention-based APIs, where each element's meaning is "obvious".
728+
> This gives us flexibility in whatever we want to name our variables when we destructure them.
729+
> In the above example, we were able to name elements `0` and `1` to whatever we wanted.
730+
>
731+
> However, since not every user holds the same view of what's obvious, it may be worth reconsidering whether using objects with descriptive property names may be better for your API.
737732
738733
Other than those length checks, simple tuple types like these are equivalent to types which are versions of `Array`s that declare properties for specific indexes, and that declare `length` with a numeric literal type.
739734

0 commit comments

Comments
 (0)