Commit Graph

39 Commits

Author SHA1 Message Date
Julian Gonggrijp
56683cefb0 Fix some project URLs 2019-02-15 03:29:39 +01:00
Julian Gonggrijp
6b964fe60d Re-enable all linter rules in backbone that are not violated 2019-02-15 03:15:23 +01:00
Julian Gonggrijp
b26dfca0d2 Move Backbone.EventsMixin after the Backbone.Events_* method shorthands
Because the latter can always be used, and the former only corner cases.
2019-02-15 03:15:23 +01:00
Julian Gonggrijp
342615bd7f Add shorthand interfaces for the Backbone.Events methods 2019-02-15 03:15:22 +01:00
Julian Gonggrijp
6202c307db Add the missing EventMap overload of Backbone.Events.bind 2019-02-15 03:15:22 +01:00
Julian Gonggrijp
99c51c2457 Callback argument to Backbone.Events.on is not optional 2019-02-15 03:15:22 +01:00
Julian Gonggrijp
d62916a608 Return polymorphic this from all Backbone.Events methods
Since this is what these methods actually do.
2019-02-15 03:15:22 +01:00
Julian Gonggrijp
54c9125b2f Make Backbone.Events even DRYer 2019-02-15 03:15:22 +01:00
Julian Gonggrijp
21a9d44fca Use Backbone.EventsMixin to reduce repetition
Affects backbone, backbone-relational, backbone.radio, backbone.marionette,
giraffe.

Respects #1066.
2019-02-15 03:15:22 +01:00
Julian Gonggrijp
754bd43c20 Add eventMap variants of Backbone.Events.{once,listenTo,listenToOnce}
Fixes #22156.

Affects backbone, backbone-relational, backbone.marionette, backbone.radio.
2019-02-15 03:15:22 +01:00
Julian Gonggrijp
b5528b7e88 Add context parameter to the Backbone.Events.on eventMap variant
Affects backbone, backbone-relational, backbone.marionette, backbone.radio.
2019-02-15 03:15:21 +01:00
Julian Gonggrijp
1336cf61f0 Distinguish Backbone.View EventsHash from Backbone.Events EventMap
The Backbone.Events.on eventMap parameter doesn't accept the same type of
callback functions as the Backbone.View.events hash. This change rectifies
this.

Affects backbone, backbone-relational, backbone.marionette, backbone.radio.
2019-02-15 03:15:21 +01:00
Leonard Thieu
68c38a850c [backbone] Fix test failure in backbone.marionette due to changes in jQuery Events API. 2018-11-24 09:43:05 -05:00
J. Joe Douglas
5d2d49832a no Functions 2018-11-20 21:33:37 -05:00
J. Joe Douglas
5cb38fe472 Backbone.Event is an object, not class 2018-11-20 21:15:53 -05:00
Andy
141d1cc870
And tslint disables for no-angle-bracket-type-assertion (#30592) 2018-11-16 12:20:58 -08:00
kenjiru
fb6990cd4d [backbone] Update the options for Collection.fetch (#27123) 2018-07-12 09:54:00 -07:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Armando Aguirre
0b009f4e60
Merge pull request #21666 from luckysoni/pr/backbone-history-route-add-param-type
Backbone.History.route may accept string or RegExp as first argument
2017-12-01 14:22:30 -08:00
Lucky Soni
2be9ad506f Backbone.History.route may accept string or RegExp as first argument 2017-11-21 08:03:32 +05:30
mnlegend
e4fd38e983
Update Backbone.sync to use a union
Updating file to use union to better follow the typescript Do's and Don'ts under the 'Use Union Types' section found in the link below.
https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html

This will help prevent issues where a line of code such as 'let proxiedSync = Backbone.sync;' will use the wrong sync function.
2017-11-15 10:31:15 -08:00
Nathan Shively-Sanders
9ca2957b89
Merge pull request #20612 from Spinarooni/issue-#18593
Issue #18593.  Various fixes for Backbone.
2017-11-14 10:08:45 -08:00
Daniel Rosenwasser
1a051f0000
Merge pull request #21414 from ianfp/backbone-collection-clone
add Backbone.Collection.clone()
2017-11-11 01:06:17 -08:00
Ian Phillips
21d091f2d8 Change return type of Backbone.Collection.clone() to "this" 2017-11-10 14:23:33 -08:00
Ian Phillips
774fe888b6 Add a test for Backbone.Collection.clone() 2017-11-10 13:23:34 -08:00
Andy
19f89399e4 Ensure every package has a tslint.json (#21009)
* Ensure every package has a tslint.json

* Fixes
2017-10-25 11:13:50 -07:00
Randy Patterson Jr
f91a1fa80d Set more specific types for Backbone Model and Collection url properties. (#20568) 2017-10-23 08:01:36 -07:00
Randy Patterson Jr
cbb468143e Allow sort option for Backbone Collection.add and push. Issue #18593. 2017-10-16 10:44:21 -04:00
Randy Patterson Jr
85fdbd170e Allow sync to accept a collection as it's second argument. 2017-10-16 10:36:10 -04:00
Randy Patterson Jr
c30aa15761 Make Collection.slice method
min parameter optional to match documentation.  Issue #18593.
2017-10-16 09:31:50 -04:00
Randy Patterson Jr
ad69281f23 Add correct options for Collection.set method. Issue #18593. 2017-10-16 09:14:16 -04:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Nathan Shively-Sanders
b8ea87c68e Strict function variance fixes round 1 2017-10-02 15:50:34 -07:00
ashwinr
eda85a39de change visibility specifier for extend
Fixes https://github.com/DefinitelyTyped/DefinitelyTyped/issues/6922
2017-08-21 17:56:39 -04:00
Andy
924fafffc0 Fix remaining lint errors (#19166) 2017-08-20 15:37:53 -07:00
Ian Phillips
ed76f54ebd Add Backbone.Collection.clone()
http://backbonejs.org/#Collection-clone
2017-06-20 09:58:18 -07:00
Leonard Thieu
1c3565933c :( 2017-06-13 13:00:42 -04:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00