From 1acdc07711b80caefe66415538c7c8bfdd21b1cb Mon Sep 17 00:00:00 2001 From: lars-pf Date: Tue, 9 Jan 2018 00:11:54 +0100 Subject: [PATCH] Minor fixes on roslib typings. (#22733) * Added missing function definition for Goal 'on'. The 'on' function is necessary to connect callback functions to events from ROS action goal 'timeout', 'status', 'feedback', 'result'. * Increased version number after minor extension * Changed datatype of 'end' param in to 'number'. The end time should be also transmitted as a number in seconds like time t. * Increased version number after minor fix. --- types/roslib/index.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/types/roslib/index.d.ts b/types/roslib/index.d.ts index 5ba27f27b2..fb5e886c66 100644 --- a/types/roslib/index.d.ts +++ b/types/roslib/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for roslib.js 0.18.0 +// Type definitions for roslib.js 0.18.2 // Project: http://wiki.ros.org/roslibjs // Definitions by: Stefan Profanter , Cooper Benson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -58,7 +58,7 @@ declare namespace ROSLIB { * @param level - User level as a string given by the client. * @param end - End time of the client's session. */ - authenticate(mac:string, client:string, dest:string, rand:string, t:number, level:string, end:string):void; + authenticate(mac:string, client:string, dest:string, rand:string, t:number, level:string, end:number):void; /** @@ -417,6 +417,14 @@ declare namespace ROSLIB { goalMessage: any }); + /** + * Connect callback functions to goal based events + * + * @param eventName Name of event ('timeout', 'status', 'feedback', 'result') + * @param callback Callback function executed on connected event + */ + on(eventName:string, callback:(event:any) => void):void; + /** * Send the goal to the action server. *