From 3ebd1ee75699ec7463d466819ef3984ecd6511ca Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Sun, 25 Nov 2018 17:08:19 +0100 Subject: [PATCH] refactor(thenP): add alias then --- src/index.d.ts | 2 ++ src/index.js | 1 + src/thenP.js | 1 + 3 files changed, 4 insertions(+) diff --git a/src/index.d.ts b/src/index.d.ts index 00f71aaa96..cb75e0fee4 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -781,6 +781,8 @@ declare namespace RamdaAdjunct { */ thenP(onFulfilled: Function, thenable: Promise): Promise; thenP(onFulfilled: Function): (thenable: Promise) => Promise; + then(onFulfilled: Function, thenable: Promise): Promise; + then(onFulfilled: Function): (thenable: Promise) => Promise; /** * Runs the given list of functions in order with the supplied object, then returns the object. diff --git a/src/index.js b/src/index.js index 2a36026d50..357c12219a 100644 --- a/src/index.js +++ b/src/index.js @@ -91,6 +91,7 @@ export { default as allP } from './allP'; export { default as resolveP } from './resolveP'; export { default as rejectP } from './rejectP'; export { default as thenP } from './thenP'; +export { default as then } from './thenP'; export { default as Y } from './Y'; export { default as seq } from './seq'; export { default as sequencing } from './seq'; diff --git a/src/thenP.js b/src/thenP.js index 11327ae2a2..0e9e93ecb4 100644 --- a/src/thenP.js +++ b/src/thenP.js @@ -7,6 +7,7 @@ import { invoker } from 'ramda'; * * @func thenP * @memberOf RA + * @aliases then * @since {@link https://char0n.github.io/ramda-adjunct/2.8.0|v2.8.0} * @deprecated since v2.12.0; available in ramda@0.26.0 as R.then * @category Function