mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* 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.
17 lines
788 B
TypeScript
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>;
|