mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
20 lines
332 B
TypeScript
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;
|
|
}
|
|
}
|