mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
Changed changedAttributes method to return any, instead of any | boolean. And added some JSDoc to describe its behaviour.
This commit is contained in:
9
backbone/backbone-global.d.ts
vendored
9
backbone/backbone-global.d.ts
vendored
@@ -153,7 +153,14 @@ declare namespace Backbone {
|
||||
/*private*/ set(attributeName: string, value: any, options?: ModelSetOptions): Model;
|
||||
set(obj: any, options?: ModelSetOptions): Model;
|
||||
|
||||
changedAttributes(attributes?: any): any | boolean;
|
||||
/**
|
||||
* Return an object containing all the attributes that have changed, or
|
||||
* false if there are no changed attributes. Useful for determining what
|
||||
* parts of a view need to be updated and/or what attributes need to be
|
||||
* persisted to the server. Unset attributes will be set to undefined.
|
||||
* You can also pass an attributes object to diff against the model,
|
||||
* determining if there *would be* a change. */
|
||||
changedAttributes(attributes?: any): any;
|
||||
clear(options?: Silenceable): any;
|
||||
clone(): Model;
|
||||
destroy(options?: ModelDestroyOptions): any;
|
||||
|
||||
2
backbone/backbone.d.ts
vendored
2
backbone/backbone.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Backbone 1.0.0
|
||||
// Type definitions for Backbone 1.3.3
|
||||
// Project: http://backbonejs.org/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Natan Vivo <https://github.com/nvivo/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
Reference in New Issue
Block a user