mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Parse.Relation.add and Parse.Relation.remove can accept a Array of Parse.Object
This commit is contained in:
Vendored
+2
-2
@@ -280,13 +280,13 @@ declare namespace Parse {
|
||||
constructor(parent?: S, key?: string);
|
||||
|
||||
//Adds a Parse.Object or an array of Parse.Objects to the relation.
|
||||
add(object: T): void;
|
||||
add(object: T | Array<T>): void;
|
||||
|
||||
// Returns a Parse.Query that is limited to objects in this relation.
|
||||
query(): Query<T>;
|
||||
|
||||
// Removes a Parse.Object or an array of Parse.Objects from this relation.
|
||||
remove(object: T): void;
|
||||
remove(object: T | Array<T>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -227,7 +227,15 @@ function test_analytics() {
|
||||
}
|
||||
|
||||
function test_relation() {
|
||||
var game1 = new Game();
|
||||
var game2 = new Game();
|
||||
|
||||
new Parse.User().relation("games").query().find().then((g: Game[]) => { });
|
||||
new Parse.User().relation("games").add(game1)
|
||||
new Parse.User().relation("games").add([game1, game2])
|
||||
|
||||
new Parse.User().relation("games").remove(game1)
|
||||
new Parse.User().relation("games").remove([game1, game2])
|
||||
}
|
||||
|
||||
function test_user_acl_roles() {
|
||||
|
||||
Reference in New Issue
Block a user