Typographist
    Preparing search index...

    Type Alias TypographistConfig<TCustomLocale>

    TypographistConfig: TextPipelineOptions & {
        cacheSize?: number;
        excludedWords?: readonly string[];
        locale?: Locale | NoInfer<TCustomLocale>;
        rules?: readonly TypographistRules<Locale | TCustomLocale>[];
        textLocales?: readonly TextLocale<Locale | TCustomLocale>[];
        textRules?: readonly TextRule[];
        unsupportedLocale?: "preserve" | "throw";
        useFast?: boolean;
    }

    Locale selection, rule plugins, and exclusions used to create a Typographist instance.

    Type Parameters

    • TCustomLocale extends string = never

    Type Declaration

    • Optional ReadonlycacheSize?: number

      Estimated word-cache budget in MiB shared across this instance's locales; defaults to 64. Must be finite and non-negative; fractions are valid and zero disables caching. Least recently used entries are evicted to fit the budget, which is not a measured heap limit.

    • Optional ReadonlyexcludedWords?: readonly string[]

      Exact, case-sensitive words to preserve; copied at construction and empty by default.

    • Optional Readonlylocale?: Locale | NoInfer<TCustomLocale>

      Default locale for calls without an override; defaults to 'en' and follows unsupportedLocale.

    • Optional Readonlyrules?: readonly TypographistRules<Locale | TCustomLocale>[]

      Replaces the bundled hyphenation plugins when supplied; each locale must be unique.

    • Optional ReadonlytextLocales?: readonly TextLocale<Locale | TCustomLocale>[]

      Additional typography-only locales; defaults apply available text capabilities.

    • Optional ReadonlytextRules?: readonly TextRule[]

      Symbolic text rules prepared once per locale, independently of hyphenation data.

    • Optional ReadonlyunsupportedLocale?: "preserve" | "throw"

      Unregistered locales throw by default; preserve returns the exact source text instead.

    • Optional ReadonlyuseFast?: boolean

      Selects heuristic Khristov hyphenation when true; false or omitted selects Knuth–Liang.