Skip to content

Commit 96b9248

Browse files
author
Andy Hanson
committed
Remove assertion
1 parent 52d830f commit 96b9248

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/compiler/utilities.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -4300,9 +4300,8 @@ namespace ts {
43004300

43014301
/** @internal */
43024302
export function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: DeclarationName } {
4303-
const name = (node as NamedDeclaration).name;
4304-
Debug.assert(!name || isDeclaration(node) && node.name === name, "A 'name' property should always be a DeclarationName.");
4305-
return !!name;
4303+
// A 'name' property should always be a DeclarationName.
4304+
return !!(node as NamedDeclaration).name;
43064305
}
43074306

43084307
export function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined {

0 commit comments

Comments
 (0)