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.