UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

41 lines (35 loc) 897 B
import _boxen from 'boxen'; import { Effect } from '../../effect.js'; /** Creates a box in the terminal. @param text - The text inside the box. @returns The box. @example ``` const message1 = yield* effectBoxen( (boxen) => boxen('unicorn', {padding: 1}) ); console.log(message1); // ┌─────────────┐ // │ │ // │ unicorn │ // │ │ // └─────────────┘ const message2 = yield* effectBoxen( (boxen) => boxen('unicorn', { padding: 1, margin: 1, borderStyle: 'double' }) ); console.log(message2); // // ╔═════════════╗ // ║ ║ // ║ unicorn ║ // ║ ║ // ╚═════════════╝ // ``` */ export declare const effectBoxen: <T>(fn: (boxen: typeof _boxen) => T) => Effect.Effect<T, Error, never>;