mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 11:51:10 +08:00
* 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.
46 lines
1.5 KiB
TypeScript
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;
|