chain
Chains a promise with another promise.
Import:
import { chain } from 'obsidian-dev-utils/async';Signature:
function chain(chainPromise: Promise<void> | null, promisableFn: () => Promisable<void> | null): Promise<void> | nullParameters:
| Parameter | Type | Description |
|---|---|---|
chainPromise | Promise<void> | null | Represents the chained promise. |
promisableFn | () => Promisable<void> | null | The function to chain. |
Returns: Promise<void> | null — Chained promise or null if no async logic is chained.