fix(web): correct type errors, improve build

This commit is contained in:
vemoo 2025-08-30 22:51:41 +02:00 committed by GitHub
parent ca27fb5d43
commit 4db3edadf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 128 additions and 105 deletions

View file

@ -9,6 +9,7 @@ import { TRANSFER_BUFFER } from './parser';
/** A single node within a syntax {@link Tree}. */
export class Node {
/** @internal */
// @ts-expect-error: never read
private [0] = 0; // Internal handle for Wasm
/** @internal */
@ -635,7 +636,7 @@ export class Node {
}
/** Get the S-expression representation of this node. */
toString() {
toString(): string {
marshalNode(this);
const address = C._ts_node_to_string_wasm(this.tree[0]);
const result = C.AsciiToString(address);