feat(web)!: rewrite the library in TypeScript

This commit is contained in:
Amaan Qureshi 2025-01-13 01:48:42 -05:00
parent 07a86b1729
commit 2cae67892e
39 changed files with 7856 additions and 3629 deletions

View file

@ -50,6 +50,14 @@ await Parser.init();
// the library is ready
```
To install a debug version of the library, pass in `--debug` when running `npm install`:
```sh
npm install web-tree-sitter --debug
```
This will load the debug version of the `.wasm` file, which includes sourcemaps for both the JS and WASM files, debug symbols, and assertions.
### Basic Usage
First, create a parser: