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

@ -1,19 +0,0 @@
var TreeSitter = function() {
var initPromise;
var document = typeof window == 'object'
? {currentScript: window.document.currentScript}
: null;
class Parser {
constructor() {
this.initialize();
}
initialize() {
throw new Error("cannot construct a Parser before calling `init()`");
}
static init(moduleOptions) {
if (initPromise) return initPromise;
Module = Object.assign({}, Module, moduleOptions);
return initPromise = new Promise((resolveInitPromise) => {