Mark a few more arrays in vscode.d.ts readonly

This makes it clear that you can't modify these arrays to add items, such as calling `breakpoints.push(...)` to add a breakpoint
This commit is contained in:
Matt Bierner
2021-11-10 17:32:15 -08:00
parent 1423849df0
commit b911788593
10 changed files with 22 additions and 24 deletions

View File

@@ -28,7 +28,7 @@ export function toggleComment(): Thenable<boolean> | undefined {
return editor.edit(editBuilder => {
let allEdits: vscode.TextEdit[][] = [];
editor.selections.reverse().forEach(selection => {
Array.from(editor.selections).reverse().forEach(selection => {
const edits = isStyleSheet(editor.document.languageId) ? toggleCommentStylesheet(editor.document, selection, <Stylesheet>rootNode) : toggleCommentHTML(editor.document, selection, rootNode!);
if (edits.length > 0) {
allEdits.push(edits);