From fab55e0af1f9ccfb00dbc26281e87bfb60ad8e77 Mon Sep 17 00:00:00 2001 From: Diamond Lewis Date: Wed, 20 Mar 2019 11:38:30 -0500 Subject: [PATCH] fix tests --- types/parse/index.d.ts | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/types/parse/index.d.ts b/types/parse/index.d.ts index da3fde2dc6..ba3d546ca5 100644 --- a/types/parse/index.d.ts +++ b/types/parse/index.d.ts @@ -36,6 +36,24 @@ declare namespace Parse { error?: Function; } + interface FullOptions { + 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; + } + interface SuccessFailureOptions extends SuccessOption, ErrorOption { } @@ -275,7 +293,7 @@ declare namespace Parse { static extend(className: string | { className: string }, protoProps?: any, classProps?: any): any; static fetchAll(list: T[], options: Object.FetchAllOptions): Promise; static fetchAllIfNeeded(list: T[], options: Object.FetchAllOptions): Promise; - static fetchAllWithInclude(list: T[], keys: string | Array>, options: Object.RequestOptions): any; + static fetchAllWithInclude(list: T[], keys: string | Array>, options: RequestOptions): Promise; static fromJSON(json: any, override: boolean): any; static pinAll(objects: Object[]): Promise; static pinAllWithName(name: string, objects: Object[]): Promise; @@ -302,7 +320,7 @@ declare namespace Parse { existed(): boolean; fetch(options?: Object.FetchOptions): Promise; fetchFromLocalDatastore(): Promise | void; - fetchWithInclude(keys: keys: string | Array>, options?: Object.RequestOptions): Promise; + fetchWithInclude(keys: string | Array>, options?: RequestOptions): Promise; get(attr: string): any | undefined; getACL(): ACL | undefined; has(attr: string): boolean; @@ -457,7 +475,7 @@ declare namespace Parse { containedIn(key: string, values: any[]): Query; contains(key: string, substring: string): Query; containsAll(key: string, values: any[]): Query; - containsAllStartingWith(key: string, values: string[]): Query; + containsAllStartingWith(key: string, values: any[]): Query; count(options?: Query.CountOptions): Promise; descending(key: string): Query; descending(key: string[]): Query;