interface Tryer { (...args: any[]): any; } interface TryerAsync { (...args: any[]): Promise; } type TryCatchResult = [ReturnType, null] | [null, Error]; type TryCatchAsyncResult = [Awaited>, null] | [null, Error]; declare function tryCatch(tryer: T): Promise>; declare namespace tryCatch { var sync: (tryer: T) => TryCatchResult; } export { tryCatch };