deno.land / x / rambda@v9.1.1 / source / defaultTo-spec.ts

defaultTo-spec.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
import {defaultTo} from 'rambda'
describe('R.defaultTo with Ramda spec', () => { it('happy', () => { const result = defaultTo('foo', '') result // $ExpectType "" | "foo" }) it('with explicit type', () => { const result = defaultTo<string>('foo', null) result // $ExpectType string })})
rambda

Version Info

Tagged at
2 months ago