/** * Walk a list of extensions, calling each synchronously until one returns a * `Promise`. From that point on, chain the remaining extensions with `.then` * so the caller only pays the cost of a Promise if any step actually needs * one. This is the shared runtime used by `extendStore` and `extendArray`. */ export declare function applyExtensions(value: unknown, extensions: readonly ((value: unknown) => unknown)[]): unknown; /** True if any type in the tuple is a Promise. */ export type AnyPromise = [ Extract> ] extends [never] ? false : true; /** * Wrap `Final` in `Promise` iff any of the extension results in `Rs` was a * Promise, otherwise return the unwrapped value type. */ export type MaybeAsync = AnyPromise extends true ? Promise> : Awaited; //# sourceMappingURL=extend.d.ts.map