Interface Sizer

Describes methods of sizing strings with different types of unrendered data.

interface Sizer {
    close?: string;
    open?: string;
    size: StringSizer;
    unrenderedSequenceLength?: ((str, index) => number);
}

Properties

close?: string

The character used to indicate the end of unrendered data.

open?: string

The character used to indicate the beginning of unrendered data.

A function that returns only the rendered size of the given string.

unrenderedSequenceLength?: ((str, index) => number)

Optionally returns the length of an unrendered sequence starting at index i. Requires 'open' to be set.

Type declaration

    • (str, index): number
    • Parameters

      • str: string
      • index: number

      Returns number