Skip to content

Commit 83755e4

Browse files
committed
fix: πŸ› use an accurate type in matchers
βœ… Closes: #382
1 parent 62caf45 commit 83755e4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

β€Žprojects/spectator/jest/src/lib/matchers-types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ declare namespace jest {
1414

1515
toContainProperty(prop: string | object, val?: string): boolean;
1616

17-
toHaveText(text: string | string[] | Function, exact?: boolean): boolean;
17+
toHaveText(text: string | string[] | ((text: string) => boolean), exact?: boolean): boolean;
1818

19-
toContainText(text: string | string[] | Function, exact?: boolean): boolean;
19+
toContainText(text: string | string[] | ((text: string) => boolean), exact?: boolean): boolean;
2020

21-
toHaveExactText(text: string | string[] | Function): boolean;
21+
toHaveExactText(text: string | string[] | ((text: string) => boolean)): boolean;
2222

2323
toHaveValue(value: string | string[]): boolean;
2424

β€Žprojects/spectator/src/lib/matchers-types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ declare namespace jasmine {
1414

1515
toContainProperty(prop: string | object, val?: string): boolean;
1616

17-
toHaveText(text: string | string[] | Function, exact?: boolean): boolean;
17+
toHaveText(text: string | string[] | ((text: string) => boolean), exact?: boolean): boolean;
1818

19-
toContainText(text: string | string[] | Function, exact?: boolean): boolean;
19+
toContainText(text: string | string[] | ((text: string) => boolean), exact?: boolean): boolean;
2020

21-
toHaveExactText(text: string | string[] | Function): boolean;
21+
toHaveExactText(text: string | string[] | ((text: string) => boolean)): boolean;
2222

2323
toHaveValue(value: string | string[]): boolean;
2424

0 commit comments

Comments
Β (0)