@@ -13,15 +13,11 @@ import { Title } from './title'
1313jest . mock ( 'vscode' )
1414
1515const mockedShowQuickPick = jest . mocked <
16- (
17- items : QuickPickItemWithValue [ ] ,
16+ < T > (
17+ items : QuickPickItemWithValue < T > [ ] ,
1818 options : QuickPickOptionsWithTitle
1919 ) => Thenable <
20- | QuickPickItemWithValue [ ]
21- | QuickPickItemWithValue
22- | string
23- | undefined
24- | unknown
20+ QuickPickItemWithValue < T > [ ] | QuickPickItemWithValue < T > | string | undefined
2521 >
2622> ( window . showQuickPick )
2723
@@ -31,7 +27,9 @@ beforeEach(() => {
3127
3228describe ( 'quickPickValue' , ( ) => {
3329 it ( 'should call window.showQuickPick with the correct arguments' , async ( ) => {
34- mockedShowQuickPick . mockResolvedValueOnce ( { value : 'c' } as unknown )
30+ mockedShowQuickPick . mockResolvedValueOnce ( {
31+ value : 'c'
32+ } as QuickPickItemWithValue )
3533 const placeHolder = 'these letters are very important'
3634 const title = 'Choose a letter, any letter...' as Title
3735 const items = [
@@ -69,7 +67,7 @@ describe('quickPickManyValues', () => {
6967 mockedShowQuickPick . mockResolvedValueOnce ( [
7068 { value : 'b' } ,
7169 { value : 'c' }
72- ] as unknown [ ] )
70+ ] as QuickPickItemWithValue [ ] )
7371 const placeHolder = 'these letters are very important'
7472 const title = 'Choose a letter, any letter...' as Title
7573 const items = [
@@ -126,7 +124,7 @@ describe('quickPickYesOrNo', () => {
126124 description : yesDescription ,
127125 label : Response . YES ,
128126 value : true
129- }
127+ } as QuickPickItemWithValue < boolean >
130128 const noDescription = 'me'
131129 mockedShowQuickPick . mockResolvedValueOnce ( yesItem )
132130
0 commit comments