| 149 | } |
| 150 | |
| 151 | static void cx_emit_ts(FILE *f, int m, int j) { |
| 152 | (void)m; |
| 153 | if (j > 0) { |
| 154 | fprintf(f, "import { val%d } from \"./f%d\";\n\n", j - 1, j - 1); |
| 155 | } |
| 156 | fprintf(f, "export function val%d(x: number): number {\n return x + %d;\n}\n\n", j, j); |
| 157 | if (j > 0) { |
| 158 | fprintf(f, "export function chain%d(): number {\n return val%d(1) + val%d(2);\n}\n", j, |
| 159 | j - 1, j); |
| 160 | } else { |
| 161 | fprintf(f, "export function chain0(): number {\n return val0(2);\n}\n"); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | typedef struct { |
| 166 | CBMLanguage lang; |
nothing calls this directly
no outgoing calls
no test coverage detected