Interface StepReporter
interface StepReporter {
error<T>(message: string, data?: T & AsValue<T>): Promise<void>;
info<T>(message: string, data?: T & AsValue<T>): Promise<void>;
setGlobalMetadata<T>(key: string, value: T & AsValue<T>): Promise<void>;
warning<T>(message: string, data?: T & AsValue<T>): Promise<void>;
}
error<T>(message: string, data?: T & AsValue<T>): Promise<void>;
info<T>(message: string, data?: T & AsValue<T>): Promise<void>;
setGlobalMetadata<T>(key: string, value: T & AsValue<T>): Promise<void>;
warning<T>(message: string, data?: T & AsValue<T>): Promise<void>;
}
What a step reports through during one attempt: its own events, each with a message and, optionally, data, and global metadata. itinera makes one for each attempt and closes it when the attempt ends.
Each call settles once every reporter has been given what it reports, so await it; itinera keeps the order of calls a step does not await.