mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 12:09:04 +08:00
parse: Add fromJSON
This commit is contained in:
3
types/parse/index.d.ts
vendored
3
types/parse/index.d.ts
vendored
@@ -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<T extends Object>(list: T[], options: SuccessFailureOptions): Promise<T[]>;
|
||||
static fetchAllIfNeeded<T extends Object>(list: T[], options: SuccessFailureOptions): Promise<T[]>;
|
||||
static destroyAll<T>(list: T[], options?: Object.DestroyAllOptions): Promise<T[]>;
|
||||
static saveAll<T extends Object>(list: T[], options?: Object.SaveAllOptions): Promise<T[]>;
|
||||
|
||||
static registerSubclass<T extends Object>(className: string, clazz: new (options?: any) => T): void;
|
||||
|
||||
initialize(): void;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user