Skip to content

@graphty/graphty-element / index / GraphtyForwardedEventMap

Type Alias: GraphtyForwardedEventMap ​

GraphtyForwardedEventMap = { [K in Exclude<GraphEventType | AiEventType, InternalEventType>]: CustomEvent<EventOfType<K>> }

Defined in: graphty-element/src/events.ts:107

The unprefixed events <graphty-element> forwards to the DOM, by name: every graph and AI event except the element-internal ones, each a CustomEvent whose detail is the internal event.

They are typed by the element's own addEventListener and removeEventListener rather than on the global HTMLElementEventMap: the names carry no prefix, so a global declaration would type style-changed on every element of the page, and error is already ErrorEvent there.