Merge pull request #3778 from Microsoft/noPushApply

Don't call push.apply, it can stack overflow with large arrays.
This commit is contained in:
CyrusNajmabadi
2015-07-08 11:25:48 -07:00
4 changed files with 18 additions and 18 deletions

View File

@@ -3305,7 +3305,7 @@ namespace ts {
let declarations: Declaration[] = [];
for (let prop of props) {
if (prop.declarations) {
declarations.push.apply(declarations, prop.declarations);
addRange(declarations, prop.declarations);
}
propTypes.push(getTypeOfSymbol(prop));
}