krisztianb / typedoc-plugin-merge-modules

Plugin for TypeDoc that merges the content of modules
ISC License
21 stars 4 forks source link

Interface and Properties names are not replacing 'default' #5

Closed brandonmpetty closed 3 years ago

brandonmpetty commented 3 years ago

Thank you very much for this plugin! When I run: npx typedoc --pretty --mergeModulesRenameDefaults true ./src

The plug does fix most of my 'default' naming problems, but it is not working with property names and interface names.

Interface:

export default interface CRUDServiceInterface {

Property... if that is what we'll call it:

function loggerFactory(): winston.Logger {
...
    return logger;
}

export default loggerFactory();

Fixing the interface name would be the most helpful, and straightforward. As for the 'property', I would recommend either a lowercase of the file name.

Or, something like: \<filename>/@default

image

krisztianb commented 3 years ago

Thanks for reporting this. Strange that no one has done so yet.

The problem lies here: https://github.com/krisztianb/typedoc-plugin-merge-modules/blob/master/src/plugin.ts#L74

The interface issue should be easy to fix, not sure about the property. Will have to fiddle around with it.

brandonmpetty commented 3 years ago

Thanks for the reply with the code snippet. After looking at it, I was able to fix the property name issue on my side by storing the value in a variable and returning that instead. This removes it from the "Properties" section of the documentation and into "Variables"... with the expected name. It also lets me control the name to some extent.

Thank you for looking into the interface issue.

krisztianb commented 3 years ago

Interface bug fixed in 3.0.1 🎉