bindings: camelCase frameMs in wasm IconOptions #452

Closed
opened 2026-10-31 09:31:33 +01:00 by jqueuniet · 0 comments
Owner

IconOptions.frame_ms is the only snake_case key in the wasm API; methods and every other option are camelCase. { frameMs: 134 } is refused (unknown field frameMs, expected frame_ms or transparent).

Proposal

frameMs in the wasm options (serde rename for the JS binding); keep frame_ms in the JSON-text C options and Python keyword arguments, as each binding's idiom.

Acceptance

  • graphics.icon(frames, { frameMs: 134 }) works; the generated IconOptions type says frameMs.

Breaking: before the next release.

`IconOptions.frame_ms` is the only snake_case key in the wasm API; methods and every other option are camelCase. `{ frameMs: 134 }` is refused (`unknown field frameMs, expected frame_ms or transparent`). ## Proposal `frameMs` in the wasm options (serde rename for the JS binding); keep `frame_ms` in the JSON-text C options and Python keyword arguments, as each binding's idiom. ## Acceptance - `graphics.icon(frames, { frameMs: 134 })` works; the generated `IconOptions` type says `frameMs`. Breaking: before the next release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools#452
No description provided.