export interface Callback { (data: T): void; } export interface ErrorCallback { (err: T): void; } export interface AsyncCallback { (err: BusinessError, data: T): void; } export interface BusinessError extends Error { code: number; }