Issue #389

Prefer flow over TypeScript for simplicity

Javascript primitive types number and string are too general and do not express the domain objects. Because lack of type alias in Javascript, we can use flow

export type Centimeter = number
export type Color = string
export type ImageSource = number
export type Kilogram = number
export type Kilocalorie = number // 1 cal = 4.1840 J
export type Second = number
export type SecondsSince1970 = number
export type Minute = number
export type DateString = string // 2018-11-20
export type DateTimeString = string // 2018-11-20T00:00:00
export type YearWeekString = string // 201838

export type FunctionWithVoid = () => void
export type FunctionWithString = (string) => void
export type FunctionWithBoolean = (boolean) => void
export type FunctionWithNumber = (number) => void
export type JSONObject = any
export type JSONString = string
export type StringToString = any

export type Degree = number
export type Radian = number

export type Animal = 'cat' | 'dog' | 'cow'