Skip to content

Commit

Permalink
fix(TS): change *ByValue to *ByDisplayValue (#51)
Browse files Browse the repository at this point in the history
These changes in typings were not done when changing the API from *ByValue to *ByDisplayValue 

Closes #42
  • Loading branch information
ppi-buck authored and Kent C. Dodds committed Jun 5, 2019
1 parent f918436 commit fd3b321
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,11 @@ declare global {
* @see https://github.com/testing-library/cypress-testing-library#usage
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
*/
queryByValue<E extends Node = HTMLElement>(
queryByDisplayValue<E extends Node = HTMLElement>(
id: Matcher,
options?: MatcherOptions,
): Chainable<E | null>
queryByValue<K extends keyof HTMLElementTagNameMap>(
queryByDisplayValue<K extends keyof HTMLElementTagNameMap>(
id: Matcher,
options?: MatcherOptions,
): Chainable<HTMLElementTagNameMap[K] | null>
Expand All @@ -608,11 +608,11 @@ declare global {
* @see https://github.com/testing-library/cypress-testing-library#usage
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
*/
queryAllByValue<E extends Node = HTMLElement>(
queryAllByDisplayValue<E extends Node = HTMLElement>(
id: Matcher,
options?: MatcherOptions,
): Chainable<(E | null)[]>
queryAllByValue<K extends keyof HTMLElementTagNameMap>(
queryAllByDisplayValue<K extends keyof HTMLElementTagNameMap>(
id: Matcher,
options?: MatcherOptions,
): Chainable<(HTMLElementTagNameMap[K] | null)[]>
Expand All @@ -628,11 +628,11 @@ declare global {
* @see https://github.com/testing-library/cypress-testing-library#usage
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
*/
getByValue<E extends Node = HTMLElement>(
getByDisplayValue<E extends Node = HTMLElement>(
id: Matcher,
options?: MatcherOptions,
): Chainable<E>
getByValue<K extends keyof HTMLElementTagNameMap>(
getByDisplayValue<K extends keyof HTMLElementTagNameMap>(
id: Matcher,
options?: MatcherOptions,
): Chainable<HTMLElementTagNameMap[K]>
Expand All @@ -648,11 +648,11 @@ declare global {
* @see https://github.com/testing-library/cypress-testing-library#usage
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
*/
getAllByValue<E extends Node = HTMLElement>(
getAllByDisplayValue<E extends Node = HTMLElement>(
id: Matcher,
options?: MatcherOptions,
): Chainable<E[]>
getAllByValue<K extends keyof HTMLElementTagNameMap>(
getAllByDisplayValue<K extends keyof HTMLElementTagNameMap>(
id: Matcher,
options?: MatcherOptions,
): Chainable<HTMLElementTagNameMap[K][]>
Expand Down

0 comments on commit fd3b321

Please sign in to comment.