fix(web): correct type errors, improve build

(cherry picked from commit 4db3edadf4)
This commit is contained in:
vemoo 2025-08-30 22:51:41 +02:00 committed by ObserverOfTime
parent 59f3cb91c2
commit bb82b94ded
10 changed files with 1132 additions and 428 deletions

View file

@ -193,14 +193,14 @@ describe('Node', () => {
it('correctly retrieves immediate children', () => {
const sourceCode = 'let x = 1; console.log(x);';
tree = parser.parse(sourceCode)!;
const root = tree.rootNode
const child = root.children[0].children[0]
const a = root.childWithDescendant(child)
expect(a!.startIndex).toBe(0)
const b = a!.childWithDescendant(child)
expect(b).toEqual(child)
const c = b!.childWithDescendant(child)
expect(c).toBeNull()
const root = tree.rootNode;
const child = root.children[0]!.children[0]!;
const a = root.childWithDescendant(child);
expect(a!.startIndex).toBe(0);
const b = a!.childWithDescendant(child);
expect(b).toEqual(child);
const c = b!.childWithDescendant(child);
expect(c).toBeNull();
});
});