We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52d830f commit 96b9248Copy full SHA for 96b9248
src/compiler/utilities.ts
@@ -4300,9 +4300,8 @@ namespace ts {
4300
4301
/** @internal */
4302
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;
+ // A 'name' property should always be a DeclarationName.
+ return !!(node as NamedDeclaration).name;
4306
}
4307
4308
export function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined {
0 commit comments