diff --git a/types/jquery-toast-plugin/index.d.ts b/types/jquery-toast-plugin/index.d.ts new file mode 100644 index 0000000000..90c419a104 --- /dev/null +++ b/types/jquery-toast-plugin/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for jquery-toast-plugin +// Project: https://github.com/kamranahmedse/jquery-toast-plugin +// Definitions by: Viqas Hussain +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// + +interface JQueryStatic { + toast(options: toastOptions): void; +} + +interface toastOptions +{ + text: string; + heading?: string; + showHideTransition?: string; + allowToastClose?: boolean; + hideAfter?: number; + loader?: boolean; + loaderBg?: string; + stack?: number; + position?: string; + bgColor?: boolean; + textColor?: boolean; + textAlign?: string; + icon?: boolean; + beforeShow?: () => any; + afterShown?: () => any; + beforeHide?: () => any; + afterHidden?: () => any; +} \ No newline at end of file diff --git a/types/jquery-toast-plugin/jquery-toast-plugin-tests.ts b/types/jquery-toast-plugin/jquery-toast-plugin-tests.ts new file mode 100644 index 0000000000..ad003b0fbb --- /dev/null +++ b/types/jquery-toast-plugin/jquery-toast-plugin-tests.ts @@ -0,0 +1 @@ +$.toast({ text: "test" }) \ No newline at end of file diff --git a/types/jquery-toast-plugin/tsconfig.json b/types/jquery-toast-plugin/tsconfig.json new file mode 100644 index 0000000000..3eec6b2edd --- /dev/null +++ b/types/jquery-toast-plugin/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jquery-toast-plugin-tests.ts" + ] +} diff --git a/types/jquery-toast-plugin/tslint.json b/types/jquery-toast-plugin/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jquery-toast-plugin/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }