import { Config } from './config.js'; import { Nullable, Namon } from './types.js'; import { FirstName, LastName, Name, JsonName } from './name.js'; /** * The core component of this utility. * * This component is composed of five entities that make it easy to handle a * full name set: prefix, first name, middle name, last name, and suffix. * It is indeed intended for internal processes. However, it is understandable * that it might be needed at some point for additional purposes. For this reason, * it's made available. * * It is recommended to avoid using this class unless it is highly necessary or * a custom parser is used for uncommon use cases although this utility tries to * cover as many use cases as possible. * * Additionally, an optional configuration can be used to indicate some specific * behaviors related to that name handling. */ export declare class FullName { #private; /** * Creates a full name as it goes * @param options settings for additional features. */ constructor(options?: Partial); /** A snapshot of the configuration used to set up this full name. */ get config(): Config; /** The prefix part of the full name. */ get prefix(): Nullable; /** The first name part of the full name. */ get firstName(): FirstName; /** The last name part of the full name. */ get lastName(): LastName; /** The middle name part of the full name. */ get middleName(): Name[]; /** The suffix part of the full name. */ get suffix(): Nullable; /** Whether the full name is a single word name. */ get isMono(): boolean; /** * Parses a JSON name into a full name. * @param {JsonName} json parsable name element * @param {Config} config for additional features. */ static parse(json: JsonName, config?: Config): FullName; setPrefix(name: Nullable): FullName; setFirstName(name: string | FirstName): FullName; setLastName(name: string | LastName): FullName; setMiddleName(names: string[] | Name[]): FullName; setSuffix(name: Nullable): FullName; /** Returns true if a namon has been set. */ has(key: Namon | string): boolean; toString(): string; /** Returns an `Iterable` of existing `Name`s. */ toIterable(flat?: boolean): Iterable; /** Returns the default iterator for this name set (enabling for-of statements). */ [Symbol.iterator](): Iterator; } /** * A single word name or mononym. * * This is a special case of `FullName` that is used to represent mononyms. This contradicts * the original purpose of this library such as shaping and organizing name pieces accordingly. * * When enabled via `Config.mono`, this becomes the full name of a human. And as a single name, * most of the `Namefully` methods become irrelevant. */ export declare class Mononym extends FullName { #private; /** * Constructs a mononym from a piece of string. * @param {string | Name} name to be used to construct the mononym. */ constructor(name: string | Name, options?: Partial); /** * Re-assigns which name type is being used to represent the mononym. * * Ideally, this doesn't really matter as the mononym is always a single piece of name. * When used as `string`, it must be a valid `Namon` type or else it will default to * `Namon.FIRST_NAME`. * @param {string | Namon} type of name to use. */ set type(type: string | Namon); /** The type of name being used to represent the mononym. */ get type(): Namon; /** The piece of string treated as a name. */ get value(): string; }