We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5775d27 commit 323aa3aCopy full SHA for 323aa3a
1 file changed
src/services/textChanges.ts
@@ -190,6 +190,7 @@ namespace ts.textChanges {
190
public deleteNodeInList(sourceFile: SourceFile, node: Node) {
191
const containingList = formatting.SmartIndenter.getContainingList(node, sourceFile);
192
if (!containingList) {
193
+ Debug.fail("node is not a list element");
194
return this;
195
}
196
const index = containingList.indexOf(node);
@@ -260,6 +261,7 @@ namespace ts.textChanges {
260
261
public insertNodeInListAfter(sourceFile: SourceFile, after: Node, newNode: Node) {
262
const containingList = formatting.SmartIndenter.getContainingList(after, sourceFile);
263
264
265
266
267
const index = containingList.indexOf(after);
0 commit comments