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