Skip to content

Commit

Permalink
Add TypeScript support
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-ro authored and Inndy committed Sep 2, 2019
1 parent 1626a82 commit 667ebd1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions index.d.ts
@@ -0,0 +1,26 @@
declare module 'vue-clipboard2' {
import Vue, { PluginFunction, WatchOptions } from 'vue'
module "vue/types/vue" {
interface Vue {
$clipboardConfig: {
autoSetContainer: boolean,
appendToBody: boolean
}
$copyText(text: string, container?: object | HTMLElement): Promise<{
action: string,
text: string,
trigger: String | HTMLElement | HTMLCollection | NodeList,
clearSelection: () => void
}>
}
}

class VueClipboard {
static install: PluginFunction<never>
static config: {
autoSetContainer: boolean
appendToBody: boolean
}
}
export default VueClipboard
}

0 comments on commit 667ebd1

Please sign in to comment.