microsoft / TypeScriptSamples

Community Driven Samples for TypeScript
3.19k stars 1.78k forks source link

Why is super() called twice in the sample of Todo app? #116

Closed fspillner closed 8 years ago

fspillner commented 8 years ago

Hi,

I'm new related to TypeScript. I try to understand the sample code like here:

https://github.com/Microsoft/TypeScriptSamples/blob/master/todomvc/js/todos.ts#L204

I wonder why you don't call super(options) in the first line of the constructor. Instead of that you call super() with no arguments and a few lines later super(options) with arguments again.

Can you explain me why?

Thank you.

DanielRosenwasser commented 8 years ago

Looks like a bug introduced by #114. A fix is out in #117.

fspillner commented 8 years ago

Thank you <3

DanielRosenwasser commented 8 years ago

You're welcome! Thanks for the heads up!