Skip to content

Commit 1410c66

Browse files
authored
chore: fix ts (#231)
1 parent e578bda commit 1410c66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function RawList<T>(props: ListProps<T>, ref: React.Ref<ListRef>) {
134134
if (typeof itemKey === 'function') {
135135
return itemKey(item);
136136
}
137-
return item?.[itemKey];
137+
return item?.[itemKey as string];
138138
},
139139
[itemKey],
140140
);

src/utils/CacheMap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class CacheMap {
1313
}
1414

1515
set(key: React.Key, value: number) {
16-
this.maps[key] = value;
16+
this.maps[key as string] = value;
1717
this.id += 1;
1818
}
1919

2020
get(key: React.Key) {
21-
return this.maps[key];
21+
return this.maps[key as string];
2222
}
2323
}
2424

0 commit comments

Comments
 (0)