Skip to content

Commit 11c06d9

Browse files
committed
lint
1 parent 233ac9c commit 11c06d9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ParseQuery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ class ParseQuery<T extends ParseObject = ParseObject> {
15991599
* @returns {Promise} Returns a promise that will be resolved with the results
16001600
* of the search
16011601
* */
1602-
async search(value: string, path: string[], options: SearchOptions = {}): Promise<Array<any>> {
1602+
async search(value: string, path: string[], options?: SearchOptions): Promise<any[]> {
16031603
if (!value) {
16041604
throw new Error('A search term is required.');
16051605
}
@@ -1611,7 +1611,7 @@ class ParseQuery<T extends ParseObject = ParseObject> {
16111611
const controller = CoreManager.getQueryController();
16121612
const params = {
16131613
$search: {
1614-
index: options.index || 'default',
1614+
index: options?.index || 'default',
16151615
text: {
16161616
path,
16171617
query: value,

types/ParseQuery.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface FullTextQueryOptions {
2323
caseSensitive?: boolean;
2424
diacriticSensitive?: boolean;
2525
}
26-
interface SearchOptions{
26+
interface SearchOptions {
2727
index?: string;
2828
}
2929
export interface QueryJSON {
@@ -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<Array<any>>;
640+
search(value: string, path: string[], options?: SearchOptions): Promise<any[]>;
641641
/**
642642
* Method to sort the full text search by text score
643643
*

0 commit comments

Comments
 (0)