Skip to content

Commit

Permalink
[reactive-element] Add types to query, query-async, and queryAll jsdo…
Browse files Browse the repository at this point in the history
…c code examples (#2688)

* Add types to query, query-async, and queryAll code examples

* Add changeset
  • Loading branch information
AndrewJakubowicz committed Apr 8, 2022
1 parent 6022c98 commit ef178ef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/rude-jokes-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@lit/reactive-element': patch
'lit': patch
---

Add explicit types to the jsdoc code samples for `query`, `queryAll`, and `queryAsync`.
2 changes: 1 addition & 1 deletion packages/reactive-element/src/decorators/query-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {decorateProperty} from './base.js';
* ```ts
* class MyElement {
* @queryAll('div')
* divs;
* divs: NodeListOf<HTMLDivElement>;
*
* render() {
* return html`
Expand Down
2 changes: 1 addition & 1 deletion packages/reactive-element/src/decorators/query-async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {decorateProperty} from './base.js';
* ```ts
* class MyElement {
* @queryAsync('#first')
* first;
* first: Promise<HTMLDivElement>;
*
* render() {
* return html`
Expand Down
2 changes: 1 addition & 1 deletion packages/reactive-element/src/decorators/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {decorateProperty} from './base.js';
* ```ts
* class MyElement {
* @query('#first')
* first;
* first: HTMLDivElement;
*
* render() {
* return html`
Expand Down

0 comments on commit ef178ef

Please sign in to comment.