| 172 | const key2 = createKey() |
| 173 | |
| 174 | class Host extends LitElement { |
| 175 | readonly queries = createQueriesController( |
| 176 | this, |
| 177 | { |
| 178 | queries: [ |
| 179 | { |
| 180 | queryKey: key1, |
| 181 | queryFn: () => sleep(10).then(() => 'alpha'), |
| 182 | }, |
| 183 | { |
| 184 | queryKey: key2, |
| 185 | queryFn: () => sleep(10).then(() => 'beta'), |
| 186 | }, |
| 187 | ], |
| 188 | combine: (results) => results.map((result) => result.data), |
| 189 | }, |
| 190 | queryClient, |
| 191 | ) |
| 192 | |
| 193 | override render() { |
| 194 | const data = this.queries().map((result) => result ?? 'none') |
| 195 | return html`data: ${data.join(', ')}` |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | customElements.define(generateElementName(), Host) |
| 200 | const host = new Host() |
nothing calls this directly
no test coverage detected