forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjquery.livestampjs.d.ts
More file actions
28 lines (23 loc) · 815 Bytes
/
jquery.livestampjs.d.ts
File metadata and controls
28 lines (23 loc) · 815 Bytes
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
// Type definitions for Livestamp.js
// Project: http://mattbradley.github.com/livestampjs/
// Definitions by: Vincent Bortone <https://github.com/vbortone/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// A simple, unobtrusive jQuery plugin that provides auto-updating timeago text to your timestamped HTML elements using Moment.js.
/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="../moment/moment.d.ts"/>
interface LivestampGlobal {
update(): void;
pause(): void;
resume(): void;
interval(): number;
interval(interval: number): void;
}
interface JQueryStatic {
livestamp: LivestampGlobal;
}
interface JQuery {
livestamp(date: Date): JQuery;
livestamp(moment: moment.Moment): JQuery;
livestamp(timestamp: number): JQuery;
livestamp(timestamp: string): JQuery;
}