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

0.1.4 • Public • Published

Installation

npm install --save @types/chai-moment

Summary

This package contains type definitions for chai-moment (https://github.com/picardy/chai-moment).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chai-moment.

index.d.ts

/// <reference types="chai" />

declare global {
    namespace ChaiMoment {
        type Granularity = "year" | "month" | "week" | "day" | "hour" | "minute" | "second";
    }

    namespace Chai {
        interface Assertion {
            afterMoment(expected: any, granularity?: ChaiMoment.Granularity): void;
            beforeMoment(expected: any, granularity?: ChaiMoment.Granularity): void;
            sameMoment(expected: any, granularity?: ChaiMoment.Granularity): void;
        }

        interface AssertStatic {
            afterMoment(val: any, exp: any, granularity: ChaiMoment.Granularity, msg?: string): void;
            afterMoment(val: any, exp: any, msg?: string): void;
            beforeMoment(val: any, exp: any, granularity?: ChaiMoment.Granularity, msg?: string): void;
            beforeMoment(val: any, exp: any, msg?: string): void;
            sameMoment(val: any, exp: any, granularity?: ChaiMoment.Granularity, msg?: string): void;
            sameMoment(val: any, exp: any, msg?: string): void;
        }
    }
}

declare const chaiMoment: Chai.ChaiPlugin;
export = chaiMoment;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: @types/chai

Credits

These definitions were written by Chris Godsey.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/chai-moment

Weekly Downloads

391

Version

0.1.4

License

MIT

Unpacked Size

4.86 kB

Total Files

5

Last publish

Collaborators

  • types