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
2012-12-07 15:39:11 -08:00
committed by Damiano
parent cb1ba44af7
commit cdb485d942

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