Closed kungfooman closed 9 months ago
Fixed in 2.0.0!
Sorry, but this isn't fixed - v2.0.0 still outputs the same ASCII code salad.
I tried it like this:
import {transpileFile} from 'ts-to-jsdoc';
import {readFileSync, writeFileSync} from 'fs';
function convert(i, o) {
const contentTS = readFileSync(i, 'utf8');
const contentJS = transpileFile({code: contentTS});
writeFileSync(o, contentJS);
}
(because I don't like how the bin/ts-to-jsdoc command always make an extra dir for every file)
Ah, should probably document somewhere that you need a .tsx
filename for the compiler to recognize it as TSX.
As for the footnote, can you open an issue with a repro? The CLI shouldn't be creating any directories unless you pass -o
.
Test code:
Output: