UNPKG

anaf-ts-sdk

Version:

Complete TypeScript SDK for Romanian ANAF API -E-Factura, Company checks

13 lines (12 loc) 337 B
type Success<T> = { data: T; error: null; }; type Failure<E> = { data: null; error: E; }; type Result<T, E = Error> = Success<T> | Failure<E>; export declare function tryCatch<T, E = Error>(promise: Promise<T>): Promise<Result<T, E>>; export declare function tryCatch<T, E = Error>(fn: () => T): Result<T, E>; export {};