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

Function functionExpressionToDeclaration

test/fixtures/snapshot/typescript.js:152536–152539  ·  view source on GitHub ↗
(name, additionalModifiers, fn, useSitesToUnqualify)

Source from the content-addressed store, hash-verified

152534 }
152535 // Node helpers
152536 function functionExpressionToDeclaration(name, additionalModifiers, fn, useSitesToUnqualify) {
152537 return ts.factory.createFunctionDeclaration(ts.getSynthesizedDeepClones(fn.decorators), // TODO: GH#19915 Don't think this is even legal.
152538 ts.concatenate(additionalModifiers, ts.getSynthesizedDeepClones(fn.modifiers)), ts.getSynthesizedDeepClone(fn.asteriskToken), name, ts.getSynthesizedDeepClones(fn.typeParameters), ts.getSynthesizedDeepClones(fn.parameters), ts.getSynthesizedDeepClone(fn.type), ts.factory.converters.convertToFunctionBlock(replaceImportUseSites(fn.body, useSitesToUnqualify)));
152539 }
152540 function classExpressionToDeclaration(name, additionalModifiers, cls, useSitesToUnqualify) {
152541 return ts.factory.createClassDeclaration(ts.getSynthesizedDeepClones(cls.decorators), // TODO: GH#19915 Don't think this is even legal.
152542 ts.concatenate(additionalModifiers, ts.getSynthesizedDeepClones(cls.modifiers)), name, ts.getSynthesizedDeepClones(cls.typeParameters), ts.getSynthesizedDeepClones(cls.heritageClauses), replaceImportUseSites(cls.members, useSitesToUnqualify));

Calls 1

replaceImportUseSitesFunction · 0.85

Tested by

no test coverage detected