You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add lint rule to check that Debug.assert calls do not eagerly interpolate strings (#17125)
* And lint rule to check that `Debug.assert` calls do not eagerly interpolate strings
* Use more specific 'assert' functions to avoid callbacks
* Respond to PR feedback
Copy file name to clipboardExpand all lines: src/services/services.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1258,7 +1258,7 @@ namespace ts {
1258
1258
// We do not support the scenario where a host can modify a registered
1259
1259
// file's script kind, i.e. in one project some file is treated as ".ts"
1260
1260
// and in another as ".js"
1261
-
Debug.assert(hostFileInformation.scriptKind===oldSourceFile.scriptKind,"Registered script kind ("+oldSourceFile.scriptKind+") should match new script kind ("+hostFileInformation.scriptKind+") for file: "+path);
1261
+
Debug.assertEqual(hostFileInformation.scriptKind,oldSourceFile.scriptKind,"Registered script kind should match new script kind.",path);
Debug.assert(selectedItemIndex!==-1);// If candidates is non-empty it should always include bestSignature. We check for an empty candidates before calling this function.
0 commit comments