Backbone.Router now extends Events

The Backbone.Router class did not previously extend Events in the
definition file. This caused the TypeScript compiler to raise an
error when calling one of the Events methods (such as on()) on an
instance of a router.

This change allows instances of classes derived from Backbone.Router
to call methods on the Events class that are inherited by the router.
This commit is contained in:
Stuart Thompson authored and Damiano committed 2012-12-26 09:28:10 +01:00
1 parent cb1ba44af7
commit cdb485d942
1 file changed
+1 -1
+1 -1
View File
@@ -180,7 +180,7 @@ declare module Backbone {
zip(...model: Model[]): Model[];
}
export class Router {
export class Router extends Events {
static extend(properties: any, classProperties?: any): any; // do not use, prefer TypeScript's extend functionality