Create definitions for jquery.growl (#16055)

* add jquery.growl definition

* Fix Travis CI checks
This commit is contained in:
Amir.h Yeganemehr
2017-05-01 16:35:16 -07:00
committed by Mohamed Hegazy
parent a3947c3eaa
commit 876b72a0c7
3 changed files with 59 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
// Type definitions for jquery.growl 1.3
// Project: https://github.com/ksylvest/jquery-growl#readme
// Definitions by: Amir.h Yeganemehr <https://github.com/yeganemehr>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference types="jquery" />
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;
}
+21
View File
@@ -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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }