@@ -119,17 +119,6 @@ export interface HarnessLoader {
119
119
*/
120
120
getHarnessOrNull < T extends ComponentHarness > ( query : HarnessQuery < T > ) : Promise < T | null > ;
121
121
122
- /**
123
- * Searches for an instance of the component corresponding to the given harness type under the
124
- * `HarnessLoader`'s root element, and returns a `ComponentHarness` for the instance on the page
125
- * at the given index. If no matching component exists at that index, an error is thrown.
126
- * @param query A query for a harness to create
127
- * @param index The zero-indexed offset of the matching component instance to return
128
- * @return An instance of the given harness type.
129
- * @throws If a matching component instance can't be found at the given index.
130
- */
131
- getHarnessAtIndex < T extends ComponentHarness > ( query : HarnessQuery < T > , index : number ) : Promise < T > ;
132
-
133
122
/**
134
123
* Searches for all instances of the component corresponding to the given harness type under the
135
124
* `HarnessLoader`'s root element, and returns a list `ComponentHarness` for each instance.
@@ -138,14 +127,6 @@ export interface HarnessLoader {
138
127
*/
139
128
getAllHarnesses < T extends ComponentHarness > ( query : HarnessQuery < T > ) : Promise < T [ ] > ;
140
129
141
- /**
142
- * Searches for all instances of the component corresponding to the given harness type under the
143
- * `HarnessLoader`'s root element, and returns the total count of all matching components.
144
- * @param query A query for a harness to create
145
- * @return An integer indicating the number of instances that were found.
146
- */
147
- countHarnesses < T extends ComponentHarness > ( query : HarnessQuery < T > ) : Promise < number > ;
148
-
149
130
/**
150
131
* Searches for an instance of the component corresponding to the given harness type under the
151
132
* `HarnessLoader`'s root element, and returns a boolean indicating if any were found.
@@ -519,20 +500,6 @@ export abstract class ContentContainerComponentHarness<S extends string = string
519
500
return ( await this . getRootHarnessLoader ( ) ) . getHarnessOrNull ( query ) ;
520
501
}
521
502
522
- /**
523
- * Gets a matching harness for the given query and index within the current harness's content.
524
- * @param query The harness query to search for.
525
- * @param index The zero-indexed offset of the component to find.
526
- * @returns The first harness matching the given query.
527
- * @throws If no matching harness is found.
528
- */
529
- async getHarnessAtIndex < T extends ComponentHarness > (
530
- query : HarnessQuery < T > ,
531
- index : number ,
532
- ) : Promise < T > {
533
- return ( await this . getRootHarnessLoader ( ) ) . getHarnessAtIndex ( query , index ) ;
534
- }
535
-
536
503
/**
537
504
* Gets all matching harnesses for the given query within the current harness's content.
538
505
* @param query The harness query to search for.
@@ -542,23 +509,12 @@ export abstract class ContentContainerComponentHarness<S extends string = string
542
509
return ( await this . getRootHarnessLoader ( ) ) . getAllHarnesses ( query ) ;
543
510
}
544
511
545
- /**
546
- * Returns the number of matching harnesses for the given query within the current harness's
547
- * content.
548
- *
549
- * @param query The harness query to search for.
550
- * @returns The number of matching harnesses for the given query.
551
- */
552
- async countHarnesses < T extends ComponentHarness > ( query : HarnessQuery < T > ) : Promise < number > {
553
- return ( await this . getRootHarnessLoader ( ) ) . countHarnesses ( query ) ;
554
- }
555
-
556
512
/**
557
513
* Checks whether there is a matching harnesses for the given query within the current harness's
558
514
* content.
559
515
*
560
516
* @param query The harness query to search for.
561
- * @returns Whether there is matching harnesses for the given query.
517
+ * @returns Whetehr there is matching harnesses for the given query.
562
518
*/
563
519
async hasHarness < T extends ComponentHarness > ( query : HarnessQuery < T > ) : Promise < boolean > {
564
520
return ( await this . getRootHarnessLoader ( ) ) . hasHarness ( query ) ;
0 commit comments