DefinitelyTyped/d3-dispatch/index.d.ts
Tom Wanzek 86baab4f54 d3-selection and version numbers.
* d3-selection: Templated `Local` to allow generic parameter for datum type. Added additonal signatures to `Selection.property(...)` to accept `Local` as first argument. (Thanks to @gustavderdrache for catching these enhancements)
* Updated version numbers header comments to be current.
2016-08-20 13:06:14 -04:00

17 lines
788 B
TypeScript

// Type definitions for D3JS d3-dispatch module v1.0.1
// 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: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface Dispatch<T extends EventTarget> {
apply(type: string, that?: T, args?: any[]): void;
call(type: string, that?: T, ...args: any[]): void;
copy(): Dispatch<T>;
on(typenames: string): (this: T, ...args: any[]) => void;
on(typenames: string, callback: null): this;
on(typenames: string, callback: (this: T, ...args: any[]) => void): this;
}
export function dispatch<T extends EventTarget>(...types: string[]): Dispatch<T>;