Skip to content

Commit 35df9c1

Browse files
authored
Get rid of an any (#8114)
1 parent de4e336 commit 35df9c1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

webviews/components/sidebar.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,14 @@ function CollapsedLabel(props: PullRequest) {
288288
</span>
289289
);
290290

291-
const PillContainer = ({ items, getKey, getColor, getText }: {
292-
items: any[],
293-
getKey: (item: any) => string,
294-
getColor: (item: any) => { backgroundColor: string; textColor: string; borderColor: string },
295-
getText: (item: any) => string
296-
}) => {
291+
interface PillContainerProps<T> {
292+
items: T[];
293+
getKey: (item: T) => string;
294+
getColor: (item: T) => { backgroundColor: string; textColor: string; borderColor: string };
295+
getText: (item: T) => string;
296+
}
297+
298+
const PillContainer = <T,>({ items, getKey, getColor, getText }: PillContainerProps<T>) => {
297299
const containerRef = useRef<HTMLSpanElement>(null);
298300
const [visibleCount, setVisibleCount] = useState(items.length);
299301

0 commit comments

Comments
 (0)