typescript(option): fix: fixed the type definition for count
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
0ef7baa739
commit
a32f62cfc6
|
@ -1,4 +1,4 @@
|
||||||
import { isSome } from './isSome'
|
import { isSome } from './isSome'
|
||||||
import { compL } from '@thi.ng/compose'
|
import { Option } from '../types'
|
||||||
|
|
||||||
export const count = compL(isSome, Number)
|
export const count = <T>(option: Option<T>) => Number(isSome(option))
|
||||||
|
|
Loading…
Reference in a new issue