andrade-soulseek-downloader
Version:
Simple, safe Soulseek download library with built-in rate limiting to prevent bans
30 lines • 928 B
TypeScript
/**
* Value object representing a unique track identifier.
* Immutable and self-validating.
*/
export declare class TrackId {
private readonly value;
/**
* @param value - The unique identifier string
* @throws {Error} If value is empty or invalid
*/
constructor(value: string);
/**
* Factory method to generate ID from user and file path.
* @param user - Soulseek username
* @param filePath - Path to the file
* @returns New TrackId instance
*/
static generate(user: string, filePath: string): TrackId;
/** @returns The underlying string value */
getValue(): string;
/**
* Value equality comparison.
* @param other - TrackId to compare with
* @returns True if values are equal
*/
equals(other: TrackId): boolean;
/** @returns String representation of the ID */
toString(): string;
}
//# sourceMappingURL=track-id.d.ts.map