import type { Fn , Fn2 , FnU } from "@thi.ng/api" ; /**
 * UTF-8 Byte Order Mark character
 * https://en.wikipedia.org/wiki/Byte_order_mark
 */ export const BOM = "\ufeff" ; export type Stringer < T > = ( x : T , ... xs : any [ ] ) => string ; export type FnS = FnU < string > ; export interface WordWrapOpts { default width : number ; defaultValue min : number ; /**
     * If true, words longer than  WordWrapOpts . width will be split over
     * multiple lines. If false (default), lines *might* become longer than the
     * configured wrap width.
     *
     *  defaultValue hard : boolean ; /**
     * Word splitting strategy. Use  SPLIT_ANSI when wordwrapping text w/
     * ANSI colors/seqs. The default  SPLIT_PLAIN only supports plain
     * text and will yield wrong results.
     *
     *  defaultValue splitter : IWordSplit ; /**
     * Word delimiter string or regexp (whitespace by default).
     */ delimWord : RegExp | string ; /**
     * Line delimiter string or regexp (newline chars by default).
     */ delimLine : RegExp | string ; } export interface IWordSplit { /**
     * Returns the real length of given string (e.g. with ANSI control sequences
     * removed).
     */ length : Fn < string , number > ; param word param pos split : Fn2 < string , number , number > ; }