MCPcopy Create free account
hub / github.com/callstackincubator/polygen / buildGeneratedSymbol

Function buildGeneratedSymbol

packages/codegen/src/codegen/utils.ts:49–62  ·  view source on GitHub ↗
(
  module: W2CModuleBase,
  entity: ModuleImport | ModuleExport
)

Source from the content-addressed store, hash-verified

47 * @param entity
48 */
49export function buildGeneratedSymbol(
50 module: W2CModuleBase,
51 entity: ModuleImport | ModuleExport
52): GeneratedSymbol {
53 const accessorName = mangleSymbolName(entity.name, module.mangledName);
54
55 return {
56 localName: entity.name,
57 mangledLocalName: mangleName(entity.name),
58 functionSymbolAccessorName: accessorName,
59 module,
60 target: processEntity(entity.target),
61 };
62}
63
64class SymbolMatchError extends Error {
65 constructor(public kind: string) {

Callers 2

processExportsFunction · 0.85

Calls 3

mangleSymbolNameFunction · 0.85
mangleNameFunction · 0.85
processEntityFunction · 0.85

Tested by

no test coverage detected