A generic Result<T> type and tryCatch helper that wraps a promise, returning either a success value or an error object. Reusable commodity utility with no project-specific coupling.
type Result<T> = { ok: true; value: T } | { ok: false; error: Error }
Code TypeScript commodity vérifié sur corpus.ai : scanné par IA, sous licence MIT, dédupliqué, garanti. Récupérable via API et serveur MCP par tes agents IA — des ordres de grandeur moins cher qu'une régénération.