diff --git a/test/types/main.ts b/test/types/main.ts index da9f32b9..40d3f4ba 100644 --- a/test/types/main.ts +++ b/test/types/main.ts @@ -21,6 +21,9 @@ rclnodejs.isShutdown(); // $ExpectType void rclnodejs.shutdown(); +// $ExpectType void +rclnodejs.removeSignalHandlers(); + // ---- DistroUtil ---- // $ExpectType DistroId diff --git a/types/index.d.ts b/types/index.d.ts index 77987ae1..b0e4dafe 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -144,6 +144,13 @@ declare module 'rclnodejs' { type: T ): MessageType; + /** + * Removes the default signal handler installed by rclnodejs. After calling this, rclnodejs + * will no longer clean itself up when a SIGINT is received, it is the application's + * responsibility to properly shut down all nodes and contexts. + */ + function removeSignalHandlers(): void; + /** * Get a list of action names and types for action clients associated with a node. * @param node - The node used for discovery.