communityfunded / monadism

A set of practical monads implemented in TypeScript
https://communityfunded.github.io/monadism/
BSD 2-Clause "Simplified" License
18 stars 2 forks source link

[Feature] Fix the types for Maybe.prop #4

Closed bkonkle closed 5 years ago

bkonkle commented 5 years ago

Changes the type signature of Maybe.prop from:

prop = <B extends A[keyof A]>(key: keyof A) => Maybe<B>

To:

prop = <P extends keyof A>(key: P) => Maybe<A[P]>

This fixes the types on prop to make them more automatic, but breaks existing usages.