js bindings

This commit is contained in:
Robin Appelman 2022-10-23 17:01:34 +02:00
commit beb9bf3aa2
18 changed files with 7985 additions and 6186 deletions

14
js/index.ts Normal file
View file

@ -0,0 +1,14 @@
export interface EditOptions {
unlock_pov: boolean,
cut?: TickRange,
}
export interface TickRange {
from: number,
to: number,
}
export async function edit(bytes: Uint8Array, options: EditOptions): Promise<Uint8Array> {
let m = await import("../pkg/index.js");
return m.edit(bytes, options);
}