Skip to content

Commit 68f8f81

Browse files
authored
fix: Mark deprecated methods as @deprecated (#771)
1 parent 3154dc4 commit 68f8f81

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

types/wait-for-dom-change.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
import { waitForOptions } from "./wait-for";
22

3+
/**
4+
* @deprecated `waitForDomChange` has been deprecated.
5+
* Use `waitFor` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.
6+
*/
37
export function waitForDomChange(options?: waitForOptions): Promise<any>;

types/wait-for-element.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
import { waitForOptions } from "./wait-for";
22

3+
/**
4+
* @deprecated `waitForElement` has been deprecated.
5+
* Use a `find*` query (preferred: https://testing-library.com/docs/dom-testing-library/api-queries#findby)
6+
* or use `waitFor` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor
7+
*/
38
export function waitForElement<T>(callback: () => T, options?: waitForOptions): Promise<T>;

types/wait.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* @deprecated `wait` has been deprecated and replaced by `waitFor` instead.
3+
* In most cases you should be able to find/replace `wait` with `waitFor`.
4+
* Learn more: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.
5+
*/
16
export function wait(
27
callback?: () => void,
38
options?: {

0 commit comments

Comments
 (0)