Skip to content

Commit 60d4de4

Browse files
committed
improve coverage
1 parent d256d4b commit 60d4de4

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/ParseQuery.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,9 +1598,10 @@ class ParseQuery<T extends ParseObject = ParseObject> {
15981598
* @param {string} options.index The index to search
15991599
* @returns {Promise} Returns a promise that will be resolved with the results
16001600
* of the search
1601-
* */
1601+
*
1602+
*/
16021603

1603-
async search(value: string, path: string[], options: SearchOptions = {}): Promise<T[]> {
1604+
async search(value: string, path: string[], options?: SearchOptions): Promise<T[]> {
16041605
if (!value) {
16051606
throw new Error('A search term is required.');
16061607
}

src/__tests__/ParseQuery-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2747,7 +2747,7 @@ describe('ParseQuery', () => {
27472747
CoreManager.setQueryController({
27482748
find() {},
27492749
aggregate() {
2750-
return Promise.resolve({});
2750+
return Promise.resolve();
27512751
},
27522752
});
27532753

types/ParseQuery.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ declare class ParseQuery<T extends ParseObject = ParseObject> {
637637
* @returns {Parse.Query} Returns the query, so you can chain this call.
638638
*/
639639
fullText<K extends keyof T['attributes'] | keyof BaseAttributes>(key: K, value: string, options?: FullTextQueryOptions): this;
640-
search(value: string, path: string[], options?: SearchOptions): Promise<any[]>;
640+
search(value: string, path: string[], options?: SearchOptions): Promise<T[]>;
641641
/**
642642
* Method to sort the full text search by text score
643643
*

0 commit comments

Comments
 (0)