Giter Club home page Giter Club logo

Comments (10)

kontan avatar kontan commented on August 17, 2024

Hi, @Diullei!
Thank you for your interest in my docs generator.
Now dtsdoc works on only Web browser, but I'm trying to get dtsdoc to work on nodejs.
Just a minute!

What format do you consider as "metadata"?
For example, I can convert a given TypeScript code:

class Foo {
    constructor();
}

into the following JSON data:

{
    "type": "class",
    "name": "Foo",
    "export": false,
    "baseType": undefined,
    "interfaces": [],
    "members": [
        {
            "type": "constructor",
            "arguments": []
        }
    ]
}

This design is flexible and not difficult. Currently, I think that improvement will generate profit of a small margin and there is no need to do it. If we want to other transformations, we can directly modify the existing documentation emitter any time. However, if there are a concrete necessity of two different output, I'll improve it as you said with pleasure!

from dtsdoc.

Diullei avatar Diullei commented on August 17, 2024

This proposed json format to "metadata" looks excellent, however you are right. You really need evaluate the cost of this implementation. If it will not generate immediate returns, not worth doing now.

About using the document generation in nodejs without DOM dependencies, that would be great!

from dtsdoc.

Diullei avatar Diullei commented on August 17, 2024

NOTE: I think in the future the metadata can be used to generate a DGML document, for example.

http://en.wikipedia.org/wiki/DGML

this works good on Visual Studio to shows a class diagram.

;)

from dtsdoc.

kontan avatar kontan commented on August 17, 2024

Yes, XML is an option. Thanks!

from dtsdoc.

Diullei avatar Diullei commented on August 17, 2024

Hi, Kon!

I saw that you implemented node support. This is a good news! I'll test it.

A question:

Any chance to display interface hierarchy, like your class hierarchy in the future?

from dtsdoc.

kontan avatar kontan commented on August 17, 2024

Hi, Diullei.

I think Interface hierarchy chart is informative, too. However, it has some issues:

  1. In TypeScript, subtypes of a interface may not be coded explicitly. Subtypes of an interface are determined by structure of them. To find all subtypes of a interface, all combinations of interfaces have to be checked. It will take long to process.
  2. An interface may have multiple parents and multiple children. So it is difficult to display the hierarchy as tree. A chart of interface hierarchy may be tangled network.

Do you have any good idea?

from dtsdoc.

Diullei avatar Diullei commented on August 17, 2024

You are right! It is very complicated to do.

I'm already able to generate documentation with node. Thank you for your help and support!

from dtsdoc.

kontan avatar kontan commented on August 17, 2024

I had implemented that I want for dtsdoc, but I welcome your comments.
If you have a any request for dtsdoc, I'll welcome it. Thank you!

from dtsdoc.

kontan avatar kontan commented on August 17, 2024

Documents are available generated from https://github.com/borisyankov/DefinitelyTyped are available at http://phyzkit.net/docs/, FYI

from dtsdoc.

Diullei avatar Diullei commented on August 17, 2024

Nice!

I'll put a reference to this documents on DefinitelyTyped and http://www.tsdpm.com

;)

from dtsdoc.

Related Issues (3)

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.