Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/rprintf"

Index

Type aliases

Variables

Functions

Type aliases

Part

Part: string | ReactElement

Parts

Parts: Part | Part[]

Wrapper

Wrapper: ReactElement | WrapperFn

WrapperFn

WrapperFn: (children: Parts) => Parts

Type declaration

Variables

Const tagRegExp

tagRegExp: RegExp = /<>/

Functions

add

applyWrapper

  • applyWrapper(children: Parts, wrappers: Wrapper[], index: number): string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}> | (string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}>)[]
  • Parameters

    Returns string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}> | (string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}>)[]

print

  • print(text: string, wrappers?: Wrapper[], startwrapperIndexPointerPointer?: { v: number }): string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}> | (string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}>)[]
  • Parameters

    • text: string
    • Default value wrappers: Wrapper[] = []
    • Default value startwrapperIndexPointerPointer: { v: number } = { v: 0 }
      • v: number

    Returns string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}> | (string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}>)[]

rprintf

  • rprintf(text: string, wrappers?: Wrapper[]): string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}> | (string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}>)[]
  • Format string with React-elements.

    Parameters

    • text: string

      Text to format.

    • Default value wrappers: Wrapper[] = []

      Wrappers to paste.

    Returns string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}> | (string | ReactElement<any, string | ((props: P) => ReactElement | null) | {}>)[]

    Formated text.

Generated using TypeDoc