Skip to content

Commit cbca83c

Browse files
ikwilnaarhuismanrick
andauthored
chore: set default type parameters to unknown in core classes (#1144)
Co-authored-by: rick <rick@rick.rick>
1 parent 7cb81e2 commit cbca83c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/roslib/src/core/Service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import { v4 as uuidv4 } from "uuid";
1515
/**
1616
* A ROS service client.
1717
*/
18-
export default class Service<TRequest, TResponse> extends EventEmitter {
18+
export default class Service<
19+
TRequest = unknown,
20+
TResponse = unknown,
21+
> extends EventEmitter {
1922
/**
2023
* Stores a reference to the most recent service callback advertised so it can be removed from the EventEmitter during un-advertisement
2124
*/

packages/roslib/src/core/Topic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { v4 as uuidv4 } from "uuid";
2222
* * 'warning' - If there are any warning during the Topic creation.
2323
* * 'message' - The message data from rosbridge.
2424
*/
25-
export default class Topic<T> extends EventEmitter<{
25+
export default class Topic<T = unknown> extends EventEmitter<{
2626
message: [T];
2727
warning: [string];
2828
unsubscribe: undefined;

0 commit comments

Comments
 (0)