File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,8 @@ const actionServer = new rclnodejs.ActionServer(
390390 node ,
391391 'example_interfaces/action/Fibonacci' ,
392392 'fibonacci' ,
393- executeCallback
393+ executeCallback ,
394+ goalCallback
394395) ;
395396expectType < rclnodejs . ActionServer < 'example_interfaces/action/Fibonacci' > > (
396397 actionServer
@@ -403,6 +404,13 @@ expectType<void>(
403404) ;
404405expectType < void > ( actionServer . destroy ( ) ) ;
405406
407+ function goalCallback (
408+ goal : rclnodejs . ActionGoal < 'example_interfaces/action/Fibonacci' >
409+ ) : rclnodejs . GoalResponse {
410+ expectType < number > ( goal . order ) ;
411+ return rclnodejs . GoalResponse . ACCEPT ;
412+ }
413+
406414function executeCallback (
407415 goalHandle : rclnodejs . ServerGoalHandle < 'example_interfaces/action/Fibonacci' >
408416) {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ declare module 'rclnodejs' {
7878 goalHandle : ServerGoalHandle < T >
7979 ) => Promise < ActionResult < T > > | ActionResult < T > ;
8080 type GoalCallback < T extends TypeClass < ActionTypeClassName > > = (
81- goalHandle : ServerGoalHandle < T >
81+ goal : ActionGoal < T >
8282 ) => GoalResponse ;
8383 type HandleAcceptedCallback < T extends TypeClass < ActionTypeClassName > > = (
8484 goalHandle : ServerGoalHandle < T >
You can’t perform that action at this time.
0 commit comments