update type for emitter

This commit is contained in:
vitormalencar
2021-01-24 16:53:30 +01:00
parent 9870b14e80
commit b460d6864c
2 changed files with 4 additions and 2 deletions

4
src/clipboard.d.ts vendored
View File

@@ -1,5 +1,7 @@
/// <reference lib="dom"/> /// <reference lib="dom"/>
import { TinyEmitter } from 'tiny-emitter';
type Action = 'cut' | 'copy'; type Action = 'cut' | 'copy';
type Target = string | HTMLElement; type Target = string | HTMLElement;
@@ -7,7 +9,7 @@ type Target = string | HTMLElement;
type Trigger = string | HTMLElement | HTMLCollection | NodeList; type Trigger = string | HTMLElement | HTMLCollection | NodeList;
type Options = { type Options = {
emmiter?: any; emmiter?: TinyEmitter;
text?: string; text?: string;
action?: Action; action?: Action;
target?: Element; target?: Element;

View File

@@ -1,4 +1,4 @@
import { expectType } from 'tsd'; import { expectType } from 'tsd';
import Clipboard from './clipboard'; import Clipboard from './clipboard';
expectType<Clipboard>(new Clipboard('.btn')); expectType<Clipboard>(new Clipboard('.btn'));