mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
update type for emitter
This commit is contained in:
parent
9870b14e80
commit
b460d6864c
4
src/clipboard.d.ts
vendored
4
src/clipboard.d.ts
vendored
@ -1,5 +1,7 @@
|
||||
/// <reference lib="dom"/>
|
||||
|
||||
import { TinyEmitter } from 'tiny-emitter';
|
||||
|
||||
type Action = 'cut' | 'copy';
|
||||
|
||||
type Target = string | HTMLElement;
|
||||
@ -7,7 +9,7 @@ type Target = string | HTMLElement;
|
||||
type Trigger = string | HTMLElement | HTMLCollection | NodeList;
|
||||
|
||||
type Options = {
|
||||
emmiter?: any;
|
||||
emmiter?: TinyEmitter;
|
||||
text?: string;
|
||||
action?: Action;
|
||||
target?: Element;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { expectType } from 'tsd';
|
||||
import Clipboard from './clipboard';
|
||||
|
||||
expectType<Clipboard>(new Clipboard('.btn'));
|
||||
expectType<Clipboard>(new Clipboard('.btn'));
|
||||
|
Loading…
Reference in New Issue
Block a user