AnsiString overview
This modules implements a command string that produces an ANSI style, e.g. \x1b[1m
for bold
Table of contents
Constructors
fromNonEmptySequence
Builds an AnsiString from a NonEmptySequence
Signature
export declare const fromNonEmptySequence: MTypes.OneArgFunction<NonEmptySequence, string>
fromSequence
Builds an AnsiString from a Sequence
Signature
export declare const fromSequence: MTypes.OneArgFunction<Sequence, string>
Instances
empty
Empty AnsiString instance
Signature
export declare const empty: string
reset
Reset AnsiString instance
Signature
export declare const reset: string
Models
NonEmptySequence (interface)
Same as Sequence but must constain at least one number
Signature
export interface NonEmptySequence extends MTypes.ReadonlyOverOne<number> {}
Sequence (interface)
Type that represents the sequence of a command string (the numbers separated by a semicolon between \x1b[
and m
, e.g. [1,31] for bold red)
Signature
export interface Sequence extends ReadonlyArray<number> {}
Type (type alias)
Type of an ANSI string
Signature
export type Type = string