1
Fork 0

typescript(option): fix: fixed the type definition for count

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-12-23 15:12:48 +02:00 committed by prescientmoon
parent 0ef7baa739
commit a32f62cfc6
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4

View file

@ -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))