提交 05aaf618 编写于 作者: M Matt Bierner 提交者: Joao Moreno

For let -> For const

上级 24eb3639
......@@ -76,7 +76,7 @@ export default class TypeScriptDocumentSymbolProvider implements DocumentSymbolP
bucket.push(result);
}
if (item.childItems && item.childItems.length > 0) {
for (let child of item.childItems) {
for (const child of item.childItems) {
TypeScriptDocumentSymbolProvider.convertNavBar(resource, realIndent + 1, foldingMap, bucket, child, item.text);
}
}
......
......@@ -89,7 +89,7 @@ export class TypeScriptFormattingProvider implements DocumentRangeFormattingEdit
if (!edits) {
return result;
}
for (let edit of edits) {
for (const edit of edits) {
let textEdit = this.codeEdit2SingleEditOperation(edit);
let range = textEdit.range;
// Work around for https://github.com/Microsoft/TypeScript/issues/6700.
......
......@@ -246,7 +246,7 @@ export default class TypeScriptServiceClientHost implements ITypeScriptServiceCl
private createMarkerDatas(diagnostics: Proto.Diagnostic[], source: string): Diagnostic[] {
const result: Diagnostic[] = [];
for (let diagnostic of diagnostics) {
for (const diagnostic of diagnostics) {
const { start, end, text } = diagnostic;
const range = new Range(tsLocationToVsPosition(start), tsLocationToVsPosition(end));
const converted = new Diagnostic(range, text);
......
......@@ -205,7 +205,7 @@ function computeLargeRoots(configFileName: string, fileNames: string[]): string[
// console.log(dir, fileNames);
for (let fileName of fileNames) {
for (const fileName of fileNames) {
if (fileName.indexOf(dir) === 0) {
let first = fileName.substring(dir.length + 1);
first = first.substring(0, first.indexOf('/'));
......@@ -226,7 +226,7 @@ function computeLargeRoots(configFileName: string, fileNames: string[]): string[
let result: string[] = [];
let sum = 0;
for (let e of data) {
for (const e of data) {
sum += e.count;
result.push(e.root);
if (fileNames.length - sum < fileLimit) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册