Socket
Socket
Sign inDemoInstall

@types/d3-dispatch

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/d3-dispatch - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

64

d3-dispatch/index.d.ts
// Type definitions for D3JS d3-dispatch module 1.0
// Project: https://github.com/d3/d3-dispatch/
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>
// Alex Ford <https://github.com/gustavderdrache>
// Boris Yankov <https://github.com/borisyankov>
// denisname <https://github.com/denisname>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Last module patch version validated against: 1.0.1
// Last module patch version validated against: 1.0.3
export interface Dispatch<T extends EventTarget> {
/**
* Like `function.apply`, invokes each registered callback for the specified type,
* passing the callback the specified arguments, with `that` as the `this` context.
*
* @param type A specified event type.
* @param that The `this` context for the callback.
* @param args Additional arguments to be passed to the callback.
* @throws "unknown type" on unknown event type.
*/
apply(type: string, that?: T, args?: any[]): void;
call(type: string, that?: T, ...args: any[]): void;
/**
* Like `function.call`, invokes each registered callback for the specified type,
* passing the callback the specified arguments, with `that` as the `this` context.
* See dispatch.apply for more information.
*
* @param type A specified event type.
* @param that The `this` context for the callback.
* @param args Additional arguments to be passed to the callback.
* @throws "unknown type" on unknown event type.
*/
call(type: string, that?: T, ...args: any[]): void;
/**
* Returns a copy of this dispatch object.
* Changes to this dispatch do not affect the returned copy and vice versa.
*/
copy(): Dispatch<T>;
on(typenames: string): (this: T, ...args: any[]) => void;
/**
* Returns the callback for the specified typenames, if any.
* If multiple typenames are specified, the first matching callback is returned.
*
* @param types An event typename.
* @param callback A callback.
*/
on(typenames: string): ((this: T, ...args: any[]) => void) | undefined;
/**
* Removes the callback for the specified typenames.
* To remove all callbacks for a given name `foo`, say `dispatch.on(".foo", null).`
*
* @param types An event typename.
*/
on(typenames: string, callback: null): this;
/**
* Adds the callback for the specified typenames.
* The callback is registered for the specified (fully-qualified) typenames.
* If a callback was already registered for the given typenames,
* the existing callback is removed before the new callback is added.
*
* @param types An event typename.
* @param callback A callback.
*/
on(typenames: string, callback: (this: T, ...args: any[]) => void): this;
}
/**
* Creates a new dispatch for the specified event types. Each type is a string, such as "start" or "end".
*
* @param types The event types.
* @throws "illegal type" on empty string or duplicated event types.
*/
export function dispatch<T extends EventTarget>(...types: string[]): Dispatch<T>;

19

d3-dispatch/package.json
{
"name": "@types/d3-dispatch",
"version": "1.0.5",
"version": "1.0.6",
"description": "TypeScript definitions for D3JS d3-dispatch module",

@@ -9,11 +9,19 @@ "license": "MIT",

"name": "Tom Wanzek",
"url": "https://github.com/tomwanzek"
"url": "https://github.com/tomwanzek",
"githubUsername": "tomwanzek"
},
{
"name": "Alex Ford",
"url": "https://github.com/gustavderdrache"
"url": "https://github.com/gustavderdrache",
"githubUsername": "gustavderdrache"
},
{
"name": "Boris Yankov",
"url": "https://github.com/borisyankov"
"url": "https://github.com/borisyankov",
"githubUsername": "borisyankov"
},
{
"name": "denisname",
"url": "https://github.com/denisname",
"githubUsername": "denisname"
}

@@ -28,5 +36,4 @@ ],

"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "c6237e49b1beef48f0450929a49c36e12dc90646aba318427067ff6c08a5f839",
"typesPublisherContentHash": "765b6ec4223b30d1c8a40f12bd7d6f219adb057e4d8cbaf2dc440ed3787fa72b",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Fri, 19 May 2017 15:49:31 GMT
* Last updated: Tue, 01 May 2018 16:34:35 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>.
These definitions were written by Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>, denisname <https://github.com/denisname>.
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