Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit c9344ab

Browse files
ajsmthbcarroll22
authored andcommitted
fix: correct typings for debug options (#77)
* feat: formatting options for render() to remove options from debug output * update name -- propsToRemove to just removeProps * omitProps: remove prettyPrint plugin in favour of removing props in toJSON() call * update options in render() to destructure debug config * fix: typings for render() fn to include debug options * fix: options namespace typing for prop in render
1 parent 6a2ba84 commit c9344ab

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

typings/index.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ export type RenderResult<Q extends Queries = typeof queries> = {
3535
export interface RenderOptions<Q extends Queries = typeof queries> {
3636
queries?: Q;
3737
wrapper?: ComponentType;
38+
options?: {
39+
debug?: DebugOptions;
40+
};
41+
}
42+
43+
export interface DebugOptions {
44+
omitProps: string[];
3845
}
3946

4047
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;

typings/pretty-print.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import { NativeTestInstance } from './query-helpers';
2+
import { DebugOptions } from '.';
23

34
export function prettyPrint(
45
element: NativeTestInstance | string,
56
maxLength?: number,
67
options?: {
7-
debug: {
8-
omitProps: string[];
9-
};
8+
debug: DebugOptions;
109
},
1110
): string | false;

0 commit comments

Comments
 (0)