mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-01 11:50:54 +08:00
TypeScript 0.9.5 beta does not allow generic type references without the type argument. This code will still compile for 0.9.1 users. Flight and Ember have further compile problems in 0.9.5 that I don't feel qualified to address as I'm not versed in those libraries.
67 lines
1.2 KiB
TypeScript
67 lines
1.2 KiB
TypeScript
// 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?: boolean;
|
|
template?: string;
|
|
animation?: NotyAnimationOptions;
|
|
timeout?: number;
|
|
force?: boolean;
|
|
modal?: boolean;
|
|
closeWith?: any[];
|
|
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: 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: NotyOptions);
|
|
|
|
show();
|
|
close();
|
|
setText(text: string);
|
|
setType(type: string);
|
|
setTimeout(timeout: number);
|
|
|
|
closed: boolean;
|
|
shown: boolean;
|
|
} |