Skip to content

Commit

Permalink
fix: Mark deprecated methods as @deprecated (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
Semigradsky authored Sep 25, 2020
1 parent 3154dc4 commit 68f8f81
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/wait-for-dom-change.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { waitForOptions } from "./wait-for";

/**
* @deprecated `waitForDomChange` has been deprecated.
* Use `waitFor` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.
*/
export function waitForDomChange(options?: waitForOptions): Promise<any>;
5 changes: 5 additions & 0 deletions types/wait-for-element.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import { waitForOptions } from "./wait-for";

/**
* @deprecated `waitForElement` has been deprecated.
* Use a `find*` query (preferred: https://testing-library.com/docs/dom-testing-library/api-queries#findby)
* or use `waitFor` instead: https://testing-library.com/docs/dom-testing-library/api-async#waitfor
*/
export function waitForElement<T>(callback: () => T, options?: waitForOptions): Promise<T>;
5 changes: 5 additions & 0 deletions types/wait.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* @deprecated `wait` has been deprecated and replaced by `waitFor` instead.
* In most cases you should be able to find/replace `wait` with `waitFor`.
* Learn more: https://testing-library.com/docs/dom-testing-library/api-async#waitfor.
*/
export function wait(
callback?: () => void,
options?: {
Expand Down

0 comments on commit 68f8f81

Please sign in to comment.