@@ -23,7 +23,7 @@ import {
23
23
waitFor ,
24
24
} from '../../tests/helpers' ;
25
25
26
- import states , { Option } from '../../tests/data' ;
26
+ import states , { TestOption } from '../../tests/data' ;
27
27
28
28
const ID = 'rbt-id' ;
29
29
@@ -37,7 +37,7 @@ const inputProps = {
37
37
type : 'number' ,
38
38
} ;
39
39
40
- const TestComponent = forwardRef < Typeahead , Partial < TypeaheadComponentProps > > (
40
+ const TestComponent = forwardRef < Typeahead < TestOption > , Partial < TypeaheadComponentProps < TestOption > > > (
41
41
( props , ref ) => (
42
42
< TypeaheadComponent
43
43
id = { ID }
@@ -115,7 +115,7 @@ describe('<Typeahead>', () => {
115
115
} ) ;
116
116
117
117
it ( 'truncates selections when using `defaultSelected`' , ( ) => {
118
- let selected : Option [ ] = states . slice ( 0 , 4 ) ;
118
+ let selected : TestOption [ ] = states . slice ( 0 , 4 ) ;
119
119
render (
120
120
< Default defaultSelected = { selected } >
121
121
{ ( state ) => {
@@ -410,7 +410,7 @@ describe('<Typeahead>', () => {
410
410
411
411
describe ( 'updates when re-rendering with new props' , ( ) => {
412
412
it ( 'acts as a controlled input in single-select mode' , ( ) => {
413
- let selected : Option [ ] = [ ] ;
413
+ let selected : TestOption [ ] = [ ] ;
414
414
415
415
const children = ( state ) => {
416
416
selected = state . selected ;
@@ -458,7 +458,7 @@ describe('<Typeahead>', () => {
458
458
} ) ;
459
459
460
460
it ( 'updates the selections and input value in single-select mode' , async ( ) => {
461
- let selected : Option [ ] = [ ] ;
461
+ let selected : TestOption [ ] = [ ] ;
462
462
const user = userEvent . setup ( ) ;
463
463
464
464
render (
@@ -1121,7 +1121,7 @@ describe('<Typeahead>', () => {
1121
1121
} ) ;
1122
1122
1123
1123
it ( 'adds the custom option when `allowNew` is set to `true`' , async ( ) => {
1124
- let selected : Option [ ] = [ ] ;
1124
+ let selected : TestOption [ ] = [ ] ;
1125
1125
const user = userEvent . setup ( ) ;
1126
1126
1127
1127
render (
0 commit comments