@types/jquery.timeago
TypeScript icon, indicating that this package has built-in type declarations

1.0.34 • Public • Published

Installation

npm install --save @types/jquery.timeago

Summary

This package contains type definitions for jquery.timeago (http://timeago.yarp.com/).

Details

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

index.d.ts

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

interface TimeagoSetings {
    refreshMillis?: number | undefined;
    allowFuture?: boolean | undefined;
    strings?: {
        prefixAgo?: string | undefined;
        prefixFromNow?: string | undefined;
        suffixAgo?: string | undefined;
        suffixFromNow?: string | undefined;

        // Those can be string or Function
        seconds?: any;
        minute?: any;
        minutes?: any;
        hour?: any;
        hours?: any;
        day?: any;
        days?: any;
        month?: any;
        months?: any;
        year?: any;
        years?: any;

        wordSeparator?: string | undefined;
        numbers?: any[] | undefined;
    } | undefined;
}

interface TimeagoStatic {
    (timestamp: Date): string;
    (timestamp: number): string;
    (timestamp: string): string;
    (timestamp: Element): string;
    (timestamp: JQuery): string;
    settings: TimeagoSetings;
    inWords(distanceMillis: Date): string;
    inWords(distanceMillis: number): string;
    parse(iso8601: string): Date;
    datetime(element: Element): Date;
    datetime(element: JQuery): Date;
    isTime(element: Element): boolean;
    isTime(element: JQuery): boolean;
}

interface Timeago {
    (): JQuery;
}

interface JQueryStatic {
    timeago: TimeagoStatic;
}

interface JQuery {
    timeago: Timeago;
}

Additional Details

  • Last updated: Tue, 30 Jan 2024 21:35:45 GMT
  • Dependencies: @types/jquery

Credits

These definitions were written by François Guillot.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/jquery.timeago

Weekly Downloads

358

Version

1.0.34

License

MIT

Unpacked Size

5.32 kB

Total Files

5

Last publish

Collaborators

  • types