| 43 | const mutationKey = createKey() |
| 44 | |
| 45 | class Consumer extends LitElement { |
| 46 | readonly mutationKey = mutationKey |
| 47 | |
| 48 | readonly mutation = createMutationController(this, { |
| 49 | mutationKey: this.mutationKey, |
| 50 | mutationFn: () => sleep(10).then(() => 'mutation-ok'), |
| 51 | }) |
| 52 | |
| 53 | readonly isMutating = useIsMutating(this, { |
| 54 | mutationKey: this.mutationKey, |
| 55 | }) |
| 56 | } |
| 57 | |
| 58 | customElements.define(generateElementName(), Consumer) |
| 59 | const consumer = new Consumer() |
nothing calls this directly
no test coverage detected