ts-patch icon indicating copy to clipboard operation
ts-patch copied to clipboard

Enable ts5.3 full jsdoc parsing with alternate syntax

Open ghigi123 opened this issue 1 year ago • 0 comments

Hello !

Currently using ts-patch in a library to copy jsdoc in a string within an annotation. My tsconfig.json file looks like

    "plugins": [
      {
        "transform": "./src/reflection/add-jsdoc-to-function-configs.ts"
      }
    ]

So it does not refer a package name but directly a source file. It uses the really useful transformer entry point.

Have seen your recent pull request about the 5.3 support and seen this line in plugin-creator.ts

this.needsTscJsDocParsing = this.plugins.some(plugin => plugin.packageConfig?.tscOptions?.parseAllJsDoc === true);

Wondered if we could enable the support of full jsdocs parsing using a syntax like

    "plugins": [
      {
        "transform": "./src/reflection/add-jsdoc-to-function-configs.ts",
        "parseAllJsDoc": true
      }
    ]

where the property parseAllJsDoc could be a direct child of the PluginConfig interface ?

Thanks

ghigi123 avatar Dec 13 '23 10:12 ghigi123