ParserFunction type does not specify options as optional
patrickroberts opened this issue · 1 comments
patrickroberts commented
On line 1322 you have
export type ParseFunction = (input: string, options: IParseOptions) => any
while on line 1004 you have
function peg$parse(input: string, options?: IParseOptions)
Of course, this causes an error when you try to call parse()
using only the string argument. The quick work-around currently is to modify the output .ts file to export the correct type, or to call the parse function with an empty object for options
, but both of these are undesirable in the long run. Is this important enough to merit a patch?
pjmolina commented
Thanks @patrickroberts Indeed! Patched and releasing it.