Coder Social home page Coder Social logo

Comments (8)

krisztianb avatar krisztianb commented on June 23, 2024

Can you show me the types that are output by typedoc for the properties and methods?

from typedoc-umlclass.

krisztianb avatar krisztianb commented on June 23, 2024

This is fixed in 0.1.4. 🎉

from typedoc-umlclass.

yboujraf avatar yboujraf commented on June 23, 2024

Dear @krisztianb

Error when executing the plugin. "umlClassDiagramBoxBorderWidth"

$ npm run docs:class:diagram

> @by-research/[email protected] docs:class:diagram C:\Git\by-research\smh - connectors\smh-template-connector-lib
> rimraf ./docs/dist/docs-class-diagram && typedoc --options ./typedoc/typedoc-config-class-diagram.ts

Error: The plugin typedoc-umlclass could not be loaded.

Error: umlClassDiagramBoxBorderWidth must be >= 0
    at Object.convert (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\options\declaration.js:37:23)
    at Options.setOptionValueToDefault (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\options\options.js:119:64)
    at Options.addDeclaration (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\options\options.js:53:14)
    at PluginOptions.addToApplication (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc-umlclass\dist\plugin_options.js:285:25)
    at Plugin.addOptionsToApplication (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc-umlclass\dist\plugin.js:50:22)
    at Plugin.initialize (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc-umlclass\dist\plugin.js:42:14)
    at load (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc-umlclass\dist\index.js:9:27)
    at PluginHost.load (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\plugins.js:28:21)
    at CliApplication.bootstrap (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\application.js:50:22)
    at CliApplication.bootstrap (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\cli.js:29:30)
C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\options\declaration.js:37
                throw new Error(getBoundsError(numberOption.name, numberOption.minValue, numberOption.maxValue));
                ^

Error: umlClassDiagramBoxBorderWidth must be >= 0
    at Object.convert (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\options\declaration.js:37:23)
    at Options.setOptionValueToDefault (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\options\options.js:119:64)
    at Options.reset (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\utils\options\options.js:24:18)
    at CliApplication.bootstrap (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\application.js:51:22)
    at CliApplication.bootstrap (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\dist\lib\cli.js:29:30)
    at Object.<anonymous> (C:\Git\by-research\smh - connectors\smh-template-connector-lib\node_modules\typedoc\bin\typedoc:5:5)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @by-research/[email protected] docs:class:diagram: `rimraf ./docs/dist/docs-class-diagram && typedoc --options ./typedoc/typedoc-config-class-diagram.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @by-research/[email protected] docs:class:diagram script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ybouj\AppData\Roaming\npm-cache\_logs\2020-05-19T19_01_21_743Z-debug.log

My typedoc-config-class-diagram.ts

module.exports = {
    inputFiles: ['./src/'],
    mode: 'file',
    //mode: 'modules',
    includeDeclarations: true,
    tsconfig: 'tsconfig.json',
    out: './docs/dist/docs-class-diagram/',
    excludePrivate: false,
    excludeProtected: false,
    excludeExternals: true,
    readme: './README.md',
    name: 'Probel SW-P-8 protocol Library project',
    ignoreCompilerErrors: true,
    plugin: 'typedoc-umlclass',
    listInvalidSymbolLinks: true,
    entryPoint: 'index',
    categorizeByGroup: true,
    media: './medias',
    version: '',
    gitRemote: 'remote',
    gitRevision: 'revision',
    theme: 'default',
    umlClassDiagramType: 'detailed',
    umlClassDiagramLocation: 'local',
    umlClassDiagramFormat: 'png',
    umlClassDiagramSectionTitle: 'Class-Diagram',
    umlClassDiagramPosition: 'above',
    umlClassDiagramHideEmptyMembers: 'false',
    // umlClassDiagramTopDownLayoutMaxSiblings: 6,
    umlClassDiagramMemberVisibilityStyle: 'icon',
    umlClassDiagramHideCircledChar: 'false',
    umlClassDiagramHideShadow: 'false',
    umlClassDiagramBoxBorderRadius: 2,
    umlClassDiagramBoxBorderWidth: 1,
    umlClassDiagramClassFontName: 'Courier',
    umlClassDiagramClassFontStyle: 'bold',
    umlClassDiagramClassAttributeFontStyle: 'italic'
};

Best Regards,
Youssef

from typedoc-umlclass.

krisztianb avatar krisztianb commented on June 23, 2024

You need to update TypeDoc to the latest version (0.17.7) which allows default values that are out of bounds: TypeStrong/typedoc#1291

from typedoc-umlclass.

yboujraf avatar yboujraf commented on June 23, 2024

Dear @krisztianb

umlclass diagram

image

uml vscode diagram

image

I see now from the previous picture sent, a better decode of the type but I don't have all the dependencies that means interface, inheritance are missing.

Best Regards,
Youssef

from typedoc-umlclass.

krisztianb avatar krisztianb commented on June 23, 2024

I moved this to a separate issue as it is not related to the original problem. Let's discuss the problem over there, shall we?

from typedoc-umlclass.

yboujraf avatar yboujraf commented on June 23, 2024

Dear @krisztianb

The return value is look like the source code.

Just for my knowledge, why the class diagram provided by the vscode plugin is more detailed from yours plugin?

Best Regards,
Youssef

from typedoc-umlclass.

krisztianb avatar krisztianb commented on June 23, 2024

There can be two reasons for this:

  1. My plugin currently does not display type parameters of template classes in the diagram. There is already on open issue for this: #13
  2. My plugin only shows the direct parents of a class or interface.

Number 2 means the following:

If you have a class A that extends B and B implements InterfaceC, then A only includes in the diagram the extending of B, but not InterfaceC. InterfaceC is only visible in the diagram of B. So in the diagrams in my plugin you only see that which is there in the code too: class A extends B and class B implements InterfaceC. I think this is a reasonable thing to do and I can't remember having seen this any different in an UML diagram so far.

Would you need this to be different? We could add an option to always include every implemented interface in the diagrams.

from typedoc-umlclass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.