Skip to content

Commit 6a63a03

Browse files
committed
Fix Action advertise types
1 parent 4145d04 commit 6a63a03

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

build/core/Action.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ declare class Action<TGoal, TFeedback, TResult> extends EventEmitter2 {
1919
name: string;
2020
actionType: string;
2121
isAdvertised: boolean;
22-
_actionCallback: ((request: ActionGoal<TGoal>, response: any) => any) | null;
22+
_actionCallback: ((goal: TGoal, response: any) => any) | null;
2323
_cancelCallback: any;
2424
/**
2525
* @callback sendGoalResultCallback
@@ -52,7 +52,7 @@ declare class Action<TGoal, TFeedback, TResult> extends EventEmitter2 {
5252
cancelGoal(id: string): void;
5353
/**
5454
* @callback advertiseCallback
55-
* @param {ActionGoal<TGoal>} request - The action goal.
55+
* @param {TGoal} goal - The action goal.
5656
* @param {Object} response - An empty dictionary. Take care not to overwrite this. Instead, only modify the values within.
5757
* It should return true if the action has finished successfully,
5858
* i.e., without any fatal errors.
@@ -63,7 +63,7 @@ declare class Action<TGoal, TFeedback, TResult> extends EventEmitter2 {
6363
*
6464
* @param {advertiseCallback} callback - This works similarly to the callback for a C++ action.
6565
*/
66-
advertise(callback: (request: ActionGoal<TGoal>, response: any) => any): void;
66+
advertise(callback: (goal: TGoal, response: any) => any): void;
6767
/**
6868
* Unadvertise a previously advertised action.
6969
*/
@@ -103,6 +103,5 @@ declare class Action<TGoal, TFeedback, TResult> extends EventEmitter2 {
103103
import EventEmitter2_1 = require("eventemitter2");
104104
import EventEmitter2 = EventEmitter2_1.EventEmitter2;
105105
import Ros = require("../core/Ros");
106-
import ActionGoal = require("./ActionGoal");
107106
import ActionFeedback = require("./ActionFeedback");
108107
import ActionResult = require("./ActionResult");

build/roslib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20066,7 +20066,7 @@ var Action = /** @class */ (function (_super) {
2006620066
};
2006720067
/**
2006820068
* @callback advertiseCallback
20069-
* @param {ActionGoal<TGoal>} request - The action goal.
20069+
* @param {TGoal} goal - The action goal.
2007020070
* @param {Object} response - An empty dictionary. Take care not to overwrite this. Instead, only modify the values within.
2007120071
* It should return true if the action has finished successfully,
2007220072
* i.e., without any fatal errors.

src/core/Action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Action extends EventEmitter2 {
105105

106106
/**
107107
* @callback advertiseCallback
108-
* @param {ActionGoal<TGoal>} request - The action goal.
108+
* @param {TGoal} goal - The action goal.
109109
* @param {Object} response - An empty dictionary. Take care not to overwrite this. Instead, only modify the values within.
110110
* It should return true if the action has finished successfully,
111111
* i.e., without any fatal errors.

0 commit comments

Comments
 (0)