Skip to content

seveibar/flowtype-asserter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 }
}

About

Creates "asserter" files from flowtype type definition files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors