mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
do not use for-of and const
https://github.com/Microsoft/TypeScript/issues/10220
This commit is contained in:
@@ -243,7 +243,7 @@ class ExtHostApiCommands {
|
||||
return this._commands.executeCommand<[IWorkspaceSymbolProvider, IWorkspaceSymbol[]][]>('_executeWorkspaceSymbolProvider', { query }).then(value => {
|
||||
const result: types.SymbolInformation[] = [];
|
||||
if (Array.isArray(value)) {
|
||||
for (const tuple of value) {
|
||||
for (let tuple of value) {
|
||||
result.push(...tuple[1].map(typeConverters.toSymbolInformation));
|
||||
}
|
||||
}
|
||||
@@ -343,7 +343,7 @@ class ExtHostApiCommands {
|
||||
if (values) {
|
||||
let items: types.CompletionItem[] = [];
|
||||
let incomplete: boolean;
|
||||
for (const item of values) {
|
||||
for (let item of values) {
|
||||
incomplete = item.container.incomplete || incomplete;
|
||||
items.push(typeConverters.Suggest.to(item.container, position, item.suggestion));
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection {
|
||||
marker = [];
|
||||
const order = [DiagnosticSeverity.Error, DiagnosticSeverity.Warning, DiagnosticSeverity.Information, DiagnosticSeverity.Hint];
|
||||
orderLoop: for (let i = 0; i < 4; i++) {
|
||||
for (const diagnostic of diagnostics) {
|
||||
for (let diagnostic of diagnostics) {
|
||||
if (diagnostic.severity === order[i]) {
|
||||
const len = marker.push(DiagnosticCollection._toMarkerData(diagnostic));
|
||||
if (len === DiagnosticCollection._maxDiagnosticsPerFile) {
|
||||
|
||||
Reference in New Issue
Block a user