forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
oblo-util.d.ts
31 lines (25 loc) · 973 Bytes
/
oblo-util.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
// Type definitions for oblo-util v0.6.4
// Project: https://github.com/Oblosys/oblo-util
// Definitions by: Martijn Schrage <https://github.com/Oblosys/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface ObloUtilStatic {
debug : boolean;
log(...args: any[]) : void;
error(...args: any[]) : void;
clip(min : number, max : number, x : number) : number;
square(x : number) : number;
replicate<X>(n : number, x : X) : X[];
pad(c : string, l : number, str : any) : string;
padZero(l : number, n : number) : string;
addslashes(str : string) : string;
showJSON(json : any, indentStr? : string, maxDepth? : number) : string;
showTime(date : Date) : string;
showDate(date : Date) : string;
readDate(dateStr : string) : Date;
setAttr($elt : JQuery, attrName : string, isSet : boolean) : void;
}
declare var util: ObloUtilStatic;
declare module "oblo-util" {
export = util;
}