interface DescriptionTemplateValues { readonly [parameter: string]: string; } export { DescriptionTemplateValues }; /** * Stores a description of a value. * Provides methods for accessing the description in various ways. */ export default class Description { readonly template: string; /** * Creates a description. * Example inputs: "The node id was #[123]#{id} and it sent #[1234 XRP]#{amount}". * * @param template - A description string that contains the template inside it. */ constructor(template: string); /** * Returns just the template from the description/template string. * * Example: "The node id was #[123]#{id} and it sent #[1234 XRP]#{amount}" => "The node id was #{id} and it sent #{amount}". * * @returns The template of the description string. */ getTemplate(): string; /** * Returns just the description from the description/template string. * * Example: "The node id was #[123]#{id} and it sent #[1234 XRP]#{amount}" => "The node id was 123 and it sent 1234 XRP". * * @returns The description. */ getDescription(): string; /** * Calculates the values of the template. * * Example: "The node id was #[123]#{id} and it sent #[1234 XRP]#{amount}" => { id: "123", amount: "1234 XRP" }. * * @returns A dictionary mapping template parameter name to the template value. */ getTemplateValues(): DescriptionTemplateValues; /** * Returns the description as an array of strings. * * Example: "The node id was #[123]#{id} and it sent #[1234 XRP]#{amount}" => [ * { value: "The node id was " }, * { value: "123", parameterName: "id" }, * { value: " and it sent " }, * { value: "1234 XRP", parameterName: "amount" }, * ]. * * @returns The description as an array of strings. */ toArray(): Array<{ readonly value: string; readonly parameterName?: string; }>; } //# sourceMappingURL=description.d.ts.map