patrickmichalina/typescript-monads

View on GitHub
src/reader/reader.factory.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { Reader } from './reader'
import { IReader } from './reader.interface'

export function reader<TConfig, TOut>(fn: (config: TConfig) => TOut): IReader<TConfig, TOut> {
  return new Reader<TConfig, TOut>(fn)
}