forked from manzinello/mailgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmailgo.d.ts
60 lines (51 loc) · 1.32 KB
/
mailgo.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Type definitions for mailgo
// Project: mailgo
// Definitions by: Matteo Manzinello <https://matteomanzinello.com>
declare module "mailgo" {
export type MailgoConfig = {
initEvent?: string;
listenerOptions?: ListenerOptions | boolean;
dark?: boolean;
lang?: string;
forceLang?: boolean;
validateEmail?: boolean;
validateTel?: boolean;
showFooter?: boolean;
};
export type MailgoTranslation = {
open_in_?: string;
cc_?: string;
bcc_?: string;
subject_?: string;
body_?: string;
gmail?: string;
outlook?: string;
telegram?: string;
whatsapp?: string;
skype?: string;
call?: string;
open?: string;
_default?: string;
_as_default?: string;
copy?: string;
};
export type MailgoTranslations = {
[language: string]: MailgoTranslation;
};
export type MailgoI18n = {
languages: string[];
translations: MailgoTranslations;
};
export type ListenerOptions = {
capture?: boolean;
once?: boolean;
passive?: boolean;
};
export function mailgoRender(
type: string,
mailgoElement: HTMLLinkElement
): void;
export function isMailgo(element: HTMLElement, type?: string): boolean;
export function mailgoCheckRender(event: Event): boolean;
export default function mailgo(mailgoConfig?: MailgoConfig): void;
}