From 6ecf96f40805db2430bfeec64760183687b33d40 Mon Sep 17 00:00:00 2001 From: vvakame Date: Tue, 23 Feb 2016 15:28:43 +0900 Subject: [PATCH] adhoc fix backbone/backbone-with-lodash-tests.ts and backbone/backbone-tests.ts --- backbone/backbone-tests.ts | 2 +- backbone/backbone-with-lodash-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backbone/backbone-tests.ts b/backbone/backbone-tests.ts index 017546642..4f719f92b 100644 --- a/backbone/backbone-tests.ts +++ b/backbone/backbone-tests.ts @@ -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 = { name: "Joe" } // super has to come last - super(attributes, options); } // or set it like this diff --git a/backbone/backbone-with-lodash-tests.ts b/backbone/backbone-with-lodash-tests.ts index 0138b2603..001882ca0 100644 --- a/backbone/backbone-with-lodash-tests.ts +++ b/backbone/backbone-with-lodash-tests.ts @@ -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 = { name: "Joe" } // super has to come last - super(attributes, options); } // or set it like this