mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
[@types/roslib] Add missing options to main constructor. (#39228)
* Add missing options to main constructor in roslib. Newer versions of roslib have more options to the constructor. * Update types/roslib/index.d.ts Co-Authored-By: Cooper Benson <skycoop@gmail.com> * Update types/roslib/index.d.ts Co-Authored-By: Cooper Benson <skycoop@gmail.com>
This commit is contained in:
committed by
Wesley Wigham
co-authored by
Cooper Benson
parent
940bf3a63d
commit
d60ce5eeb1
Vendored
+11
-3
@@ -1,9 +1,11 @@
|
||||
// Type definitions for roslib.js 0.18.2
|
||||
// Type definitions for roslib.js 1.0.1
|
||||
// Project: http://wiki.ros.org/roslibjs
|
||||
// Definitions by: Stefan Profanter <https://github.com/Pro>,
|
||||
// Cooper Benson <https://github.com/skycoop>,
|
||||
// David Gonzalez <https://github.com/dgorobopec>
|
||||
// Arvid Norlander <https://github.com/VorpalBlade>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
|
||||
/* ----------------------------------
|
||||
@@ -29,10 +31,16 @@ declare namespace ROSLIB {
|
||||
*
|
||||
* @constructor
|
||||
* @param options - possible keys include:
|
||||
* * url (optional) - the WebSocket URL for rosbridge (can be specified later with `connect`)
|
||||
* * url (optional) - (can be specified later with `connect`) the WebSocket URL for rosbridge or the node server url to connect using socket.io (if socket.io exists in the page) <br>
|
||||
* * groovyCompatibility - don't use interfaces that changed after the last groovy release or rosbridge_suite and related tools (defaults to true)
|
||||
* * transportLibrary (optional) - one of 'websocket' (default), 'socket.io' or RTCPeerConnection instance controlling how the connection is created in `connect`.
|
||||
* * transportOptions (optional) - the options to use use when creating a connection. Currently only used if `transportLibrary` is RTCPeerConnection.
|
||||
*/
|
||||
constructor(options:{
|
||||
url?: string
|
||||
url?: string,
|
||||
groovyCompatibility?: boolean,
|
||||
transportLibrary?: 'websocket' | 'socket.io' | RTCPeerConnection,
|
||||
transportOptions?: RTCDataChannelInit
|
||||
});
|
||||
|
||||
on(eventName:string, callback:(event:any) => void):void;
|
||||
|
||||
Reference in New Issue
Block a user