type API = Kleisli[OptionT[F, ?], In[F], Out[F]]
type API = Kleisli[OptionT[IO, ?], Req[IO], Resp[IO]]
export interface Company {
id: number
companyId: CompanyId
name: CompanyName
account: CompanyAccount
access: CompanyAccess
country: string
status: CompanyStatus
}
export type CompanyABN = ValidationError | ValidatedABN | EmptyABN
let getCompany: Promise<Company> = getJSON<Company>("bank-end-url")
The Backgound
API is Typed
type API = Kleisli[OptionT[F, ?], In[F], Out[F]]
type API = Kleisli[OptionT[IO, ?], Req[IO], Resp[IO]]
here is the Middleware type
Our Front-end is…
export interface Company {
id: number
companyId: CompanyId
name: CompanyName
account: CompanyAccount
access: CompanyAccess
country: string
status: CompanyStatus
}
export type CompanyABN = ValidationError | ValidatedABN | EmptyABN
let getCompany: Promise<Company> = getJSON<Company>("bank-end-url")
So what, is an strong Type System really that important?