npm.io
0.0.42 • Published 11 months ago

@types/jquery.livestampjs

Licence
MIT
Version
0.0.42
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/jquery.livestampjs

Summary

This package contains type definitions for jquery.livestampjs (http://mattbradley.github.com/livestampjs/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery.livestampjs.

index.d.ts

// A simple, unobtrusive jQuery plugin that provides auto-updating timeago text to your timestamped HTML elements using Moment.js.

/// <reference types="jquery"/>
/// <reference types="moment" />

import moment = require("moment");

export as namespace LivestampGlobal;

export = LivestampGlobal;

interface LivestampGlobal {
    update(): void;
    pause(): void;
    resume(): void;
    interval(): number;
    interval(interval: number): void;
}

declare global {
    interface JQueryStatic {
        livestamp: LivestampGlobal;
    }

    interface JQuery {
        livestamp(date: Date): JQuery;
        livestamp(moment: moment.Moment): JQuery;
        livestamp(timestamp: number): JQuery;
        livestamp(timestamp: string): JQuery;
    }
}

Additional Details

Credits

These definitions were written by Vincent Bortone.