Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/signals

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/signals - npm Package Compare versions

Comparing version 0.0.11-alpha to 0.0.12-alpha

176

index.d.ts

@@ -6,106 +6,108 @@ // Type definitions for JS-Signals

declare var signals: SignalWrapper;
declare var signals: signals.SignalWrapper;
declare module "signals" {
export = signals;
}
export = signals;
export as namespace signals;
interface SignalWrapper {
Signal: Signal
}
declare namespace signals {
interface SignalBinding {
active: boolean;
context: any;
params: any;
detach(): Function;
execute(paramsArr?:any[]): any;
getListener(): Function;
getSignal(): Signal;
isBound(): boolean;
isOnce(): boolean;
}
interface SignalWrapper {
Signal: Signal
}
interface Signal {
/**
* Custom event broadcaster
* <br />- inspired by Robert Penner's AS3 Signals.
* @name Signal
* @author Miller Medeiros
* @constructor
*/
new(): Signal;
interface SignalBinding {
active: boolean;
context: any;
params: any;
detach(): Function;
execute(paramsArr?: any[]): any;
getListener(): Function;
getSignal(): Signal;
isBound(): boolean;
isOnce(): boolean;
}
/**
* If Signal is active and should broadcast events.
*/
active: boolean;
interface Signal {
/**
* Custom event broadcaster
* <br />- inspired by Robert Penner's AS3 Signals.
* @name Signal
* @author Miller Medeiros
* @constructor
*/
new (): Signal;
/**
* If Signal should keep record of previously dispatched parameters and automatically
* execute listener during add()/addOnce() if Signal was already dispatched before.
*/
memorize: boolean;
/**
* If Signal is active and should broadcast events.
*/
active: boolean;
/**
* Signals Version Number
*/
VERSION: string;
/**
* If Signal should keep record of previously dispatched parameters and automatically
* execute listener during add()/addOnce() if Signal was already dispatched before.
*/
memorize: boolean;
/**
* Add a listener to the signal.
*
* @param listener Signal handler function.
* @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function).
* @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0)
*/
add(listener: Function, listenerContext?: any, priority?: Number): SignalBinding;
/**
* Signals Version Number
*/
VERSION: string;
/**
* Add listener to the signal that should be removed after first execution (will be executed only once).
*
* @param listener Signal handler function.
* @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function).
* @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0)
*/
addOnce(listener: Function, listenerContext?: any, priority?: Number): SignalBinding;
/**
* Add a listener to the signal.
*
* @param listener Signal handler function.
* @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function).
* @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0)
*/
add(listener: Function, listenerContext?: any, priority?: Number): SignalBinding;
/**
* Dispatch/Broadcast Signal to all listeners added to the queue.
*
* @param params Parameters that should be passed to each handler.
*/
dispatch(...params: any[]): void;
/**
* Add listener to the signal that should be removed after first execution (will be executed only once).
*
* @param listener Signal handler function.
* @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function).
* @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0)
*/
addOnce(listener: Function, listenerContext?: any, priority?: Number): SignalBinding;
/**
* Remove all bindings from signal and destroy any reference to external objects (destroy Signal object).
*/
dispose(): void;
/**
* Dispatch/Broadcast Signal to all listeners added to the queue.
*
* @param params Parameters that should be passed to each handler.
*/
dispatch(...params: any[]): void;
/**
* Forget memorized arguments.
*/
forget(): void;
/**
* Remove all bindings from signal and destroy any reference to external objects (destroy Signal object).
*/
dispose(): void;
/**
* Returns a number of listeners attached to the Signal.
*/
getNumListeners(): number;
/**
* Forget memorized arguments.
*/
forget(): void;
/**
* Stop propagation of the event, blocking the dispatch to next listeners on the queue.
*/
halt(): void;
/**
* Returns a number of listeners attached to the Signal.
*/
getNumListeners(): number;
/**
* Check if listener was attached to Signal.
*/
has(listener: Function, context?: any): boolean;
/**
* Stop propagation of the event, blocking the dispatch to next listeners on the queue.
*/
halt(): void;
/**
* Remove a single listener from the dispatch queue.
*/
remove(listener: Function, context?: any): Function;
/**
* Check if listener was attached to Signal.
*/
has(listener: Function, context?: any): boolean;
removeAll(): void;
/**
* Remove a single listener from the dispatch queue.
*/
remove(listener: Function, context?: any): Function;
removeAll(): void;
}
}
{
"name": "@types/signals",
"version": "0.0.11-alpha",
"version": "0.0.12-alpha",
"description": "TypeScript definitions for JS-Signals",

@@ -8,2 +8,6 @@ "main": "",

"author": "Diullei Gomes <https://github.com/diullei>",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"license": "MIT",

@@ -10,0 +14,0 @@ "typings": "index.d.ts",

@@ -11,4 +11,4 @@ # Installation

Additional Details
* Last updated: Wed, 25 May 2016 04:20:36 GMT
* File structure: Mixed
* Last updated: Fri, 01 Jul 2016 22:03:07 GMT
* File structure: UMD
* Library Dependencies: none

@@ -15,0 +15,0 @@ * Module Dependencies: none

@@ -13,13 +13,11 @@ {

"sourceBranch": "types-2.0",
"kind": "Mixed",
"kind": "UMD",
"globals": [
"signals"
],
"declaredModules": [
"signals"
],
"declaredModules": [],
"files": [
"index.d.ts"
],
"contentHash": "2d92527e3a89ae1f274547412bf742d9d9fd2614e5bafcb20b05de39a2ecb7ef"
"contentHash": "88f1c61dd54fb943bd6ce8e38c96028f53b5d5faecfb605b44af9bf6f69d078b"
}
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