Skip to content

Commit 6b58103

Browse files
committed
change string interpolation to direct number
1 parent bab25ae commit 6b58103

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/OnyxSnapshotCache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class OnyxSnapshotCache {
1515
/**
1616
* Maps selector functions to unique IDs for cache key generation
1717
*/
18-
private selectorIdMap: Map<UseOnyxSelector<OnyxKey, unknown>, string>;
18+
private selectorIdMap: Map<UseOnyxSelector<OnyxKey, unknown>, number>;
1919

2020
/**
2121
* Counter for generating incremental selector IDs
@@ -31,10 +31,10 @@ class OnyxSnapshotCache {
3131
/**
3232
* Generate unique ID for selector functions using incrementing numbers
3333
*/
34-
getSelectorId<TKey extends OnyxKey, TReturnValue>(selector: UseOnyxSelector<TKey, TReturnValue>): string {
34+
getSelectorId<TKey extends OnyxKey, TReturnValue>(selector: UseOnyxSelector<TKey, TReturnValue>): number {
3535
const typedSelector = selector as unknown as UseOnyxSelector<OnyxKey, unknown>;
3636
if (!this.selectorIdMap.has(typedSelector)) {
37-
const id = `selector_${this.selectorIdCounter++}`;
37+
const id = this.selectorIdCounter++;
3838
this.selectorIdMap.set(typedSelector, id);
3939
}
4040
return this.selectorIdMap.get(typedSelector)!;

0 commit comments

Comments
 (0)