@zsnout/ithkuil
Version:
A set of tools which can generate and parse romanized Ithkuil text and which can generate Ithkuil script from text and JSON data.
56 lines (55 loc) • 1.68 kB
TypeScript
/**
* Converts text into something that can be used in a gloss string by making
* everything lowercase and changing spaces to underscores.
*
* @param text The text to be modified.
* @returns The modified text.
*/
export declare function asGloss(text: string): string;
/** A glossed string. */
export declare class GlossString {
/** The short form of the gloss. */
readonly short: string;
/** The long form of the gloss. */
readonly full: string;
/**
* Constructs a `GlossString` where both components have the same text.
*
* @param text The text of the `GlossString`.
* @returns The constructed `GlossString`.
*/
static of(text: string): GlossString;
constructor(
/** The short form of the gloss. */
short: string,
/** The long form of the gloss. */
full: string);
/**
* Checks if this GlossString is empty.
*
* @returns Whether this GlossString is empty or not.
*/
isEmpty(): boolean;
/**
* Concatenates this GlossString with another.
*
* @param other The other GlossString to add.
* @returns The new GlossString.
*/
plusGloss(other: GlossString): GlossString;
/**
* Concatenates this GlossString with plain text.
*
* @param other The text to add.
* @returns The new GlossString.
*/
plusString(other: string): GlossString;
/**
* Concatenates this GlossString with a short component and a full component.
*
* @param short The short form to add.
* @param full The full form to add.
* @returns The new GlossString.
*/
plusStrings(short: string, full: string): GlossString;
}