Merge pull request #526 from kingdango/master

jquery.noty: Initial add of definitions
This commit is contained in:
Boris Yankov
2013-05-07 16:52:01 -07:00

67
jquery.noty/jquery.noty.d.ts vendored Normal file
View File

@@ -0,0 +1,67 @@
// Typescript type definitions for jQuery.noty v2.0 by Nedim Carter <http://needim.github.io>
// Project: http://needim.github.io/noty/
// Definitions by: Aaron King <https://github.com/kingdango/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path='../jquery/jquery.d.ts'/>
interface NotyOptions {
layout?: string;
theme?: string;
type?: string;
text?: string;
dismissQueue?: bool;
template?: string;
animation?: NotyAnimationOptions;
timeout?: bool;
force?: bool;
modal?: bool;
closeWith?: Array;
callback?: NotyCallbackOptions;
buttons?: any;
}
interface NotyAnimationOptions {
open?: any;
close?: any;
easing?: string;
speed?: number;
}
interface NotyCallbackOptions {
onShow?: Function;
afterShow?: Function;
onClose?: Function;
afterClose?: Function;
}
interface NotyStatic {
(NotyOptions?);
get(id: any);
close(id: any);
clearQueue();
closeAll();
setText(id: any, text: string);
setType(id: any, type: string);
}
interface JQueryStatic {
noty: NotyStatic;
}
declare var noty: {
(NotyOptions?);
show();
close();
setText(text: string);
setType(type: string);
setTimeout(timeout: number);
closed: bool;
shown: bool;
}