Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
on_close(callback: (x: any) => void): void {
this.kernel.channels
.pipe(
ofMessageType("comm_close"),
withCommId(this.comm_id)
)
.subscribe((msg: any) => {
callback(msg);
});
}
on_msg(callback: (x: any) => void): void {
this.kernel.channels
.pipe(
ofMessageType("comm_msg"),
withCommId(this.comm_id)
)
.subscribe((msg: any) => {
callback(msg);
});
}