Installation
npm install --save @types/chai-arrays
Summary
This package contains type definitions for chai-arrays (https://github.com/GaneshSPatil/chai-arrays).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chai-arrays.
index.d.ts
/// <reference types="chai" />
declare global {
namespace Chai {
interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
array(): Assertion;
Uint8Array(): Assertion;
Uint16Array(): Assertion;
Uint32Array(): Assertion;
Uint8ClampedArray(): Assertion;
ofSize(size: number): Assertion;
equalTo(arr: any[]): Assertion;
containing(value: any): Assertion;
containingAllOf(values: any[]): Assertion;
containingAnyOf(values: any[]): Assertion;
sorted(): Assertion;
sorted<TElement = any>(comparefn: (a: TElement, b: TElement) => number): Assertion;
}
interface Assert {
array(val: any[], msg?: string): void;
Uint8Array(val: any, msg?: string): void;
Uint16Array(val: any, msg?: string): void;
Uint32Array(val: any, msg?: string): void;
Uint8ClampedArray(val: any, msg?: string): void;
ofSize(val: any[], size: number, msg?: string): void;
equalTo(val: any[], array: any[], msg?: string): void;
containing(val: any[], value: any, msg?: string): void;
containingAllOf(val: any[], values: any[], msg?: string): void;
containingAnyOf(val: any[], values: any[], msg?: string): void;
sorted(val: any[], msg?: string): void;
sorted<TElement>(val: TElement[], comparefn: (a: TElement, b: TElement) => number, msg?: string): void;
}
}
}
declare const chaiArrays: Chai.ChaiPlugin;
export = chaiArrays;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:05 GMT
- Dependencies: @types/chai
Credits
These definitions were written by Clément Prévot.