1
Fork 0

typescript(option): feat: added the 'oneOf' helper

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-12-25 16:09:18 +02:00 committed by prescientmoon
parent 6a8191cc34
commit 470574fdad
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
4 changed files with 82 additions and 0 deletions
typescript/option/test

View file

@ -1,3 +1,4 @@
import { constantly } from '@thi.ng/compose'
import { Some } from '../src'
// general value to pass around
@ -5,3 +6,5 @@ export const x = Symbol('x')
// same as x but for some
export const someX = Some(x)
export const alwaysSomeX = constantly(someX)