forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
raty.d.ts
64 lines (60 loc) · 1.73 KB
/
raty.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Type definitions for jQuery.raty 2.7.0
// Project: https://github.com/wbotelhos/raty
// Definitions by: Matt Wheatley <http://github.com/terrawheat>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
interface JQuery {
raty(): JQuery;
raty(options: JQueryRatyOptions): JQuery;
raty(method: string, parameter: any): any;
raty(method: 'score'): number;
raty(method: 'score', score: number): void;
raty(method: 'click', star: number): void;
raty(method: 'readonly', on: boolean): void;
raty(method: 'cancel', on: boolean): void;
raty(method: 'reload'): void;
raty(method: 'set', options: JQueryRatyOptions): void;
raty(method: 'destroy'): JQuery;
raty(method: 'move', number: number): void;
}
interface JQueryRatyOptions {
cancel?: boolean,
cancelClass?: string,
cancelHint?: string,
cancelOff?: string,
cancelOn?: string,
cancelPlace?: string,
click?: (score: number, event: JQueryEventObject) => void,
half?: boolean,
halfShow?: boolean,
hints?: string[],
iconRange?: any[][],
mouseout?: (score: number, event: JQueryEventObject) => void,
mouseover?: (score: number, event: JQueryEventObject) => void,
noRatedMsg?: string,
number?: number,
numberMax?: number,
path?: string,
precision?: boolean,
readOnly?: boolean,
round?: JQueryRatyRoundingOptions,
score?: number,
scoreName?: string,
single?: boolean,
space?: boolean,
starHalf?: string,
starOff?: string,
starOn?: string,
target?: string,
targetFormat?: string,
targetKeep?: boolean,
targetScore?: string,
targetText?: string,
targetType?: string,
starType?: string,
}
interface JQueryRatyRoundingOptions {
down: number,
full: number,
up: number,
}