Skip to content

Commit

Permalink
[doc] document that asyncReplace and asyncAppend accept an option…
Browse files Browse the repository at this point in the history
…al mapper function (#1292)
  • Loading branch information
AndrewJakubowicz authored Jan 12, 2024
1 parent ffd4049 commit 493860b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions packages/lit-dev-content/site/docs/v2/templates/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,10 @@ import {asyncAppend} from 'lit/directives/async-append.js';
<td class="wide-cell">
```ts
asyncAppend(iterable: AsyncIterable)
asyncAppend(
iterable: AsyncIterable<I>,
mapper?: (item: I, index?: number) => unknown
)
```
</td>
Expand Down Expand Up @@ -1924,7 +1927,10 @@ import {asyncReplace} from 'lit/directives/async-replace.js';
<td class="wide-cell">
```ts
asyncReplace(iterable: AsyncIterable)
asyncReplace(
iterable: AsyncIterable<I>,
mapper?: (item: I, index?: number) => unknown
)
```
</td>
Expand All @@ -1933,7 +1939,7 @@ asyncReplace(iterable: AsyncIterable)
<td class="no-wrap-cell vcenter-cell">Usable location</td>
<td class="wide-cell">
Child expression
Any expression
</td>
</tr>
Expand Down
12 changes: 9 additions & 3 deletions packages/lit-dev-content/site/docs/v3/templates/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,10 @@ import {asyncAppend} from 'lit/directives/async-append.js';
<td class="wide-cell">
```ts
asyncAppend(iterable: AsyncIterable)
asyncAppend(
iterable: AsyncIterable<I>,
mapper?: (item: I, index?: number) => unknown
)
```
</td>
Expand Down Expand Up @@ -1924,7 +1927,10 @@ import {asyncReplace} from 'lit/directives/async-replace.js';
<td class="wide-cell">
```ts
asyncReplace(iterable: AsyncIterable)
asyncReplace(
iterable: AsyncIterable<I>,
mapper?: (item: I, index?: number) => unknown
)
```
</td>
Expand All @@ -1933,7 +1939,7 @@ asyncReplace(iterable: AsyncIterable)
<td class="no-wrap-cell vcenter-cell">Usable location</td>
<td class="wide-cell">
Child expression
Any expression
</td>
</tr>
Expand Down

0 comments on commit 493860b

Please sign in to comment.