Skip to content

Improve TypeScript Bindings#941

Merged
CryZe merged 1 commit into
LiveSplit:masterfrom
CryZe:improve-typescript-bindings
Jul 23, 2026
Merged

Improve TypeScript Bindings#941
CryZe merged 1 commit into
LiveSplit:masterfrom
CryZe:improve-typescript-bindings

Conversation

@CryZe

@CryZe CryZe commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Describe serialized RGBA colors as fixed four-channel tuples and represent two-color gradient variants as fixed pairs. This preserves the exact Rust serialization contracts in generated TypeScript and lets consumers use strict indexed access without defensive assertions.

Expose static methods named name as displayName in the JavaScript-facing Node and WebAssembly bindings to avoid colliding with Function.name. Keep the raw C API and non-JavaScript binding names unchanged, and cover the JavaScript naming rule with a generator test.

Validation: binding-generator tests, Clippy with warnings denied, targeted Rust formatting, a full WebAssembly core rebuild, frontend ESLint and TypeScript checks, and web and Tauri frontend builds.

Describe serialized RGBA colors as fixed four-channel tuples and represent two-color gradient variants as fixed pairs. This preserves the exact Rust serialization contracts in generated TypeScript and lets consumers use strict indexed access without defensive assertions.

Expose static methods named name as displayName in the JavaScript-facing Node and WebAssembly bindings to avoid colliding with Function.name. Keep the raw C API and non-JavaScript binding names unchanged, and cover the JavaScript naming rule with a generator test.

Validation: binding-generator tests, Clippy with warnings denied, targeted Rust formatting, a full WebAssembly core rebuild, frontend ESLint and TypeScript checks, and web and Tauri frontend builds.
@CryZe CryZe added enhancement An improvement for livesplit-core. c api The issue or pull request is about the C API. code quality Affects the quality of the code. bindings This is about the bindings / binding generator. labels Jul 23, 2026
@CryZe CryZe added this to the v0.14 milestone Jul 23, 2026
@CryZe
CryZe enabled auto-merge (squash) July 23, 2026 10:41
@CryZe
CryZe merged commit 0c4fdbb into LiveSplit:master Jul 23, 2026
70 checks passed
@CryZe
CryZe deleted the improve-typescript-bindings branch July 23, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bindings This is about the bindings / binding generator. c api The issue or pull request is about the C API. code quality Affects the quality of the code. enhancement An improvement for livesplit-core.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TS] Can't compile the TypeScript bindings with noImplicitOverride set to true

1 participant