Skip to content

Commit 5747e2b

Browse files
committed
Add jest-diff to flow types
1 parent a2b6db0 commit 5747e2b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

scripts/flow/environment.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,31 @@ declare module 'node:worker_threads' {
332332
}
333333
}
334334

335+
declare module 'jest-diff' {
336+
declare type CompareKeys = ((a: string, b: string) => number) | void;
337+
declare type DiffOptions = {
338+
aAnnotation?: string,
339+
aColor?: (arg: string) => string,
340+
aIndicator?: string,
341+
bAnnotation?: string,
342+
bColor?: (arg: string) => string,
343+
bIndicator?: string,
344+
changeColor?: (arg: string) => string,
345+
changeLineTrailingSpaceColor?: (arg: string) => string,
346+
commonColor?: (arg: string) => string,
347+
commonIndicator?: string,
348+
commonLineTrailingSpaceColor?: (arg: string) => string,
349+
contextLines?: number,
350+
emptyFirstOrLastLinePlaceholder?: string,
351+
expand?: boolean,
352+
includeChangeCounts?: boolean,
353+
omitAnnotationLines?: boolean,
354+
patchColor?: (arg: string) => string,
355+
compareKeys?: CompareKeys,
356+
};
357+
declare function diff(a: any, b: any, options?: DiffOptions): string;
358+
}
359+
335360
declare const Bun: {
336361
hash(
337362
input: string | $TypedArray | DataView | ArrayBuffer | SharedArrayBuffer,

0 commit comments

Comments
 (0)