export type Status = 'OK' | 'CANCELED'; export type ResultWrapper = { status: Status; } & T; export type SuccessCallback = (result: ResultWrapper) => void; export type ErrorCallback = (error: { status: "ERROR"; message: string; }) => void;