Files
project-inter-server/src/types/TupleKey.ts
2025-01-29 16:57:00 -08:00

20 lines
332 B
TypeScript

const separator = "|";
export class TupleKey<T extends any[]> {
public readonly tuple: T;
private readonly strKey: string;
constructor(...tuple: T) {
this.tuple = tuple;
this.strKey = tuple.join(separator);
}
toString(): string {
return this.strKey;
}
valueOf(): string {
return this.strKey;
}
}