Skip to content

fix: add metro to EventTypes interface#80

Open
kimjune01 wants to merge 2 commits into
elemaudio:mainfrom
kimjune01:fix/metro-event-type
Open

fix: add metro to EventTypes interface#80
kimjune01 wants to merge 2 commits into
elemaudio:mainfrom
kimjune01:fix/metro-event-type

Conversation

@kimjune01

@kimjune01 kimjune01 commented May 13, 2026

Copy link
Copy Markdown

Summary

  • Add metro event type to the EventTypes interface in Events.ts, matching the C++ MetronomeNode::processEvents payload shape
  • TypeScript now accepts core.on('metro', callback) without type errors

Fixes #73

Test plan

  • tsc --noEmit compiles cleanly with the new type
  • Type-level test confirms 'metro' is accepted as a valid event name
  • Removing the metro line produces TS2345 (negative check)

Hypothesis graph

Reasoning trace and attestation for this fix: https://github.com/kimjune01/sweep/blob/master/repo-hypotheses/elemaudio-elementary.md

kimjune01 added 2 commits May 11, 2026 22:19
TypeScript rejects core.on('metro', callback) because 'metro' is
missing from the EventTypes type definition in Events.ts, even though
the wasm runtime emits metro events at runtime.
Adds the metro event type signature to match the C++ MetronomeNode's
processEvents output. The event payload contains an optional source
field populated from the node's name property.

Fixes elemaudio#73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metro not recognized as keyof EventTypes

1 participant