From b1d4a8a76a825cea911b6c5268fa38d07eec135e Mon Sep 17 00:00:00 2001
From: Thibault MOCELLIN
Date: Wed, 26 Jun 2019 18:42:45 +0200
Subject: [PATCH] [parse] add definition for linkWith & _linkWith (#36258)
---
types/parse/index.d.ts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/types/parse/index.d.ts b/types/parse/index.d.ts
index 53414d9769..39bbe89a6c 100644
--- a/types/parse/index.d.ts
+++ b/types/parse/index.d.ts
@@ -12,6 +12,7 @@
// Jong Eun Lee
// Julien Quere
// Yago Tomé
+// Thibault MOCELLIN
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
@@ -103,6 +104,10 @@ declare namespace Parse {
toJSON(): any;
}
+ interface AuthData {
+ [key: string]: any
+ }
+
class BaseObject implements IBaseObject {
toJSON(): any;
}
@@ -681,7 +686,6 @@ subscription.on('close', () => {});
* uniqueness.
*/
class User extends Object {
-
static allowCustomUserClass(isAllowed: boolean): void;
static become(sessionToken: string, options?: UseMasterKeyOption): Promise;
static current(): User | undefined;
@@ -707,6 +711,9 @@ subscription.on('close', () => {});
setPassword(password: string, options?: SuccessFailureOptions): boolean;
getSessionToken(): string;
+
+ linkWith(user: User, authData: AuthData, options: FullOptions): Promise;
+ _linkWith(provider: any, options: { authData?: AuthData }, saveOpts?: FullOptions): Promise;
}