@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.
55 lines (54 loc) • 1.62 kB
TypeScript
import { type Affix } from "../../affix/index.js";
import { type AffixualAdjunctScope } from "./scope.js";
export * from "./scope.js";
/**
* An affixual adjunct.
*
* @example
* ;({ affixes: [{ type: 2, degree: 7, cs: "c" }] })
*
* @example
* ;({
* affixes: [{ type: 2, degree: 7, cs: "c" }],
* scope: "VII:DOM",
* appliesToConcatenatedStemOnly: true,
* })
*/
export type AffixualAdjunct = {
/** The affixes that are part of this adjunct. */
readonly affixes: readonly [Affix, ...Affix[]];
/**
* Scope of first affix. Also controls scope of 2nd and subsequent affixes
* when `scope2` is omitted.
*
* @default "V:DOM"
*/
readonly scope?: AffixualAdjunctScope | undefined;
/**
* Scope of 2nd and subsequent affixes. Defaults to the value of `scope` in
* this affixual adjunct.
*/
readonly scope2?: AffixualAdjunctScope | undefined;
/**
* `true` if adjunct applies only to concatenated stem. `false` if adjunct
* applies to formative as a whole.
*
* @default false
*/
readonly appliesToConcatenatedStemOnly?: boolean | undefined;
};
/**
* Converts an affixual adjunct into Ithkuil.
*
* @example
* affixualAdjunctToIthkuil({
* affixes: [{ type: 2, degree: 7, cs: "c" }],
* scope: "VII:DOM",
* appliesToConcatenatedStemOnly: true,
* })
* // "oicé"
*
* @param adjunct The affixual adjunct to be converted.
* @returns Romanized Ithkuilic text representing the affixual adjunct.
*/
export declare function affixualAdjunctToIthkuil(adjunct: AffixualAdjunct): string;