Skip to content

Commit 5a0d40b

Browse files
committed
docs: correct the return type of Object#setACL
1 parent 604f131 commit 5a0d40b

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/object.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ module.exports = function(AV) {
12631263
* @param {AV.ACL} acl An instance of AV.ACL.
12641264
* @param {Object} options Optional Backbone-like options object to be
12651265
* passed in to set.
1266-
* @return {Boolean} Whether the set passed validation.
1266+
* @return {AV.Object} self
12671267
* @see AV.Object#set
12681268
*/
12691269
setACL: function(acl, options) {

storage.d.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -280,36 +280,36 @@ export class Object extends BaseObject {
280280
static register(klass: Function, name?: string): void;
281281

282282
initialize(): void;
283-
add(attributeName: string, item: any): Object;
283+
add(attributeName: string, item: any): this;
284284
addUnique(attributeName: string, item: any): any;
285-
bitAnd(attributeName: string, item: number): Object;
286-
bitOr(attributeName: string, item: number): Object;
287-
bitXor(attributeName: string, item: number): Object;
285+
bitAnd(attributeName: string, item: number): this;
286+
bitOr(attributeName: string, item: number): this;
287+
bitXor(attributeName: string, item: number): this;
288288
change(options: any): Object;
289289
changedAttributes(diff: any): boolean;
290290
clear(options: any): any;
291291
clone(): Object;
292-
destroy<T>(options?: Object.DestroyOptions): Promise<T>;
292+
destroy(options?: Object.DestroyOptions): Promise<this>;
293293
dirty(attr: String): boolean;
294294
escape(attr: string): string;
295-
fetch<T>(fetchOptions?: FetchOptions, options?: AuthOptions): Promise<T>;
296-
fetchWhenSave(enable: boolean): any;
295+
fetch(fetchOptions?: FetchOptions, options?: AuthOptions): Promise<this>;
296+
fetchWhenSave(enable: boolean): void;
297297
get(attr: string): any;
298298
getACL(): ACL;
299299
has(attr: string): boolean;
300300
hasChanged(attr: string): boolean;
301-
increment(attr: string, amount?: number): any;
301+
increment(attr: string, amount?: number): this;
302302
isValid(): boolean;
303303
op(attr: string): any;
304304
previous(attr: string): any;
305305
previousAttributes(): any;
306306
relation(attr: string): Relation;
307-
remove(attr: string, item: any): any;
308-
save<T>(attrs?: object | null, options?: Object.SaveOptions): Promise<T>;
309-
save<T>(key: string, value: any, options?: Object.SaveOptions): Promise<T>;
310-
set(key: string, value: any, options?: Object.SetOptions): boolean;
311-
setACL(acl: ACL, options?: Object.SetOptions): boolean;
312-
unset(attr: string, options?: Object.SetOptions): any;
307+
remove(attr: string, item: any): this;
308+
save(attrs?: object | null, options?: Object.SaveOptions): Promise<this>;
309+
save(key: string, value: any, options?: Object.SaveOptions): Promise<this>;
310+
set(key: string, value: any, options?: Object.SetOptions): this;
311+
setACL(acl: ACL, options?: Object.SetOptions): this;
312+
unset(attr: string, options?: Object.SetOptions): this;
313313
validate(attrs: any): any;
314314
toFullJSON(): any;
315315
}

0 commit comments

Comments
 (0)