@@ -8,30 +8,24 @@ async function main() {
88 const session = await connectAnonymous ( "ws://localhost:8080/ws" , "realm1" ) ;
99
1010 // Call procedure "io.xconn.echo" with args and kwargs
11- const result : Result = await session . call ( testProcedureEcho , {
12- args : [ "hello" , "world" ] ,
13- kwargs : { key : "value" } ,
14- } ) ;
11+ const result : Result = await session . call ( testProcedureEcho , [ "hello" , "world" ] , { key : "value" } ) ;
1512 console . log ( `Result of procedure '${ testProcedureEcho } ': args=${ result . args } , kwargs=${ result . kwargs } ` ) ;
1613
1714 // Call with only args
18- await session . call ( testProcedureEcho , { args : [ "hello" , "world" ] } ) ;
15+ await session . call ( testProcedureEcho , [ "hello" , "world" ] ) ;
1916
2017 // Call with only kwargs
21- await session . call ( testProcedureEcho , { kwargs : { name : "john" } } ) ;
18+ await session . call ( testProcedureEcho , [ ] , { name : "john" } ) ;
2219
2320 // Call with both args and kwargs
24- await session . call ( testProcedureEcho , { args : [ 1 , 2 ] , kwargs : { name : "john" } } ) ;
21+ await session . call ( testProcedureEcho , [ 1 , 2 ] , { name : "john" } ) ;
2522
2623 // Call procedure "io.xconn.async.echo" with args and kwargs
27- const resultAsync : Result = await session . call ( testProcedureAsyncEcho , {
28- args : [ "hello" , "xconn" ] ,
29- kwargs : { key : "value" } ,
30- } ) ;
24+ const resultAsync : Result = await session . call ( testProcedureAsyncEcho , [ "hello" , "xconn" ] , { key : "value" } ) ;
3125 console . log ( `Result of procedure '${ testProcedureAsyncEcho } ': args=${ resultAsync . args } , kwargs=${ resultAsync . kwargs } ` ) ;
3226
3327 // Call sum procedure and print result
34- const sumResult : Result = await session . call ( testProcedureSum , { args : [ 2 , 2 , 6 ] } ) ;
28+ const sumResult : Result = await session . call ( testProcedureSum , [ 2 , 2 , 6 ] ) ;
3529 console . log ( `Sum=${ sumResult . args ?. [ 0 ] } ` ) ;
3630
3731 await session . close ( ) ;
0 commit comments