MCPcopy Index your code
hub / github.com/nodejs/node / createBaseNamedDeclaration

Function createBaseNamedDeclaration

test/fixtures/snapshot/typescript.js:22790–22815  ·  view source on GitHub ↗
(kind, decorators, modifiers, name)

Source from the content-addressed store, hash-verified

22788 return node;
22789 }
22790 function createBaseNamedDeclaration(kind, decorators, modifiers, name) {
22791 var node = createBaseDeclaration(kind, decorators, modifiers);
22792 name = asName(name);
22793 node.name = name;
22794 // The PropertyName of a member is allowed to be `await`.
22795 // We don't need to exclude `await` for type signatures since types
22796 // don't propagate child flags.
22797 if (name) {
22798 switch (node.kind) {
22799 case 169 /* SyntaxKind.MethodDeclaration */:
22800 case 172 /* SyntaxKind.GetAccessor */:
22801 case 173 /* SyntaxKind.SetAccessor */:
22802 case 167 /* SyntaxKind.PropertyDeclaration */:
22803 case 296 /* SyntaxKind.PropertyAssignment */:
22804 if (ts.isIdentifier(name)) {
22805 node.transformFlags |= propagateIdentifierNameFlags(name);
22806 break;
22807 }
22808 // fall through
22809 default:
22810 node.transformFlags |= propagateChildFlags(name);
22811 break;
22812 }
22813 }
22814 return node;
22815 }
22816 function createBaseGenericNamedDeclaration(kind, decorators, modifiers, name, typeParameters) {
22817 var node = createBaseNamedDeclaration(kind, decorators, modifiers, name);
22818 node.typeParameters = asNodeArray(typeParameters);

Calls 4

createBaseDeclarationFunction · 0.85
asNameFunction · 0.85
propagateChildFlagsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…