Skip to main content
Module

x/rambda/source/init-spec.ts

Faster and smaller alternative to Ramda
Latest
File
import {init} from 'rambda'
describe('R.init', () => { it('with string', () => { const result = init('foo')
result // $ExpectType string }) it('with list - one type', () => { const result = init([1, 2, 3])
result // $ExpectType number[] }) it('with list - mixed types', () => { const result = init([1, 2, 3, 'foo', 'bar'])
result // $ExpectType (string | number)[] })})