/** * Copyright 2025 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare function isPromiseLike(value: unknown): value is PromiseLike; declare function arrayFromAsync(generator: AsyncGenerator | AsyncIterableIterator | AsyncIterable, limit?: number): Promise; type EmitterToGeneratorFn = (data: { emit: (data: T) => void; }) => Promise; declare function emitterToGenerator(fn: EmitterToGeneratorFn): AsyncGenerator>, void, unknown>; declare function asyncProperties>(obj: T): Promise<{ [K in keyof T]: Awaited; }>; interface SafeExecuteOptions { handler: () => T; onSuccess?: (result: T) => void; onError?: (err: Error) => void; } declare function safeExecute({ handler, onError, onSuccess }: SafeExecuteOptions): void; declare function asyncExecute(handler: () => R): Promise; declare class LazyPromise implements Promise { protected readonly handler: () => Promise; constructor(handler: () => Promise); readonly [Symbol.toStringTag] = "Promise"; protected before(): Promise; then(onfulfilled?: ((value: R) => PromiseLike | TResult1) | undefined | null, onrejected?: ((reason: any) => PromiseLike | TResult2) | undefined | null): Promise; catch(onrejected?: ((reason: any) => PromiseLike | TResult) | undefined | null): Promise; finally(onfinally?: (() => void) | undefined | null): Promise; } declare function signalRace(fn: () => Promise, signal?: AbortSignal, onAbort?: () => void): Promise; declare function executeSequentially(tasks: (() => Promise)[]): Promise; export { type EmitterToGeneratorFn, LazyPromise, arrayFromAsync, asyncExecute, asyncProperties, emitterToGenerator, executeSequentially, isPromiseLike, safeExecute, signalRace };