diff --git a/types/parse/index.d.ts b/types/parse/index.d.ts index 95d173fffe..b4cd725529 100644 --- a/types/parse/index.d.ts +++ b/types/parse/index.d.ts @@ -327,11 +327,12 @@ declare namespace Parse { constructor(attributes?: string[], options?: any); static extend(className: string, protoProps?: any, classProps?: any): any; + static fromJSON(json: any, override: boolean): any; + static fetchAll(list: T[], options: SuccessFailureOptions): Promise; static fetchAllIfNeeded(list: T[], options: SuccessFailureOptions): Promise; static destroyAll(list: T[], options?: Object.DestroyAllOptions): Promise; static saveAll(list: T[], options?: Object.SaveAllOptions): Promise; - static registerSubclass(className: string, clazz: new (options?: any) => T): void; initialize(): void; diff --git a/types/parse/parse-tests.ts b/types/parse/parse-tests.ts index 282913d17e..ad1a2a2a83 100644 --- a/types/parse/parse-tests.ts +++ b/types/parse/parse-tests.ts @@ -56,6 +56,8 @@ function test_object() { gameScore.addUnique("skills", "kungfu"); game.set("gameScore", gameScore); + + var gameCopy = Game.fromJSON(JSON.parse(JSON.stringify(game)), true); } function test_query() {