feat(web)!: rewrite the library in TypeScript
This commit is contained in:
parent
07a86b1729
commit
2cae67892e
39 changed files with 7856 additions and 3629 deletions
|
|
@ -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) => {
|
||||
Loading…
Add table
Add a link
Reference in a new issue