bafolts / tplant

Typescript to plantuml
https://segmentationfaults.com/tplant/default.html
GNU General Public License v3.0
267 stars 34 forks source link

Problems with composition feature #71

Open fuhrmanator opened 3 years ago

fuhrmanator commented 3 years ago

First, thanks for making tplant! It is very useful!

The composition flag is good, but I'm suggesting the following improvements. Let me use this example from test/Raytracer/Scene.ts:

export interface Scene {
    things: Thing[];
    lights: Light[];
    camera: Camera;
}

The PlantUML produced using the composition flag should be

Scene --> "things" Thing
Scene --> "lights" Light
Scene --> "camera" Camera

Here are my reasons:

Edit: in cases of a single reference, e.g. myThing: Thing the cardinality would be "1"

I'd be happy to try a PR to support some of these things (with tests, of course), if you think they're reasonable.

bafolts commented 3 years ago

Putting up a PR sounds great.

fuhrmanator commented 3 years ago

SInce you merged, can you publish the package on npm?

bafolts commented 3 years ago

Published.

loopingz commented 3 years ago

The issue should probably be closed now, I noticed the 2.3.4, 2.3.5, 2.3.6 and 3.0.0 tags / releases are missing from github