提交 518523fc 编写于 作者: R Rob Lourens

let -> const, settings

上级 91e21b59
......@@ -223,7 +223,7 @@ export class SettingsDocument {
if (location.path.length === 1 && location.previousNode && typeof location.previousNode.value === 'string' && location.previousNode.value.startsWith('[')) {
// Suggestion model word matching includes closed sqaure bracket and ending quote
// Hence include them in the proposal to replace
let range = this.document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
const range = this.document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
return this.provideLanguageCompletionItemsForLanguageOverrides(location, range, language => `"[${language}]"`);
}
return Promise.resolve([]);
......
......@@ -1071,7 +1071,7 @@ export class SettingObjectRenderer extends AbstractSettingRenderer implements IT
: {};
const newValue: Record<string, unknown> = {};
let newItems: IObjectDataItem[] = [];
const newItems: IObjectDataItem[] = [];
template.objectWidget.items.forEach((item, idx) => {
// Item was updated
......
......@@ -424,7 +424,7 @@ function wordifyKey(key: string): string {
match;
});
for (let [k, v] of knownTermMappings) {
for (const [k, v] of knownTermMappings) {
key = key.replace(new RegExp(`\\b${k}\\b`, 'gi'), v);
}
......@@ -631,7 +631,7 @@ const tagRegex = /(^|\s)@tag:("([^"]*)"|[^"]\S*)/g;
const extensionRegex = /(^|\s)@ext:("([^"]*)"|[^"]\S*)?/g;
export function parseQuery(query: string): IParsedQuery {
const tags: string[] = [];
let extensions: string[] = [];
const extensions: string[] = [];
query = query.replace(tagRegex, (_, __, quotedTag, tag) => {
tags.push(tag || quotedTag);
return '';
......@@ -643,7 +643,7 @@ export function parseQuery(query: string): IParsedQuery {
});
query = query.replace(extensionRegex, (_, __, quotedExtensionId, extensionId) => {
let extensionIdQuery: string = extensionId || quotedExtensionId;
const extensionIdQuery: string = extensionId || quotedExtensionId;
if (extensionIdQuery) {
extensions.push(...extensionIdQuery.split(',').map(s => s.trim()).filter(s => !isFalsyOrWhitespace(s)));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册