Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

added typings for shariff plugin #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions typings/shariff/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
interface ShariffOptions {
url?: Function | String;
title?: Function | String;
mailBody?: Function | String;
mailSubject?: Function | String;
mailUrl?: Function | String;
lang?: String;
services?: [any];
orientation?: String;
backendUrl?: any;
langFallback?: String;
theme?: String;
mediaUrl?: String;
}

interface Shariff {
defaults: any;
element: JQuery;
options: ShariffOptions;
services: String[];
_addButtonList(): void;
_updateCounts(data: any): void;
getShares(): void;
getReferrerTrack(): void;
getTitle(): void;
getOption(name: String): void;
getURL(): void;
getInforUrl(): void;
getMeta(name: String): void;
getLocalized(data: any, key: any): any;
$socialshareElement(): JQuery;
}

interface ShariffFactory {
new(container: JQuery, options: ShariffOptions): Shariff;
}

declare module "shariff" {
export = shariff;
}

declare var shariff: ShariffFactory;