typescript(option): fix: fixed wrong types for bind, bindAsync, and probably other helpers as well
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
ff81096e6f
commit
0abd53917b
17 changed files with 169 additions and 4 deletions
typescript/option/src
|
@ -1,4 +1,5 @@
|
|||
export * from './bind'
|
||||
export * from './bindAsync'
|
||||
export * from './count'
|
||||
export * from './exists'
|
||||
export * from './filter'
|
||||
|
@ -13,8 +14,7 @@ export * from './isNone'
|
|||
export * from './isSome'
|
||||
export * from './iter'
|
||||
export * from './map'
|
||||
export * from './mapAsync'
|
||||
export * from './toArray'
|
||||
export * from './toNullable'
|
||||
export * from './withDefault'
|
||||
export * from './mapAsync'
|
||||
export * from './bindAsync'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Option } from './types'
|
||||
|
||||
export type Mapper<T, U> = (v: T) => U
|
||||
export type Binder<T, U> = Mapper<T, Option<U>>
|
||||
export type Predicate<T> = Mapper<T, boolean>
|
||||
export type Binder<T, U> = (v: T) => Option<U>
|
||||
export type Predicate<T> = (v: T) => boolean
|
||||
export type Folder<T, U> = (s: U, v: T) => U
|
||||
export type BackFolder<T, U> = (v: T, s: U) => U
|
||||
export type Nullable<T> = T | null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue