Interface InterpolationOptions

Hierarchy

  • InterpolationOptions

Properties

alwaysFormat?: boolean

Always format interpolated values.

Default

false
defaultVariables?: {
    [index: string]: any;
}

Global variables to use in interpolation replacements

Type declaration

  • [index: string]: any

Default

undefined
escapeValue?: boolean

Escape passed in values to avoid xss injection

Default

true

Format function see formatting for details

Default

noop
formatSeparator?: string

Used to separate format from interpolation value

Default

','
maxReplaces?: number

After how many interpolation runs to break out before throwing a stack overflow

Default

1000
nestingOptionsSeparator?: string

Separates options from key

Default

','
nestingPrefix?: string

Prefix for nesting

Default

'$t('
nestingPrefixEscaped?: string

Escaped prefix for nesting (regexSafe)

Default

undefined
nestingSuffix?: string

Suffix for nesting

Default

')'
nestingSuffixEscaped?: string

Escaped suffix for nesting (regexSafe)

Default

undefined
prefix?: string

Prefix for interpolation

Default

'{{'
prefixEscaped?: string

Escaped prefix for interpolation (regexSafe)

Default

undefined
skipOnVariables?: boolean

If true, it will skip to interpolate the variables

Default

true
suffix?: string

Suffix for interpolation

Default

'}}'
suffixEscaped?: string

Escaped suffix for interpolation (regexSafe)

Default

undefined
unescapePrefix?: string

Prefix to unescaped mode

Default

'-'
unescapeSuffix?: string

Suffix to unescaped mode

Default

undefined
useRawValueToEscape?: boolean

If true, then value passed into escape function is not casted to string, use with custom escape function that does its own type check

Default

false

Methods

  • Escape function

    Parameters

    • str: string

    Returns string

    Default

    str => str
    

Generated using TypeDoc