metadevpro/ts-pegjs

tspegjs options get ignored

pblanco-dekalabs opened this issue · 1 comments

The field tspegjs is getting ignored currently, my options are:

const output = peggy.generate(grammar, {
  output: "source",
  format: "commonjs",
  cache: true,
  plugins: [tspegjs],
  tspegjs: {
    customHeader: "// import lib\nimport { Lib } from 'mylib';",
  },
});

But no header is generated on the output.

Thanks for reporting this @pblanco-dekalabs
Looks like a breaking change comming from peggy 1.2.0 to 2.0.0 about how options are passed.
Need to review the changes and figure out how to pass now the missing info to the plugin.