import type { Result } from './result.js'; /** * Create an `Ok` or `Err` from `try...catch`. * * The purpose of `fromTry` is to safely execute a given function and return either an `Ok` instance with the result or * an `Err` instance with the caught error. * * The function is executed inside a try-catch block and if it runs without errors, `fromTry` returns an `Ok` instance * with the result. Otherwise, `fromTry` returns an `Err` instance with the caught error. * * @tags result, wrap, invoke */ export declare function fromTry any>(fn: Fn): Result, E>;