Skip to content

@pumpkin-plugins/static-hermes-runtime API / wit/event-dispatch / generateWitEventDispatch

Function: generateWitEventDispatch() ​

generateWitEventDispatch(apiPackage, selections): string

Defined in: wit/event-dispatch.ts:35

Generate native event payload conversion without pruning nested JavaScript record fields.

Parameters ​

apiPackage ​

WitApiPackage

Resolved Pumpkin API package containing event variants and payload records.

selections ​

readonly WitEventFieldSelection[]

Event cases and payload fields selected during WIT analysis.

Returns ​

string

C++ event dispatch code, or an empty string when there are no selected events.

Throws ​

If a selected event or payload record is missing from the WIT package.

pumpkin-plugins documentation