Fixing TS 3.2 compile errors

This commit is contained in:
Matt Bierner 2018-11-12 17:54:23 -08:00
parent 4f227dd88c
commit 4737e3efd1
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ export default class MarkdownFoldingProvider implements vscode.FoldingRangeProvi
this.getRegions(document),
this.getHeaderFoldingRanges(document),
this.getBlockFoldingRanges(document)]);
return [].concat.apply([], foldables).slice(0, rangeLimit);
return ([] as vscode.FoldingRange[]).concat.apply([], foldables).slice(0, rangeLimit);
}
private async getHeaderFoldingRanges(document: vscode.TextDocument) {

View file

@ -17,5 +17,5 @@ export function equals<T>(one: T[], other: T[], itemEquals: (a: T, b: T) => bool
}
export function flatten<T>(arr: T[][]): T[] {
return [].concat.apply([], arr);
return ([] as T[]).concat.apply([], arr);
}