IState Interface

Packages > @anticrm/core > IState

Signature:

export interface IState 

Methods

List of methods of this class
Method Description
atBlank()
closeBlock(node)
ensureNewLine()
esc(str, startOfLine)
flushClose(size)
getEnclosingWhitespace(text)
markString(mark, open, parent, index)
quote(str)
render(node, parent, index)
renderContent(parent)
renderInline(parent)
renderList(node, delim, firstDelim)
repeat(str, n)
text(text, escape)
wrapBlock(delim, firstDelim, node, f)
write(content)

Methods

atBlank

Signature:

atBlank(): void;

Returns:

void

closeBlock

Signature:

closeBlock(node: any): void;

Parameters

List of parameters
Parameter Type Description
node any

Returns:

void

ensureNewLine

Signature:

ensureNewLine(): void;

Returns:

void

esc

Signature:

esc(str: string, startOfLine?: boolean): string;

Parameters

List of parameters
Parameter Type Description
str string
startOfLine boolean

Returns:

string

flushClose

Signature:

flushClose(size: number): void;

Parameters

List of parameters
Parameter Type Description
size number

Returns:

void

getEnclosingWhitespace

Signature:

getEnclosingWhitespace(text: string): {
        leading: string;
        trailing: string;
    };

Parameters

List of parameters
Parameter Type Description
text string

Returns:

{ leading: string; trailing: string; }

markString

Signature:

markString(mark: any, open: any, parent: any, index: number): string;

Parameters

List of parameters
Parameter Type Description
mark any
open any
parent any
index number

Returns:

string

quote

Signature:

quote(str: string): string;

Parameters

List of parameters
Parameter Type Description
str string

Returns:

string

render

Signature:

render(node: MessageNode, parent: MessageNode, index: number): void;

Parameters

List of parameters
Parameter Type Description
node MessageNode
parent MessageNode
index number

Returns:

void

renderContent

Signature:

renderContent(parent: MessageNode): void;

Parameters

List of parameters
Parameter Type Description
parent MessageNode

Returns:

void

renderInline

Signature:

renderInline(parent: any): void;

Parameters

List of parameters
Parameter Type Description
parent any

Returns:

void

renderList

Signature:

renderList(node: any, delim: string, firstDelim: any): void;

Parameters

List of parameters
Parameter Type Description
node any
delim string
firstDelim any

Returns:

void

repeat

Signature:

repeat(str: string, n: number): string;

Parameters

List of parameters
Parameter Type Description
str string
n number

Returns:

string

text

Signature:

text(text: string, escape?: boolean): void;

Parameters

List of parameters
Parameter Type Description
text string
escape boolean

Returns:

void

wrapBlock

Signature:

wrapBlock(delim: string, firstDelim: string | null, node: MessageNode, f: () => void): void;

Parameters

List of parameters
Parameter Type Description
delim string
firstDelim string | null
node MessageNode
f () => void

Returns:

void

write

Signature:

write(content: string): void;

Parameters

List of parameters
Parameter Type Description
content string

Returns:

void