normalizePromisable<T>
Converts to native promisable, converting PromiseLike (aka Thenable) to a native Promise.
Import:
import { normalizePromisable } from 'obsidian-dev-utils/async';Signature:
function normalizePromisable(promisable: Promisable<T>): T | Promise<T>Parameters:
| Parameter | Type | Description |
|---|---|---|
promisable | Promisable<T> | The promisable to normalize. |
Returns: T | Promise<T> — The value itself or a native Promise if the value is a PromiseLike.