File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff 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}
2929export 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 *
You can’t perform that action at this time.
0 commit comments