@types/chai-almost
Version:
TypeScript definitions for chai-almost
48 lines (39 loc) • 1.35 kB
Markdown
# Installation
> `npm install --save @types/chai-almost`
# Summary
This package contains type definitions for chai-almost (https://github.com/nmuldavin/chai-almost#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chai-almost.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chai-almost/index.d.ts)
````ts
/// <reference types="chai" />
declare global {
namespace Chai {
interface Assertion {
almost: ChaiAlmost.Almost;
}
interface Deep {
almost: ChaiAlmost.DeepAlmost;
}
namespace ChaiAlmost {
interface DeepAlmost {
(value: any, toleranceOverride?: number): Assertion;
equal: Equal;
equals: Equal;
eq: Equal;
}
interface Almost extends DeepAlmost {
eql: Equal;
eqls: Equal;
}
}
}
}
declare function chaiAlmost(tolerance?: number): Chai.ChaiPlugin;
export = chaiAlmost;
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT
* Dependencies: [@types/chai](https://npmjs.com/package/@types/chai)
# Credits
These definitions were written by [Lennard Schulz](https://github.com/kclnn).