diff --git a/files/NEXT_VERSION_CHECKLIST.md b/files/NEXT_VERSION_CHECKLIST.md index 73a5722f..42cfef31 100644 --- a/files/NEXT_VERSION_CHECKLIST.md +++ b/files/NEXT_VERSION_CHECKLIST.md @@ -34,6 +34,8 @@ it('within pipe requires explicit type', () => { ``` - Remove following methods: + +-- always -- addIndex -- addIndexRight diff --git a/files/index.d.ts b/files/index.d.ts index 8d262801..58061cd6 100644 --- a/files/index.d.ts +++ b/files/index.d.ts @@ -215,28 +215,6 @@ Notes: // @SINGLE_MARKER export function allPass boolean>(predicates: readonly F[]): F; -/* -Method: always - -Explanation: It returns function that always returns `x`. - -Example: - -``` -const fn = R.always(7) - -const result = fn() -// => 7 -``` - -Categories: Logic - -Notes: - -*/ -// @SINGLE_MARKER -export function always(x: T): (...args: unknown[]) => T; - /* Method: and diff --git a/source/all-spec.ts b/source/all-spec.ts index cd93a014..dae68293 100644 --- a/source/all-spec.ts +++ b/source/all-spec.ts @@ -1,10 +1,10 @@ -import { all, piped } from 'rambda' +import * as R from 'rambda' describe('all', () => { it('happy', () => { - const result = piped( + const result = R.piped( [1, 2, 3], - all(x => { + R.all(x => { x // $ExpectType number return x > 0 }), diff --git a/source/always-spec.ts b/source/always-spec.ts deleted file mode 100644 index b5694831..00000000 --- a/source/always-spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { always } from 'rambda' - -describe('R.always', () => { - it('happy', () => { - const fn = always('foo') - fn // $ExpectType (...args: unknown[]) => string - const result = fn() - result // $ExpectType string - }) -}) diff --git a/source/always.js b/source/always.js deleted file mode 100644 index 86c30f79..00000000 --- a/source/always.js +++ /dev/null @@ -1,3 +0,0 @@ -export function always(x) { - return _ => x -} diff --git a/source/always.spec.js b/source/always.spec.js deleted file mode 100644 index 451cfd23..00000000 --- a/source/always.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -import { always } from './always.js' -import { applySpec } from './applySpec.js' - -test('happy', () => { - const fn = always(7) - - expect(fn()).toBe(7) - expect(fn()).toBe(7) -}) - -test('compatibility with applySpec', () => { - const spec = applySpec({ x: always('foo') }) - expect(spec({})).toEqual({ x: 'foo' }) -})