| 143 | const mutationKey = createKey() |
| 144 | |
| 145 | class Consumer extends LitElement { |
| 146 | readonly mutationKey = mutationKey |
| 147 | |
| 148 | readonly mutation = createMutationController(this, { |
| 149 | mutationKey: this.mutationKey, |
| 150 | mutationFn: () => sleep(10).then(() => 'mutation-ok'), |
| 151 | }) |
| 152 | |
| 153 | readonly mutationStatuses = useMutationState<string>(this, { |
| 154 | filters: { mutationKey: this.mutationKey }, |
| 155 | select: (mutation) => mutation.state.status, |
| 156 | }) |
| 157 | } |
| 158 | |
| 159 | customElements.define(generateElementName(), Consumer) |
| 160 | const consumer = new Consumer() |
nothing calls this directly
no test coverage detected