From 876b72a0c7db8a32f4d671a8511d0ddf988fc545 Mon Sep 17 00:00:00 2001 From: "Amir.h Yeganemehr" Date: Tue, 2 May 2017 04:05:16 +0430 Subject: [PATCH] Create definitions for jquery.growl (#16055) * add jquery.growl definition * Fix Travis CI checks --- types/jquery.growl/index.d.ts | 37 ++++++++++++++++++++++++++++++++ types/jquery.growl/tsconfig.json | 21 ++++++++++++++++++ types/jquery.growl/tslint.json | 1 + 3 files changed, 59 insertions(+) create mode 100644 types/jquery.growl/index.d.ts create mode 100644 types/jquery.growl/tsconfig.json create mode 100644 types/jquery.growl/tslint.json diff --git a/types/jquery.growl/index.d.ts b/types/jquery.growl/index.d.ts new file mode 100644 index 0000000000..4507f1ca4f --- /dev/null +++ b/types/jquery.growl/index.d.ts @@ -0,0 +1,37 @@ +// Type definitions for jquery.growl 1.3 +// Project: https://github.com/ksylvest/jquery-growl#readme +// Definitions by: Amir.h Yeganemehr +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +interface growlOptions { + // Message + message: string; + // Title + title?: string; + // URL + url?: string; + // while hovering over the alert, prevent it from being dismissed (true | false - default: true) + delayOnHover?: boolean; + // the duration (in milliseconds) for which the alert is displayed (default: 3200) + duration?: number; + // whether the alert should be fixed rather than auto- dismissed(true | false - default: false) + fixed?: boolean; + // the alert's position ('tl' | 'tr' | 'bl' | 'br' | 'tc' | 'bc' - default: 'tr') + location?: string; + // the alert's size ('small' | 'medium' | 'large' - default: 'medium') + size?: string; + // the alert's style ('default' | 'error' | 'notice' | 'warning' - default: 'default') + style?: string; +} + +interface growl { + error(options: growlOptions): void; + notice(options: growlOptions): void; + warning(options: growlOptions): void; +} + +interface JQueryStatic { + growl: growl; +} diff --git a/types/jquery.growl/tsconfig.json b/types/jquery.growl/tsconfig.json new file mode 100644 index 0000000000..a2cbd4e379 --- /dev/null +++ b/types/jquery.growl/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts" + ] +} diff --git a/types/jquery.growl/tslint.json b/types/jquery.growl/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jquery.growl/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }