@@ -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 }
@@ -116,7 +116,7 @@ describe('<Typeahead>', () => {
116116 } ) ;
117117
118118 it ( 'truncates selections when using `defaultSelected`' , ( ) => {
119- let selected : Option [ ] = states . slice ( 0 , 4 ) ;
119+ let selected : TestOption [ ] = states . slice ( 0 , 4 ) ;
120120 render (
121121 < Default defaultSelected = { selected } >
122122 { ( state ) => {
@@ -411,7 +411,7 @@ describe('<Typeahead>', () => {
411411
412412 describe ( 'updates when re-rendering with new props' , ( ) => {
413413 it ( 'acts as a controlled input in single-select mode' , ( ) => {
414- let selected : Option [ ] = [ ] ;
414+ let selected : TestOption [ ] = [ ] ;
415415
416416 const children = ( state ) => {
417417 selected = state . selected ;
@@ -459,7 +459,7 @@ describe('<Typeahead>', () => {
459459 } ) ;
460460
461461 it ( 'updates the selections and input value in single-select mode' , async ( ) => {
462- let selected : Option [ ] = [ ] ;
462+ let selected : TestOption [ ] = [ ] ;
463463 const user = userEvent . setup ( ) ;
464464
465465 render (
@@ -1145,7 +1145,7 @@ describe('<Typeahead>', () => {
11451145 } ) ;
11461146
11471147 it ( 'adds the custom option when `allowNew` is set to `true`' , async ( ) => {
1148- let selected : Option [ ] = [ ] ;
1148+ let selected : TestOption [ ] = [ ] ;
11491149 const user = userEvent . setup ( ) ;
11501150
11511151 render (
0 commit comments