/** * @license * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export type TaskExecutable = (abortSignal: AbortSignal) => Promise; /** * Represents a runtime task wrapping a promise, allowing status check and cancellation. */ export declare class Task { executable: TaskExecutable; private isDone; private abortController; promise: Promise; constructor(executable: TaskExecutable); /** * Cancels the task execution. */ cancel(): void; /** * Returns true if the task has completed (either resolved or rejected). */ done(): boolean; }