peggyjs / peggy

Peggy: Parser generator for JavaScript

Home Page:https://peggyjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript .d.ts for generated grammars

hildjj opened this issue · comments

If desired, output a generic .d.ts file for the generated grammar. The caller will need to provide the expected return type. This is NOT a replacement for ts-pegjs, it is just the bare minimum needed. No actual type checking will be performed. Start by cutting down the hand-maintained peg.d.ts into just the things needed for generated parsers (including SyntaxError and dependencies), then add a small number of generics.