Skip to content

Commit

Permalink
refactor(promise-kit): Rename PromiseRecord to PromiseKit (#4201)
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal authored Dec 24, 2021
1 parent fea822e commit ecb8097
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/promise-kit/src/promiseKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ const BestPipelinablePromise = globalThis.HandledPromise || Promise;

/**
* @template T
* @typedef {Object} PromiseRecord A reified Promise
* @typedef {Object} PromiseKit A reified Promise
* @property {(value: ERef<T>) => void} resolve
* @property {(reason: any) => void} reject
* @property {Promise<T>} promise
*/

/**
* PromiseRecord is deprecated in favor of PromiseKit.
*
* @template T
* @typedef {PromiseKit<T>} PromiseRecord
*/

/**
* @template T
* @typedef {T | PromiseLike<T>} ERef
Expand All @@ -35,7 +42,7 @@ const NOOP_INITIALIZER = harden(() => {});
* and rejecting it.
*
* @template T
* @returns {PromiseRecord<T>}
* @returns {PromiseKit<T>}
*/
export function makePromiseKit() {
/** @type {(value: ERef<T>) => void} */
Expand Down

0 comments on commit ecb8097

Please sign in to comment.