UNPKG

@prelude/function

Version:

Function module.

14 lines 454 B
import * as Function from './index.js'; test('Function.t works with instanceof', () => { const f = () => 1; expect(f instanceof Function.t).toBe(true); }); test('Function.t is a function', () => { expect(typeof Function.t).toBe('function'); }); test('Function.t can be used as type in Map', () => { const map = new Map(); map.set('f', (_) => _ + 1); expect(map.get('f')?.(1)).toEqual(2); }); //# sourceMappingURL=index.test.js.map