Files
DefinitelyTyped/types/jest-matcher-utils/index.d.ts
Alex Coles 6d187525fa [jest-diff] [jest-get-type] [jest-matcher-utils] Add typings (#20509)
* Add typings for jest-diff

* Add typings for jest-get-type

* Add typings for jest-matcher-utils

* Enable noImplicitThis option for jest-diff

* Enable noImplicitThis option for jest-get-type

* Enable noImplicitThis option for jest-matcher-utils

* Point jest-diff project URL to GitHub

* Point jest-get=type project URL to GitHub

* Point jest-matcher-utils project URL to GitHub

* Uncomment EXPECTED_BG, RECEIVED_BG variables

Although these variables have been removed on master of the
jest-matcher-utils repo, there has yet to be a release.

Add a TODO to indicate that a future update to these definitions will
be necessary.
2017-10-12 02:22:14 -07:00

46 lines
1.5 KiB
TypeScript

// Type definitions for jest-matcher-utils 21.0
// Project: https://github.com/facebook/jest/tree/master/packages/jest-get-type
// Definitions by: Alex Coles <https://github.com/myabc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import * as chalk from 'chalk';
export const EXPECTED_COLOR: chalk.ChalkChain;
export const RECEIVED_COLOR: chalk.ChalkChain;
export const EXPECTED_BG: chalk.ChalkChain; // TODO: removed in b430e51a
export const RECEIVED_BG: chalk.ChalkChain; // TODO: removed in b430e51a
export const SUGGEST_TO_EQUAL: string;
export function stringify(object: any, maxDepth?: number): string;
export function highlightTrailingWhitespace(
text: string,
bgColor: chalk.ChalkChain // removed in b430e51a
): string;
export function printReceived(object: any): string;
export function printExpected(value: any): string;
export function printWithType(
name: string,
received: any,
print: (value: any) => string
): string;
export function ensureNoExpected(actual: any, matcherName?: string): void;
export function ensureActualIsNumber(actual: any, matcherName?: string): void;
export function ensureExpectedIsNumber(actual: any, matcherName?: string): void;
export function ensureNumbers(
actual: any,
expected: any,
matcherName?: string
): void;
export function pluralize(word: string, count: number): string;
export function matcherHint(
matcherName: string,
received?: string,
expected?: string,
options?: { secondArgument?: string; isDirectExpectCall?: boolean }
): string;