@@ -23,7 +23,7 @@ import {
2323 waitFor ,
2424} from '../../tests/helpers' ;
2525
26- import states , { Option } from '../../tests/data' ;
26+ import states , { TestOption } from '../../tests/data' ;
2727
2828const ID = 'rbt-id' ;
2929
@@ -37,7 +37,7 @@ const inputProps = {
3737 type : 'number' ,
3838} ;
3939
40- const TestComponent = forwardRef < Typeahead , Partial < TypeaheadComponentProps > > (
40+ const TestComponent = forwardRef < Typeahead < TestOption > , Partial < TypeaheadComponentProps < TestOption > > > (
4141 ( props , ref ) => (
4242 < TypeaheadComponent
4343 id = { ID }
@@ -115,7 +115,7 @@ describe('<Typeahead>', () => {
115115 } ) ;
116116
117117 it ( 'truncates selections when using `defaultSelected`' , ( ) => {
118- let selected : Option [ ] = states . slice ( 0 , 4 ) ;
118+ let selected : TestOption [ ] = states . slice ( 0 , 4 ) ;
119119 render (
120120 < Default defaultSelected = { selected } >
121121 { ( state ) => {
@@ -410,7 +410,7 @@ describe('<Typeahead>', () => {
410410
411411 describe ( 'updates when re-rendering with new props' , ( ) => {
412412 it ( 'acts as a controlled input in single-select mode' , ( ) => {
413- let selected : Option [ ] = [ ] ;
413+ let selected : TestOption [ ] = [ ] ;
414414
415415 const children = ( state ) => {
416416 selected = state . selected ;
@@ -458,7 +458,7 @@ describe('<Typeahead>', () => {
458458 } ) ;
459459
460460 it ( 'updates the selections and input value in single-select mode' , async ( ) => {
461- let selected : Option [ ] = [ ] ;
461+ let selected : TestOption [ ] = [ ] ;
462462 const user = userEvent . setup ( ) ;
463463
464464 render (
@@ -1121,7 +1121,7 @@ describe('<Typeahead>', () => {
11211121 } ) ;
11221122
11231123 it ( 'adds the custom option when `allowNew` is set to `true`' , async ( ) => {
1124- let selected : Option [ ] = [ ] ;
1124+ let selected : TestOption [ ] = [ ] ;
11251125 const user = userEvent . setup ( ) ;
11261126
11271127 render (
0 commit comments