How to use the flowgen.compiler.compileDefinitionString function in flowgen

To help you get started, we’ve selected a few flowgen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ritz078 / transform / pages / api / typescript-to-flow.ts View on Github external
export default (req: NextApiRequest, res: NextApiResponse) => {
  try {
    const result = compiler.compileDefinitionString(req.body);
    res.status(200).send(beautify(result));
  } catch (e) {
    res.status(500).send(e.message);
  }
};

flowgen

Generate flowtype definition files from TypeScript

ISC
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis