@@ -41,7 +41,7 @@ export type FindAllByQuery<Predicate, Options = void> = (
4141 waitForOptions ?: WaitForOptions ,
4242) => Promise < HostElement [ ] > ;
4343
44- type UnboundQuery < Query > = ( instance : HostElement ) => Query ;
44+ type UnboundQuery < Query > = ( element : HostElement ) => Query ;
4545
4646export type UnboundQueries < Predicate , Options > = {
4747 getBy : UnboundQuery < GetByQuery < Predicate , Options > > ;
@@ -114,9 +114,9 @@ export function makeQueries<Predicate, Options>(
114114 getMissingError : ( predicate : Predicate , options ?: Options ) => string ,
115115 getMultipleError : ( predicate : Predicate , options ?: Options ) => string ,
116116) : UnboundQueries < Predicate , Options > {
117- function getAllByQuery ( instance : HostElement , { printElementTree = true } = { } ) {
117+ function getAllByQuery ( element : HostElement , { printElementTree = true } = { } ) {
118118 return function getAllFn ( predicate : Predicate , options ?: Options ) {
119- const results = queryAllByQuery ( instance ) ( predicate , options ) ;
119+ const results = queryAllByQuery ( element ) ( predicate , options ) ;
120120
121121 if ( results . length === 0 ) {
122122 const errorMessage = formatErrorMessage (
@@ -130,9 +130,9 @@ export function makeQueries<Predicate, Options>(
130130 } ;
131131 }
132132
133- function queryByQuery ( instance : HostElement , { printElementTree = true } = { } ) {
133+ function queryByQuery ( element : HostElement , { printElementTree = true } = { } ) {
134134 return function singleQueryFn ( predicate : Predicate , options ?: Options ) {
135- const results = queryAllByQuery ( instance ) ( predicate , options ) ;
135+ const results = queryAllByQuery ( element ) ( predicate , options ) ;
136136
137137 if ( results . length > 1 ) {
138138 throw new ErrorWithStack (
@@ -149,9 +149,9 @@ export function makeQueries<Predicate, Options>(
149149 } ;
150150 }
151151
152- function getByQuery ( instance : HostElement , { printElementTree = true } = { } ) {
152+ function getByQuery ( element : HostElement , { printElementTree = true } = { } ) {
153153 return function getFn ( predicate : Predicate , options ?: Options ) {
154- const results = queryAllByQuery ( instance ) ( predicate , options ) ;
154+ const results = queryAllByQuery ( element ) ( predicate , options ) ;
155155
156156 if ( results . length > 1 ) {
157157 throw new ErrorWithStack ( getMultipleError ( predicate , options ) , getFn ) ;
@@ -169,7 +169,7 @@ export function makeQueries<Predicate, Options>(
169169 } ;
170170 }
171171
172- function findAllByQuery ( instance : HostElement ) {
172+ function findAllByQuery ( element : HostElement ) {
173173 return function findAllFn (
174174 predicate : Predicate ,
175175 queryOptions ?: Options & WaitForOptions ,
@@ -182,7 +182,7 @@ export function makeQueries<Predicate, Options>(
182182 const deprecatedWaitForOptions = extractDeprecatedWaitForOptions ( queryOptions ) ;
183183
184184 return waitFor (
185- ( ) => getAllByQuery ( instance , { printElementTree : false } ) ( predicate , queryOptions ) ,
185+ ( ) => getAllByQuery ( element , { printElementTree : false } ) ( predicate , queryOptions ) ,
186186 {
187187 ...deprecatedWaitForOptions ,
188188 ...waitForOptions ,
@@ -193,7 +193,7 @@ export function makeQueries<Predicate, Options>(
193193 } ;
194194 }
195195
196- function findByQuery ( instance : HostElement ) {
196+ function findByQuery ( element : HostElement ) {
197197 return function findFn (
198198 predicate : Predicate ,
199199 queryOptions ?: Options & WaitForOptions ,
@@ -206,7 +206,7 @@ export function makeQueries<Predicate, Options>(
206206 const deprecatedWaitForOptions = extractDeprecatedWaitForOptions ( queryOptions ) ;
207207
208208 return waitFor (
209- ( ) => getByQuery ( instance , { printElementTree : false } ) ( predicate , queryOptions ) ,
209+ ( ) => getByQuery ( element , { printElementTree : false } ) ( predicate , queryOptions ) ,
210210 {
211211 ...deprecatedWaitForOptions ,
212212 ...waitForOptions ,
0 commit comments