From 2d78b6c3b18025e63a71cdf57be00230f6ff72aa Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Sat, 24 Dec 2016 13:31:54 -0500 Subject: [PATCH] Squashed overloads for 'on' in 'clipboard'. Technically, Clipboard should extend the emitter class from 'tiny-emitter'. --- clipboard/index.d.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/clipboard/index.d.ts b/clipboard/index.d.ts index f6b2f747d6..ec03d9bee5 100644 --- a/clipboard/index.d.ts +++ b/clipboard/index.d.ts @@ -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.