add TupleKey method to convert string key back to tuple

This commit is contained in:
2025-02-12 19:39:37 -08:00
parent bb77aca4ed
commit c1ec50db7b
2 changed files with 20 additions and 1 deletions

View File

@@ -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);
}
}