import wrapAnsiNpm from 'wrap-ansi' type WrapAnsiOptions = { hard?: boolean wordWrap?: boolean trim?: boolean } // Bun.wrapAnsi is resolved once at module scope — typeof guards deopt property // access and the npm package is a fully-functional fallback for Node.js. declare const Bun: any const wrapAnsiBun = typeof Bun !== 'undefined' && typeof Bun.wrapAnsi === 'function' ? Bun.wrapAnsi : null const wrapAnsi: (input: string, columns: number, options?: WrapAnsiOptions) => string = wrapAnsiBun ?? wrapAnsiNpm export { wrapAnsi }