bug with ts

This commit is contained in:
Matteo Manzinello 2020-06-30 12:35:27 +02:00
parent 8a7e43a6b2
commit 7c513ffb26
4 changed files with 7 additions and 5 deletions

2
dist/mailgo.min.js vendored

File diff suppressed because one or more lines are too long

2
mailgo.d.ts vendored
View File

@ -2,6 +2,8 @@
// Project: mailgo // Project: mailgo
// Definitions by: Matteo Manzinello <https://matteomanzinello.com> // Definitions by: Matteo Manzinello <https://matteomanzinello.com>
declare module "mailgo";
export type MailgoConfig = { export type MailgoConfig = {
initEvent?: string; initEvent?: string;
defaultLang?: string; defaultLang?: string;

View File

@ -780,7 +780,7 @@ const mailgoStyle = () => {
document.head.appendChild(mailgoCSSElement); document.head.appendChild(mailgoCSSElement);
}; };
// mailgo // mailgo
const mailgo = (mailgoConfig) => { function mailgo(mailgoConfig) {
// if the window is defined... // if the window is defined...
if (window && typeof window !== "undefined") { if (window && typeof window !== "undefined") {
// add the style for mailgo // add the style for mailgo
@ -795,7 +795,7 @@ const mailgo = (mailgoConfig) => {
mailgoInit(mailgoConfig); mailgoInit(mailgoConfig);
} }
} }
}; }
/* harmony default export */ __webpack_exports__["default"] = (mailgo); /* harmony default export */ __webpack_exports__["default"] = (mailgo);

View File

@ -893,7 +893,7 @@ const mailgoStyle = (): void => {
}; };
// mailgo // mailgo
const mailgo = (mailgoConfig?: MailgoConfig): void => { function mailgo(mailgoConfig?: MailgoConfig) {
// if the window is defined... // if the window is defined...
if (window && typeof window !== "undefined") { if (window && typeof window !== "undefined") {
// add the style for mailgo // add the style for mailgo
@ -908,6 +908,6 @@ const mailgo = (mailgoConfig?: MailgoConfig): void => {
mailgoInit(mailgoConfig); mailgoInit(mailgoConfig);
} }
} }
}; }
export default mailgo; export default mailgo;