0.0.2 • Published 6 years ago
flowtype-asserter-cli v0.0.2
flowtype-asserter
Creates "asserter" files from flowtype type definition files.
USAGE: flowtype-asserter <types.js> <output.js> <output.js.flow>
// types.js
export type SomeString = string
export type SomeObject = {
innerString: SomeString,
count: number
}
// output.js
// ----------------------------------------------
//
// AUTOGENERATED FILE, DO NOT EDIT
//
// ----------------------------------------------
import t from "flow-runtime";
export const SomeString = t.type("SomeString", t.string());
export const SomeObject = t.type("SomeObject", t.object(t.property("innerString", SomeString), t.property("count", t.number())));
// output.js.flow
// @flow
// ----------------------------------------------
//
// AUTOGENERATED FILE, DO NOT EDIT
//
// ----------------------------------------------
module.exports={
SomeString: { assert: (a: any) => null },
SomeObject: { assert: (a: any) => null }
}