mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
add TupleKey method to convert string key back to tuple
This commit is contained in:
@@ -16,4 +16,9 @@ export class TupleKey<T extends any[]> {
|
||||
valueOf(): string {
|
||||
return this.strKey;
|
||||
}
|
||||
|
||||
static fromExistingStringKey(strKey: string) {
|
||||
const tuple = strKey.split(separator);
|
||||
return new TupleKey(...tuple);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user