AnsiToken
AnsiToken = {
kind:"text";text:string; } | {final:string;intermediates:string;kind:"csi";parameters:string; } | {body:string;kind:"osc";terminator:"bel"|"st"; }
Defined in: packages/format-ansi/src/ansi-token.ts:10
One unit of an ANSI byte stream.
text carries everything that is not an escape sequence; the sequence kinds
keep their parameter and intermediate bytes verbatim, so an encoder can
reproduce the original stream exactly.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ kind: "text"; text: string; }
Type Literal
Section titled “Type Literal”{ final: string; intermediates: string; kind: "csi"; parameters: string; }
readonlyfinal:string
intermediates
Section titled “intermediates”
readonlyintermediates:string
readonlykind:"csi"
ESC [ … final byte: cursor motion, erase, SGR.
parameters
Section titled “parameters”
readonlyparameters:string
Type Literal
Section titled “Type Literal”{ body: string; kind: "osc"; terminator: "bel" | "st"; }
readonlybody:string
readonlykind:"osc"
ESC ] … BEL or ST: window title, OSC 8 hyperlink.
terminator
Section titled “terminator”
readonlyterminator:"bel"|"st"
Which terminator closed it, since both are legal and round-trip.