export declare function guard(f: () => T, opt?: { defaultValue?: T; onError?: (e: Error) => void; }): T;