After I recompile my project with TS 2.7.1 I notice pretty strange code in many (but not all) classes.
Before:
peObjectList.prototype.createCommands = function () {
var that = this, commands = _super.prototype.createCommands.call(that);
commands.SelectAll = new core.commands.BoundCommand(that.doSelectAll, that.canSelectAll, that);
return commands;
};
After:
peObjectList.prototype.createCommands = function () {
var that = this, commands = (_a = _super.prototype.createCommands).call.call(_a, that);
commands.SelectAll = new core.commands.BoundCommand(that.doSelectAll, that.canSelectAll, that);
return commands;
var _a;
};
Original TS code:
protected createCommands(): lang.Map<ICommand> {
let that = this,
commands = super.createCommands.call(that);
commands.SelectAll = new core.commands.BoundCommand(that.doSelectAll, that.canSelectAll, that);
return commands;
}
May I ask why is it needed to call base methods via so strange construct (.call.call)?
I haven't found any info on this mentioned in release notes.
After I recompile my project with TS 2.7.1 I notice pretty strange code in many (but not all) classes.
Before:
After:
Original TS code:
May I ask why is it needed to call base methods via so strange construct (.call.call)?
I haven't found any info on this mentioned in release notes.