[backbone] Update the options for Collection.fetch (#27123)

This commit is contained in:
kenjiru 2018-07-12 18:54:00 +02:00 committed by Ryan Cavanaugh
parent 928337ff78
commit fb6990cd4d
2 changed files with 8 additions and 3 deletions

View File

@ -398,7 +398,10 @@ namespace v1Changes {
namespace Collection {
function test_fetch() {
var collection = new EmployeeCollection;
collection.fetch({ reset: true });
collection.fetch({
reset: true,
remove: false
});
}
function test_create() {

View File

@ -1,6 +1,8 @@
// 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 by: Boris Yankov <https://github.com/borisyankov>
// Natan Vivo <https://github.com/nvivo>
// kenjiru <https://github.com/kenjiru>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@ -76,7 +78,7 @@ declare namespace Backbone {
interface ModelDestroyOptions extends Waitable, PersistenceOptions {
}
interface CollectionFetchOptions extends PersistenceOptions, Parseable {
interface CollectionFetchOptions extends PersistenceOptions, Parseable, CollectionSetOptions {
reset?: boolean;
}