Error building and/or running lezer-generator

When building the lezer generator, tsc produces this error message:

    src/test.ts:53:11 - error TS2367: This condition will always return 'false' since the types '"name"' and '"["' have no overlap.

    53       if (tok == '[') {
                 ~~~~~~~~~~

    src/test.ts:71:11 - error TS2367: This condition will always return 'false' since the types '"name"' and '"("' have no overlap.

    71       if (tok == '(') {
                 ~~~~~~~~~~

If you build lezer-generator by commenting out that TestSpec and running it against the simple example grammar in the Writing a Grammar section of the website the following error occurs while parsing the @top node:

Node has properties but no name

Apologies if this is not the right place to discus this issue. The forum says Bug reports should go on GitHub, but the Issues tab is not enabled for the lezer-generator repo on GitHub.

I’m using a central issue tracker for lezer-generator, lezer-tree, and lezer (it’s linked from the readme).

It seems TypeScript 3.7 tightened some checks (though this one is purely spurious—it unsoundly tightens the type of a variable that’s mutated in a closure) that cause this. I’ve added a cast, things should build again.

Thanks, build works for me now. Opened a new issue on GitHub for the Node has properties but no name message. https://github.com/lezer-parser/lezer/issues/8