react-docgen-typescript
react-docgen-typescript copied to clipboard
Question: can `parse` method accept source code as argument
I want to make a webpack loader to transpile a typescript file to doc , which means parser will accept code as argument but not filepath:
module.exports.default = function (source) {
return reactDocGenTs(source);
}
sure I can pass resourcePath like parse(this.resourcePath)
but it will lead to a fs IO and slow down the webpack build time.
any sugguestion ?