5
5
6
6
7
7
export const commands = {
8
- async openInput ( name : string ) : Promise < void > {
9
- await TAURI_INVOKE ( "plugin:midi|open_input" , { name } ) ;
8
+ async openInput ( id : string ) : Promise < null > {
9
+ return await TAURI_INVOKE ( "plugin:midi|open_input" , { id } ) ;
10
10
} ,
11
- async closeInput ( name : string ) : Promise < void > {
12
- await TAURI_INVOKE ( "plugin:midi|close_input" , { name } ) ;
11
+ async closeInput ( id : string ) : Promise < void > {
12
+ await TAURI_INVOKE ( "plugin:midi|close_input" , { id } ) ;
13
13
} ,
14
- async openOutput ( name : string ) : Promise < void > {
15
- await TAURI_INVOKE ( "plugin:midi|open_output" , { name } ) ;
14
+ async openOutput ( id : string ) : Promise < null > {
15
+ return await TAURI_INVOKE ( "plugin:midi|open_output" , { id } ) ;
16
16
} ,
17
- async closeOutput ( name : string ) : Promise < void > {
18
- await TAURI_INVOKE ( "plugin:midi|close_output" , { name } ) ;
17
+ async closeOutput ( id : string ) : Promise < void > {
18
+ await TAURI_INVOKE ( "plugin:midi|close_output" , { id } ) ;
19
19
} ,
20
- async outputSend ( name : string , msg : number [ ] ) : Promise < void > {
21
- await TAURI_INVOKE ( "plugin:midi|output_send" , { name , msg } ) ;
20
+ async outputSend ( id : string , msg : number [ ] ) : Promise < null > {
21
+ return await TAURI_INVOKE ( "plugin:midi|output_send" , { id , msg } ) ;
22
22
}
23
23
}
24
24
@@ -40,7 +40,7 @@ stateChange: "plugin:midi:state-change"
40
40
/** user-defined types **/
41
41
42
42
export type MIDIMessage = [ string , number [ ] ]
43
- export type StateChange = { inputs : string [ ] ; outputs : string [ ] }
43
+ export type StateChange = { inputs : ( [ string , string ] ) [ ] ; outputs : ( [ string , string ] ) [ ] }
44
44
45
45
/** tauri-specta globals **/
46
46
0 commit comments