mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Add correct Promise return types (#36312)
This commit is contained in:
committed by
Benjamin Lichtman
parent
b1d4a8a76a
commit
1fa08d6f12
Vendored
+21
-21
@@ -40,21 +40,21 @@ declare namespace Parse {
|
||||
}
|
||||
|
||||
interface FullOptions {
|
||||
success?: Function;
|
||||
error?: Function;
|
||||
useMasterKey?: boolean;
|
||||
sessionToken?: string;
|
||||
installationId?: string;
|
||||
progress?: Function;
|
||||
success?: Function;
|
||||
error?: Function;
|
||||
useMasterKey?: boolean;
|
||||
sessionToken?: string;
|
||||
installationId?: string;
|
||||
progress?: Function;
|
||||
}
|
||||
|
||||
interface RequestOptions {
|
||||
useMasterKey?: boolean;
|
||||
sessionToken?: string;
|
||||
installationId?: string;
|
||||
batchSize?: number;
|
||||
include?: string | string[];
|
||||
progress?: Function;
|
||||
useMasterKey?: boolean;
|
||||
sessionToken?: string;
|
||||
installationId?: string;
|
||||
batchSize?: number;
|
||||
include?: string | string[];
|
||||
progress?: Function;
|
||||
}
|
||||
|
||||
interface SuccessFailureOptions extends SuccessOption, ErrorOption {
|
||||
@@ -477,7 +477,7 @@ declare namespace Parse {
|
||||
addDescending(key: string[]): Query<T>;
|
||||
ascending(key: string): Query<T>;
|
||||
ascending(key: string[]): Query<T>;
|
||||
aggregate(pipeline: Query.AggregationOptions|Query.AggregationOptions[]): Query<T>;
|
||||
aggregate<V = any>(pipeline: Query.AggregationOptions | Query.AggregationOptions[]): Promise<V>;
|
||||
containedBy(key: string, values: any[]): Query<T>;
|
||||
containedIn(key: string, values: any[]): Query<T>;
|
||||
contains(key: string, substring: string): Query<T>;
|
||||
@@ -489,7 +489,7 @@ declare namespace Parse {
|
||||
doesNotExist(key: string): Query<T>;
|
||||
doesNotMatchKeyInQuery<U extends Object>(key: string, queryKey: string, query: Query<U>): Query<T>;
|
||||
doesNotMatchQuery<U extends Object>(key: string, query: Query<U>): Query<T>;
|
||||
distinct(key: string): Query<T>;
|
||||
distinct<V = any>(key: string): Promise<V>;
|
||||
each(callback: Function, options?: Query.EachOptions): Promise<void>;
|
||||
endsWith(key: string, suffix: string): Query<T>;
|
||||
equalTo(key: string, value: any): Query<T>;
|
||||
@@ -538,20 +538,20 @@ declare namespace Parse {
|
||||
|
||||
// According to http://docs.parseplatform.org/rest/guide/#aggregate-queries
|
||||
interface AggregationOptions {
|
||||
group?: { objectId?: string, [key:string]: any };
|
||||
match?: {[key: string]: any};
|
||||
project?: {[key: string]: any};
|
||||
group?: { objectId?: string, [key: string]: any };
|
||||
match?: { [key: string]: any };
|
||||
project?: { [key: string]: any };
|
||||
limit?: number;
|
||||
skip?: number;
|
||||
// Sort documentation https://docs.mongodb.com/v3.2/reference/operator/aggregation/sort/#pipe._S_sort
|
||||
sort?: {[key: string]: 1|-1};
|
||||
sort?: { [key: string]: 1 | -1 };
|
||||
}
|
||||
|
||||
// According to https://parseplatform.org/Parse-SDK-JS/api/2.1.0/Parse.Query.html#fullText
|
||||
interface FullTextOptions {
|
||||
language?: string;
|
||||
caseSensitive?: boolean;
|
||||
diacriticSensitive?: boolean;
|
||||
language?: string;
|
||||
caseSensitive?: boolean;
|
||||
diacriticSensitive?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user