0.0.3 • Published 4 years ago

pika-plugin-typedefs-to-flow v0.0.3

Weekly downloads
41
License
MIT
Repository
github
Last release
4 years ago

pika-plugin-typedefs-to-flow

A @pika/pack plugin to convert typescript definitions to flow types.

Usage

npm i flowgen pika-plugin-typedefs-to-flow

When creating your pipeline, be sure pika-plugin-typedefs-to-flow us used after @pika/plugin-ts-standard-pkg.

{
    "@pika/pack": {
        "pipeline": [["@pika/plugin-ts-standard-pkg"], ["pika-plugin-typedefs-to-flow"]]
    }
}

Options

OptionTypeDefault ValueDescription
tolerateFailuresbooleanTolerate errors thrown from flowgen.
beautifybooleantrueDisable flow definition beautification.
flowgenObjectPass custom options to flowgen

flowgen Options

OptionTypeDefault ValueDescription
flowTypedFormatbooleanFormat output so it fits in the flow-typed repo.
compileTestsbooleanCompile any sibling -tests.ts files found.
noModuleExportsbooleanConvert export = Type only to default export, instead of declare module.exports: Type.
interfaceRecordsbooleanConvert TypeScript interfaces to Exact Objects.
noJSDocbooleanIgnore TypeScript JSDoc.
addFlowHeaderbooleantrueAdd // @flow to generated files. Should be used for libs.