Socket
Socket
Sign inDemoInstall

@phosphor/signaling

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phosphor/signaling - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

24

lib/index.d.ts

@@ -211,2 +211,26 @@ /**

function clearData(object: any): void;
/**
* A type alias for the exception handler function.
*/
type ExceptionHandler = (err: Error) => void;
/**
* Get the signal exception handler.
*
* @returns The current exception handler.
*
* #### Notes
* The default exception handler is `console.error`.
*/
function getExceptionHandler(): ExceptionHandler;
/**
* Set the signal exception handler.
*
* @param handler - The function to use as the exception handler.
*
* @returns The old exception handler.
*
* #### Notes
* The exception handler is invoked when a slot throws an exception.
*/
function setExceptionHandler(handler: ExceptionHandler): ExceptionHandler;
}

34

lib/index.js

@@ -181,2 +181,30 @@ "use strict";

Signal.clearData = clearData;
/**
* Get the signal exception handler.
*
* @returns The current exception handler.
*
* #### Notes
* The default exception handler is `console.error`.
*/
function getExceptionHandler() {
return Private.exceptionHandler;
}
Signal.getExceptionHandler = getExceptionHandler;
/**
* Set the signal exception handler.
*
* @param handler - The function to use as the exception handler.
*
* @returns The old exception handler.
*
* #### Notes
* The exception handler is invoked when a slot throws an exception.
*/
function setExceptionHandler(handler) {
var old = Private.exceptionHandler;
Private.exceptionHandler = handler;
return old;
}
Signal.setExceptionHandler = setExceptionHandler;
})(Signal = exports.Signal || (exports.Signal = {}));

@@ -190,2 +218,6 @@ exports.Signal = Signal;

/**
* The signal exception handler function.
*/
Private.exceptionHandler = console.error;
/**
* Connect a slot to a signal.

@@ -446,3 +478,3 @@ *

catch (err) {
console.error(err);
Private.exceptionHandler(err);
}

@@ -449,0 +481,0 @@ }

2

package.json
{
"name": "@phosphor/signaling",
"version": "1.0.0",
"version": "1.1.0",
"description": "PhosphorJS - Signals and Slots",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc