Skip to main content
Module

x/rambda/defaultTo-spec.ts

Faster and smaller alternative to Ramda
Go to Latest
File
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 })})