How to Use This Tool
Turn event rows into TypeScript declarations, dispatch examples and a review table. Generate a Web Component custom-event contract from event, detail and propagation rows, flag duplicates, and export deterministic TypeScript locally.
The work this page finishes
Component events are often documented in prose while their detail type and propagation flags drift independently across implementation and consumers. For Event Contract Generator, a visible row-by-row result preserves provenance, making a single correction possible without rerunning unrelated records or uploading the batch.
Deterministic workflow
Validate event and custom-element identifiers, preserve each declared detail type and emit matching event-map plus dispatch scaffolds with explicit propagation flags. For Event Contract Generator, input guards stop after 5,000 records or 2 MB, and the report separates fatal input problems from recoverable row warnings.
Why a dedicated interface helps
Review the generated detail object and event semantics with component consumers before treating the declarations as a compatibility contract. For Event Contract Generator, deterministic ordering, one-click copying and a downloadable artifact make repeated operational review easier than manually reconstructing a response from prose.
Assumptions
- Detail types are trusted TypeScript fragments.
- Event rows represent public component behavior.
- Consumers still test runtime payloads.
For Event Contract Generator, do not discard the source after export: compare the destination result with it, and remember that local execution cannot secure the surrounding device or browser add-ons.
Limitations and review boundary
It does not parse source code, validate TypeScript syntax inside detail types, infer event names, register an element or execute generated dispatch calls. For Event Contract Generator, user values are never run as script, rendered as markup or fetched as network destinations; the page writes them only into text nodes.
Verification and provenance
On 2026-08-26, the rule and examples were cross-checked with WHATWG DOM — Events, including a known result, a rejected input and a conflict or duplicate case. Two declared cart events produce two typed map entries and two dispatch examples with their own bubbles, composed and cancelable flags.
Sources & assumptions
Tool Spec v2 · verified 2026-08-26. Platform rules and fees can change; the editable inputs remain authoritative for your account.
Official references
- WHATWG DOM — Events (checked 2026-08-26)
Model assumptions
- Detail types are trusted TypeScript fragments.
- Event rows represent public component behavior.
- Consumers still test runtime payloads.
- It does not parse source code, validate TypeScript syntax inside detail types, infer event names, register an element or execute generated dispatch calls.
