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.