From ff4556d63398972b8f264fb35840d47a2b85580c Mon Sep 17 00:00:00 2001 From: rick Date: Tue, 20 Jan 2026 11:33:20 +0100 Subject: [PATCH] chore: set default type parameters to unknown in core classes --- packages/roslib/src/core/Service.ts | 5 ++++- packages/roslib/src/core/Topic.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/roslib/src/core/Service.ts b/packages/roslib/src/core/Service.ts index f8064ea0f..142857933 100644 --- a/packages/roslib/src/core/Service.ts +++ b/packages/roslib/src/core/Service.ts @@ -15,7 +15,10 @@ import { v4 as uuidv4 } from "uuid"; /** * A ROS service client. */ -export default class Service extends EventEmitter { +export default class Service< + TRequest = unknown, + TResponse = unknown, +> extends EventEmitter { /** * Stores a reference to the most recent service callback advertised so it can be removed from the EventEmitter during un-advertisement */ diff --git a/packages/roslib/src/core/Topic.ts b/packages/roslib/src/core/Topic.ts index 6d3344b9f..ffc37d810 100644 --- a/packages/roslib/src/core/Topic.ts +++ b/packages/roslib/src/core/Topic.ts @@ -22,7 +22,7 @@ import { v4 as uuidv4 } from "uuid"; * * 'warning' - If there are any warning during the Topic creation. * * 'message' - The message data from rosbridge. */ -export default class Topic extends EventEmitter<{ +export default class Topic extends EventEmitter<{ message: [T]; warning: [string]; unsubscribe: undefined;