(
code: string,
fileName: string,
skipTypeCheck?: boolean
)
| 441 | |
| 442 | // Create a simple TypeScript compiler proxy. |
| 443 | function compile( |
| 444 | code: string, |
| 445 | fileName: string, |
| 446 | skipTypeCheck?: boolean |
| 447 | ): SourceOutput { |
| 448 | const configFileName = detectConfig(); |
| 449 | const buildOutput = getBuild(configFileName, skipTypeCheck); |
| 450 | const { code: value, map: sourceMap } = buildOutput(code, fileName); |
| 451 | const output = { |
| 452 | code: value, |
| 453 | map: Object.assign(JSON.parse(sourceMap), { |
| 454 | file: basename(fileName), |
| 455 | sources: [fileName], |
| 456 | }), |
| 457 | }; |
| 458 | delete output.map.sourceRoot; |
| 459 | return output; |
| 460 | } |
| 461 | |
| 462 | return compile; |
| 463 | } |
nothing calls this directly
no test coverage detected