Typographist
    Preparing search index...

    Type Alias LanguageRules<TLocale>

    Shared locale data validated when rules are registered with Typographist.

    type LanguageRules<TLocale extends string = string> = {
        alphabet: string;
        exceptions?: readonly { positions: readonly number[]; word: string }[];
        leftMin: number;
        locale: TLocale;
        rightMin: number;
    }

    Type Parameters

    • TLocale extends string = string
    Index
    alphabet: string

    Nonempty set of supported Unicode code points after word normalization to NFC and lowercase.

    exceptions?: readonly { positions: readonly number[]; word: string }[]

    Exceptions that take precedence over algorithm suggestions, with the same grapheme minima applied.

    leftMin: number

    Minimum original graphemes before a break; must be a positive safe integer.

    locale: TLocale

    Registration key, matched case-insensitively without region fallback.

    rightMin: number

    Minimum original graphemes after a break; must be a positive safe integer.