diff --git a/package.json b/package.json index 148a9dc..8ef64e6 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/types/index.d.ts b/types/index.d.ts new file mode 100644 index 0000000..7a53d60 --- /dev/null +++ b/types/index.d.ts @@ -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 +} + +type VueSocialSharing = PluginObject + +export default VueSocialSharing