lezer-parser / lezer

Dev utils and issues for the Lezer core packages
33 stars 1 forks source link

No types found for `@lezer/generator/rollup` #49

Closed spaceemotion closed 4 months ago

spaceemotion commented 7 months ago

The generator package has regular types, but none for the rollup plugin, according to this compile error I am getting:

Could not find a declaration file for module '@lezer/generator/rollup'. '/home/spaceemotion/code/xxx/application/node_modules/.pnpm/@lezer+generator@1.6.0/node_modules/@lezer/generator/dist/rollup-plugin-lezer.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/lezer__generator` if it exists or add a new declaration (.d.ts) file containing `declare module '@lezer/generator/rollup';`

import { lezer } from "@lezer/generator/rollup";

How would one go about adding those? Is it just a regular rollup plugin in terms of its type?

marijnh commented 7 months ago

Do the types in the attached patch work for you? I haven't done much with Rollup's types.

spaceemotion commented 6 months ago

Just wanted to chime in to say thanks for the quick response - I haven't been able to test them out yet, but will later this week!