Code
in several places.)<200 | 404 | 500>
to both the type argument and the value.StatusCodeHandler
as both a type and a value because in Typescript (and in most statically typed languages), types and values live in a separate namespace. This is convenient, because it allows for both the type and its inferrer to be imported in a single statement.inferType
function:Functor<T<~>>
and Monad<T<~>>
will become easy to implement. (HKTs have been implemented in Typescript in the excellent fp-ts
package; however, the package is built upon an incredibly complex foundation of types.)