diff --git a/src/types/TupleKey.ts b/src/types/TupleKey.ts new file mode 100644 index 0000000..08dcfb4 --- /dev/null +++ b/src/types/TupleKey.ts @@ -0,0 +1,19 @@ +const separator = "|"; + +export class TupleKey { + 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; + } +}