adhoc fix backbone/backbone-with-lodash-tests.ts and backbone/backbone-tests.ts

This commit is contained in:
vvakame
2016-02-23 15:28:43 +09:00
parent 73003b86ee
commit 6ecf96f408
2 changed files with 2 additions and 2 deletions

View File

@@ -29,11 +29,11 @@ class SettingDefaults extends Backbone.Model {
}
constructor(attributes?: any, options?: any) {
super(attributes, options); // error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
this.defaults = <any>{
name: "Joe"
}
// super has to come last
super(attributes, options);
}
// or set it like this

View File

@@ -30,11 +30,11 @@ class SettingDefaults extends Backbone.Model {
}
constructor(attributes?: any, options?: any) {
super(attributes, options); // TODO error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
this.defaults = <any>{
name: "Joe"
}
// super has to come last
super(attributes, options);
}
// or set it like this