@memory-bank/mcp
Version:
Memory-enabled Co-Pilot (MCP) server for managing project documentation and context
68 lines • 1.9 kB
TypeScript
/**
* Language Domain Model
*
* Represents the concept of a language in the system with validation rules.
* Implements value object pattern - immutable and equality based on value.
*/
/**
* Supported language codes - can be extended as needed
*/
export type LanguageCode = 'en' | 'ja' | 'zh';
/**
* Language class represents a valid language in the system
*/
export declare class Language {
private readonly _code;
/**
* Constructor with validation
*
* @param code Language code to validate and create Language object
* @throws Error if language code is not supported
*/
constructor(code: string);
/**
* Gets the language code
*/
get code(): LanguageCode;
/**
* Creates a Language instance, validating the code
*
* @param code Language code to validate
* @returns Language instance
* @throws Error if language code is not supported
*/
static create(code: string): Language;
/**
* Creates a default Language instance (English)
*
* @returns Language instance for English
*/
static default(): Language;
/**
* Gets list of all supported language codes
*
* @returns Array of supported language codes
*/
static supportedLanguages(): LanguageCode[];
/**
* Validates if a language code is supported
*
* @param code Language code to validate
* @returns true if supported, false otherwise
*/
private isValidLanguageCode;
/**
* Compare equality with another Language object
*
* @param other Another Language object to compare
* @returns true if equal, false otherwise
*/
equals(other: Language | null | undefined): boolean;
/**
* Returns string representation
*
* @returns Language code as string
*/
toString(): string;
}
//# sourceMappingURL=Language.d.ts.map