mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Squashed overloads for 'on' in 'clipboard'.
Technically, Clipboard should extend the emitter class from 'tiny-emitter'.
This commit is contained in:
Vendored
+3
-4
@@ -8,12 +8,11 @@ declare class Clipboard {
|
||||
|
||||
/**
|
||||
* Subscribes to events that indicate the result of a copy/cut operation.
|
||||
* @param type {string} Event type ('success' or 'error').
|
||||
* @param type {"success" | "error"} Event type ('success' or 'error').
|
||||
* @param handler Callback function.
|
||||
*/
|
||||
on(type: "success", handler: (e: Clipboard.Event) => void): this;
|
||||
on(type: "error", handler: (e: Clipboard.Event) => void): this;
|
||||
on(type: string, handler: (e: Clipboard.Event) => void): this;
|
||||
on(type: "success" | "error", handler: (e: Clipboard.Event) => void): this;
|
||||
on(type: string, handler: (...args: any[]) => void): this;
|
||||
|
||||
/**
|
||||
* Clears all event bindings.
|
||||
|
||||
Reference in New Issue
Block a user