Interface for objects that can be resolved asynchronously.

Provides a standard resolution mechanism for troubles and other resolvable conditions in the KOS system. Resolution typically involves sending a command to clear the condition.

Example

class ResolvableTrouble implements ResolveAware {
async resolve(tracker?: string) {
console.log(`Resolving with tracker: ${tracker}`);
const response = await sendResolveCommand(this.id, tracker);
return response;
}
}
interface ResolveAware {
    resolve: ((tracker?) => Promise<undefined | FutureResponse>);
}

Properties

Properties

resolve: ((tracker?) => Promise<undefined | FutureResponse>)

Resolves the condition asynchronously.

Type declaration

    • (tracker?): Promise<undefined | FutureResponse>
    • Parameters

      • Optional tracker: string

        Optional tracking identifier for the resolution operation

      Returns Promise<undefined | FutureResponse>

Returns

Promise resolving to the future response, or undefined if resolution fails