diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 1a426c4..0000000 --- a/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Type definitions for mailgo -// Project: mailgo -// Definitions by: Matteo Manzinello - -export as namespace Mailgo; - -export function mailgo(mailgoConfig?: any): void; diff --git a/mailgo.d.ts b/mailgo.d.ts new file mode 100644 index 0000000..9ef8ad3 --- /dev/null +++ b/mailgo.d.ts @@ -0,0 +1,9 @@ +// Type definitions for mailgo +// Project: mailgo +// Definitions by: Matteo Manzinello + +export type MailgoConfig = { + initEvent?: string; +}; + +export default function mailgo(mailgoConfig?: MailgoConfig): void; diff --git a/src/mailgo.ts b/src/mailgo.ts index a02f19d..ba88e34 100644 --- a/src/mailgo.ts +++ b/src/mailgo.ts @@ -1,3 +1,5 @@ +import { MailgoConfig } from "../mailgo"; + // links const MAILTO: string = "mailto:"; const TEL: string = "tel:"; @@ -830,7 +832,7 @@ const mailgoStyle = (): void => { }; // mailgo -const mailgo = (mailgoConfig?: any): void => { +const mailgo = (mailgoConfig?: MailgoConfig): void => { // if the window is defined... if (window && typeof window !== "undefined") { // add the style for mailgo