Files
klz-cables.com/.pnpm-store/v10/files/fa/dc6616b2eff1c952555634daf496db415aa2d7c25ab016db7c4cefd259d7e2fcb53743e0964a7daf3cafdc9515e881e64b23c8058c27375fbb88daf135dd6b
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

18 lines
660 B
Plaintext

/**
* A utility type for choosing between synchronous and asynchronous return
* values.
*
* This is used as the return value for plugins like {@link CustomFunction},
* {@link Importer}, and {@link FileImporter} so that TypeScript enforces that
* asynchronous plugins are only passed to {@link compileAsync} and {@link
* compileStringAsync}, not {@link compile} or {@link compileString}.
*
* @typeParam sync - If this is `'sync'`, this can only be a `T`. If it's
* `'async'`, this can be either a `T` or a `Promise<T>`.
*
* @category Other
*/
export type PromiseOr<T, sync extends 'sync' | 'async'> = sync extends 'async'
? T | Promise<T>
: T;