We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4071d50 commit 52d830fCopy full SHA for 52d830f
src/compiler/utilities.ts
@@ -4300,7 +4300,9 @@ namespace ts {
4300
4301
/** @internal */
4302
export function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: DeclarationName } {
4303
- return !!(node as NamedDeclaration).name;
+ 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;
4306
}
4307
4308
export function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined {
0 commit comments