(entity: ModuleEntity)
| 27 | * @param entity Raw ModuleEntity |
| 28 | */ |
| 29 | export function processEntity(entity: ModuleEntity): GeneratedEntity { |
| 30 | switch (entity.kind) { |
| 31 | case 'function': |
| 32 | const returnType = matchW2CRType(entity.resultTypes[0]); |
| 33 | return { |
| 34 | ...entity, |
| 35 | parameterTypeNames: entity.parametersTypes.map(matchW2CRType), |
| 36 | returnTypeName: returnType, |
| 37 | }; |
| 38 | default: |
| 39 | return entity; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Builds a GeneratedSymbol from ModuleImport or ModuleExport. |
no test coverage detected