Some problems with ClearRefinements in TS

Hey :wave:

Following the docs for ClearRefinement, but getting a TS error using the example code:

Argument of type 'Refinement[]' is not assignable to parameter of type 'RefinementValue | RefinementValue[]'.

for refine(items) in

import { Button } from '@material-ui/core';
import React from 'react';
import { connectCurrentRefinements, CurrentRefinementsProvided } from 'react-instantsearch-core';

interface Props {}

export const ClearRefinements: React.FC<Props & CurrentRefinementsProvided> = ({ refine, items }) => {
  return (
      onClick={() => {
      title={'Clear all filters'}

export const CustomClearRefinements = connectCurrentRefinements(ClearRefinements);

Replacing onClick with

onClick={() => {
        refine( => item.value));

allows for compilation, pointing to an error in the docs, not the typings. However, this leads me to this next error:

Temp solution to work around the typings issue: refine((items as unknown) as RefinementValue[]);