Commit Graph

107 Commits

Author SHA1 Message Date
Jan Aagaard
438405f081 events added to ViewOptions (#9004) 2016-04-18 00:24:50 +09:00
webbiesdk
88736ffa1d Backbone: History.getFragment, the implementation doesn't have any mention of a second argument (#8949) 2016-04-13 00:48:30 +09:00
Masahiro Wakame
e2d55cb761 Merge pull request #6401 from Spinarooni/backbone-comparator-issue#6394
Update Backbone collection.comparator definition to accpet string and…
2016-03-27 01:25:32 +09:00
vvakame
7de6c3dd94 Merge branch 'master' into rename-repo-url 2016-03-17 21:06:54 +09:00
vvakame
14fe4313f4 replace internal module to namespace 2016-03-17 02:18:10 +09:00
vvakame
56295f5058 replace https://github.com/borisyankov/DefinitelyTyped to https://github.com/DefinitelyTyped/DefinitelyTyped 2016-03-17 00:55:26 +09:00
Randy Patterson Jr
9bec26ff32 Update Backbone collection.comparator definition to accpet string and Function types. Closes #6394. 2016-03-04 09:00:25 -05:00
vvakame
6ecf96f408 adhoc fix backbone/backbone-with-lodash-tests.ts and backbone/backbone-tests.ts 2016-02-23 15:29:47 +09:00
vvakame
4de74cb527 normalize line ending (CRLF -> LF) 2016-02-16 01:20:30 +09:00
DomiR
808a31e15f (feature) Fist step to upgrade lodash to 4.0.0 2016-01-23 14:39:10 +01:00
Sascha Thiel
2f5765d6be isn't the same, so just added the "data" attribute. 2015-12-07 15:08:00 +01:00
Sascha Thiel
9e91f2a6c2 PesistenceOptions is actually JQueryAjaxSettings.
backbone.js:Backbone.sync
> // Make the request, allowing the user to override any Ajax options.
> var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
2015-12-07 14:31:10 +01:00
Sebastian Lenz
6748bfa488 Add delegate and undelegate methods to View
Backbone allows delegating and undelegating single events on view classes as stated in the [annotated source](http://backbonejs.org/docs/backbone.html#section-163). This pull requests add the two methods to the View class.
2015-11-02 22:38:51 +01:00
Omid K. Rad
029999da9e Add overload for Backbone.Events.on() 2015-10-26 17:09:17 -07:00
Omid K. Rad
8863daa0c3 Add interfaces for ObjectHash, RoutesHash and EventsHash 2015-10-26 17:08:57 -07:00
Ben Coveney
fa7fcd32f3 Backbone: Fixed History.Started being undefined
The History.started flag is set on the class rather than on the class instance (as it is set once globally). Attempts to read *Backbone.history.started* (via the global history instance) always return undefined. Instead the typing should be static member (*Backbone.History.started* is where the correct value is located). This can be seen at http://backbonejs.org/docs/backbone.html#section-203
2015-10-23 10:27:29 +01:00
vvakame
b27d0d0e1c fix npm run test failed 2015-10-14 13:56:47 +09:00
vvakame
19c3cea535 add backbone/backbone-global.d.ts.tscparams 2015-10-13 01:50:29 +09:00
vvakame
6560904177 move backbone.d.ts to backbone-global.d.ts 2015-10-13 00:16:22 +09:00
Jason Young
de9e6a4867 Remove hard reference to underscore typings
I removed the hard reference to the underscore typings. Keeping this reference in here makes it impossible to mix lodash and underscore in the same projects. In my case, another library is bringing in lodash, so I don't really have a choice.

By leaving out this reference, underscore or lodash can be included separately, and the user will still get typing information on that.
2015-10-07 18:05:10 -07:00
Morris Allison III
ec7f772c2b Add the "replace" option to "router.navigate()"
See Backbone documentation for the option here:
http://backbonejs.org/#Router-navigate
2015-09-14 12:50:31 -04:00
Masahiro Wakame
ecbdfe2832 Merge pull request #4907 from Softpagehomeware/bugfix/marionette/generics_for_collections
fixed the Collection- / Composite child view issue.
2015-08-21 22:34:32 +09:00
Ben Coveney
1360a859c9 Grouped function overloads into single definitions
Union types available in typescript as of 1.4. Some semantically identical overloaded function definitions have been tidied up into single definitions.
2015-08-03 15:50:30 +01:00
Ben Coveney
7ea45fcc6c Fixed spelling mistakes, inconsistency 2015-07-31 13:44:56 +01:00
Basarat Ali Syed
dd4d30bbc3 Merge pull request #4931 from Wordenskjold/patch-2
Make it possible to initialize a Backbone.Collection from raw objects
2015-07-30 07:40:38 +10:00
Salehen Shovon Rahman
8b706fb1c6 Added slice to Backbone.Collection
Without it, TypeScript throws a type error, stating that `Collection<TModel>` does not have a method called `slice`.
2015-07-21 15:09:23 -07:00
Frederik Wordenskjold
ea103215ea Make it possible to initialize a Backbone.Collection from raw objects
The following syntax is supported in Backbone, but is currently not compileable in Typescript:

    var data = [
      { id: 1, bar: 'foo' },
      { id: 2, bar: 'baz' }
    ];

    var myCollection = new Backbone.Collection(data);

As of now, the constructor expects an array of models. I've added the Object[] parameter type, in addition to the TModel[] type to support this syntax.
2015-07-15 16:20:54 +02:00
Sascha Thiel
2d2a7cc0d4 quckfix for the backbone part. To fully support the marionette changes. 2015-07-13 11:07:07 +02:00
pafflique
70761a5ae8 Allow mixed content in Collection.add
Valid for TypeScript 1.4
2015-07-07 17:11:04 +03:00
pafflique
3387b8b715 Collection.add signature fix
http://backbonejs.org/#Collection-add - "Returns the added (or preexisting, if duplicate) models."
2015-07-07 16:57:09 +03:00
Sascha Thiel
f42164e284 fixed the collection TModel workaround. 2015-05-22 14:19:45 +02:00
Yui T
a88024c770 Update breaking change from parsing class declaration in strict mode (as specified in ES6) 2015-04-08 11:35:43 -07:00
alphaleonis
025c836d3d Fixed incorrect definition of attributes property in ViewOptions. 2015-01-08 19:33:21 +01:00
Peter Palotas
a5366e6012 Changed declaration of Backbone.Router.routes. This is not neccessarily a function, but may also be a simple hash. 2014-12-29 11:13:58 +01:00
Daniel Heim
7c55442aa2 Updated initialize methods.
Added initialize methods to View and Collection.
Updated initialize method in Model.
2014-12-04 22:33:56 +11:00
Daniel Heim
f3b608f4b2 RegExp support for Router.route;
Router.route allows for regular expressions, as well as strings, for the "route" argument. See http://backbonejs.org/#Router-route
2014-11-27 23:10:07 +11:00
Dave Taylor
320f0b1817 fix: Collection.map iterator return any rather than any 2014-11-26 08:39:11 +00:00
froginvasion
decf4875a6 removed methods in collection that were mixed in that are no longer there. Removed from View, it isnt there anymore since 0.9.0 2014-08-13 14:28:33 +02:00
Omid K. Rad
48a3150ca5 Backbone.emulateJSON
http://backbonejs.org/#Sync-emulateJSON
2014-07-21 16:04:35 -07:00
Omid K. Rad
c18eb2ad64 Added test for adding object literals as models 2014-07-16 19:42:09 -07:00
Omid K. Rad
d205eb8726 Updated collection tests and added comments 2014-07-16 18:34:55 -07:00
Omid K. Rad
06392eab94 How to access attributes in a strongly-typed manner
Only added comments and examples
2014-07-16 16:12:00 -07:00
Omid K. Rad
c743233ab0 Overloads for Collection.get method 2014-07-16 16:08:00 -07:00
Omid K. Rad
213d8c7da7 Adding back Backbone.$
http://backbonejs.org/#Utility-Backbone-$

Also removed `setDomLibrary`

Backbone change log 0.9.9 — Dec. 13, 2012:
To set what library Backbone uses for DOM manipulation and Ajax calls,
use `Backbone.$ = ...` instead of `setDomLibrary`.
2014-07-16 15:31:44 -07:00
dsuket
e259b16093 fixed bug. change Collection.collection to Model.collection 2014-07-08 08:39:28 +09:00
Bart van der Schoor
1d345f6c14 cleaned-up headers 2014-06-18 23:31:11 +02:00
vvakame
a23785ab1b remove not required .tscparams 2014-05-11 11:22:03 +09:00
Omid K. Rad
c4d0c9a551 Backbone Generics 2014-04-24 17:45:31 -07:00
Trevor
192cf1c9c7 add set to Collection 2014-04-11 10:26:09 -07:00
Trevor
5954ef2842 add options to History 2014-04-11 10:25:09 -07:00