Skip to content

Commit

Permalink
feat: add TS types
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvasilchuk committed Oct 10, 2020
1 parent 857557d commit e17f8d7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
"vuejs-components"
],
"main": "dist/vue-social-sharing.js",
"types": "types/index.d.ts",
"files": [
"dist",
"src",
"nuxt"
"nuxt",
"types/*.d.ts"
],
"scripts": {
"test": "jest tests",
Expand Down
22 changes: 22 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { PluginObject } from "vue"

export interface Props {
network: string
url: string
title: string
description?: string
quote?: string
hashtags?: string
twitterUser?: string
media?: string
tag?: string
popup?: { width: number; height: number }
}

export interface PluginOptions {
networks: Record<string, string>
}

type VueSocialSharing = PluginObject<PluginOptions>

export default VueSocialSharing

0 comments on commit e17f8d7

Please sign in to comment.