import { CompositeTask } from "./composite-task"; /** * Abstract base class for asynchronous tasks in a durable orchestration. */ export declare class Task { _result: T | undefined; _exception: Error | undefined; _parent: CompositeTask | undefined; _isComplete: boolean; constructor(); /** * Returns true if the task has completed, false otherwise */ get isComplete(): boolean; /** * Returns true if the task has failed, false otherwise */ get isFailed(): boolean; /** * Alias of {@link isComplete} that matches the v3 Durable Functions `Task` shape. * Note that completion is not equivalent to success. */ get isCompleted(): boolean; /** * Alias of {@link isFailed} that matches the v3 Durable Functions `Task` shape. */ get isFaulted(): boolean; /** * The result of the task if it has completed successfully, otherwise `undefined`. * * Unlike {@link getResult}, this getter never throws: it returns `undefined` * while the task is still pending and for a failed task. This matches the v3 * Durable Functions `Task.result` shape. */ get result(): T | undefined; /** * Get the result of the task */ getResult(): T; /** * Get the exception that caused the task to fail */ getException(): Error; }