events maps a name to true, listener options, listen<E>(options?) for an explicit event type, or custom<T>(options?) for a CustomEvent<T> (the same as listen<CustomEvent<T>>()). Otherwise an event is typed from HTMLElementEventMap by name. The array form is gone. handleEvent gets HandledEvent<S>, each event tagged with its literal type so event.type narrows. |
||
|---|---|---|
| .. | ||
| example.test.ts | ||
| types.test-d.ts | ||
| web-component.test.ts | ||