squiggle
squiggle copied to clipboard
Remove "noImplicitAny": false in components
Context:
- I tried to remove it after triggering a pretty bad case of unsafe types (
{foo: "bar"}[0]is any) - but Lezer types are broken: first, they don't provide
exports.typesfield, second, even after I tried to patchnode_modules/@lezer/*/package.jsonby hand and set explicitcontext: anyin squiggle.ts, it didn't work (because generated code is problematic too)
@cab404 this might require PRs to upstream to fix. I couldn't find any issues in https://github.com/lezer-parser/lezer.
I guess, alternatively, we could try to provide a .d.ts file for generated code, or exclude it from strict typescript checks somehow, and use context: any for squiggle.ts code.
I'd prefer to have "noImplicitAny": true in the entire components repo and sacrifice the type safety in languageSupport, if that's easier for now.