mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [d3-collection] Linted * Added and completed linting * Replaced `Object` with `any` adding TODO to change to proper `object` type when publishing the definitions to use TS 2.2+ * [d3-color] Linted * [d3-dispatch] Linted * [d3-hsv] Linted * [d3-interpolate] Linted. `Object` to `any` * Replace use of `Object` as extension basis with `any` for now. Added TODO to change it to use the `object` type, when updating the definitions to formally use TS2.2+ * [d3-path] Linted. * [d3-polygon] Linted. * [d3-quadtree] Linted. * [d3-queue] Linted. * [d3-request] Linted. * [d3-scale-chromatic] Linted. * [d3-time-format] Linted. * [d3-time] Linted. * [d3-timer] Linted. * [d3-voronoi] Linted. * [d3-scale] Move callable-type lint deactivation to tslint.json * line level deactivation was ignored.
19 lines
840 B
TypeScript
19 lines
840 B
TypeScript
// 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: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
// Last module patch version validated against: 1.0.1
|
|
|
|
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>;
|