{"version":3,"file":"isPromise.cjs","names":[],"sources":["../src/isPromise.ts"],"sourcesContent":["import type { NarrowedTo } from \"./internal/types/NarrowedTo\";\n\n/**\n * A function that checks if the passed parameter is a Promise and narrows its type accordingly.\n *\n * @param data - The variable to check.\n * @returns True if the passed input is a Promise, false otherwise.\n * @signature\n *    isPromise(data)\n * @example\n *    isPromise(Promise.resolve(5)) //=> true\n *    isPromise(Promise.reject(5)) //=> true\n *    isPromise('somethingElse') //=> false\n * @category Guard\n */\nexport function isPromise<T>(\n  data: Readonly<PromiseLike<unknown>> | T,\n): data is NarrowedTo<T, PromiseLike<unknown>> {\n  return data instanceof Promise;\n}\n"],"mappings":"mEAeA,SAAgB,EACd,EAC6C,CAC7C,OAAO,aAAgB"}