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

1.3.3 • Public • Published

Installation

npm install --save @types/expired

Summary

This package contains type definitions for expired (https://github.com/lukechilds/expired).

Details

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

index.d.ts

export = expired;

declare const expired: expired;

interface expired {
    /**
     * @returns A boolean relating to whether the resource has expired or not.
     * `true` means it's expired, `false` means it's fresh.
     */
    (headers: expired.Headers, compareWith?: Date): boolean;
    /**
     * @returns The amount of milliseconds from the current date until the resource will expire.
     * If the resource has already expired it will return a negative integer.
     */
    in(headers: expired.Headers, compareWith?: Date): number;
    /**
     * @returns A JavaScript `Date` object for the date the resource will expire.
     */
    on(headers: expired.Headers): Date;
}

declare namespace expired {
    type Headers = string | { [header: string]: string | number | string[] | undefined };
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/expired

Weekly Downloads

0

Version

1.3.3

License

MIT

Unpacked Size

4.14 kB

Total Files

5

Last publish

Collaborators

  • types