// The interop boundary: converts the outside world's nulls, undefineds, and// throws into Option and Result at the edge of tsus code.import { Some, None, Ok, Err } from "./index.js";export const fromNullable = (value) => value === null || value === undefined ? None : Some(value);export const wrapSync = (fn) => (...args) => { try { return Ok(fn(...args)); } catch (error) { return Err(error); }};export const wrapAsync = (fn) => async (...args) => { try { return Ok(await fn(...args)); } catch (error) { return Err(error); }};