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 2 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages