You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In below example, function executePlugins and array plugins docs are stripped after getting bundled. Input code
// plugins.tsexportinterfaceTestPlugin{/** * The unique name of the plugin */name: string;/** * Brief description of the plugin */description: string;/** * Function to be executed on plugin execution */execute(): void;}/** * Responsible of holding all installed plugins */exportconstplugins: TestPlugin[]=[];/** * Executes all plugins that are not excluded. * * @param {string[]} excluded - An array of plugin names to exclude. * @return {void} This function does not return a value. */exportfunctionexecutePlugins(excluded: string[]=[]): void{for(constpluginofplugins){if(!excluded.includes(plugin.name)){plugin.execute();}}}
// input.tsexport*aspluginsfrom"./plugins";
Expected output
exportinterfaceTestPlugin{/** * The unique name of the plugin */name: string;/** * Brief description of the plugin */description: string;/** * Function to be executed on plugin execution */execute(): void;}/** * Responsible of holding all installed plugins */declareconstplugins: TestPlugin[];/** * Executes all plugins that are not excluded. * * @param {string[]} excluded - An array of plugin names to exclude. * @return {void} This function does not return a value. */declarefunctionexecutePlugins(excluded?: string[]): void;declarenamespaceplugins$1{export{TestPlugin,executePlugins,plugins};}export{plugins$1asplugins,};export{};
Actual output
exportinterfaceTestPlugin{/** * The unique name of the plugin */name: string;/** * Brief description of the plugin */description: string;/** * Function to be executed on plugin execution */execute(): void;}declareconstplugins: TestPlugin[];declarefunctionexecutePlugins(excluded?: string[]): void;declarenamespaceplugins$1{export{TestPlugin,executePlugins,plugins};}export{plugins$1asplugins,};export{};
The text was updated successfully, but these errors were encountered:
pylixonly
changed the title
Top-level function comments/JSDocs are stripped when not exported directly
Top-level exports comments/JSDocs are stripped when not exported directly
Jul 24, 2024
Hm, at the glance it seems there should be a more complex check in here to make sure that transitive exports (or re-exports, not sure what exactly cases the issue) are also accounted.
Bug report
Repository with the entire setup (reproducible): https://github.com/amsyarasyiq/dts-bundle-jsdocs-strip-issue
In below example, function
executePlugins
and arrayplugins
docs are stripped after getting bundled.Input code
Expected output
Actual output
Additional context
dts-bundle-generator version: 9.5.1
bun dts-bundle-generator -o ./test/output.d.ts ./test/input.ts --no-check
The text was updated successfully, but these errors were encountered: