Skip to content

Commit eec8240

Browse files
author
Andy Hanson
committed
Debug.assert(false) -> Debug.fail()
1 parent 71fb02c commit eec8240

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/services/findAllReferences.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ namespace ts.FindAllReferences.Core {
334334
references.push({ type: "node", node: (decl as ts.ModuleDeclaration).name });
335335
break;
336336
default:
337-
Debug.assert(false);
337+
Debug.fail("Expected a module symbol to be declared by a SourceFile or ModuleDeclaration.");
338338
}
339339
}
340340

src/services/importTracker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ namespace ts.FindAllReferences {
405405
case SyntaxKind.ExternalModuleReference:
406406
return (decl as ExternalModuleReference).parent;
407407
default:
408-
Debug.assert(false);
408+
Debug.fail(`Unexpected module specifier parent: ${decl.kind}`);
409409
}
410410
}
411411

0 commit comments

Comments
 (0)