bafolts / tplant

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

Not representing relation when class is in a different namespace #84

Open rugoncalves opened 2 years ago

rugoncalves commented 2 years ago

Version tplant: 3.1.1

Problem when a class is in a different namespace, the relation to that class is not represented.

Cause

namespace classes {
  export abstract class AbstractPrefix {
    abstract prefix: string;
  }
}

export class Greeter extends classes.AbstractPrefix {
  greeting: string;
  prefix: string = "Hello, ";
  //... rest of the sample
}

Output image

Expected output image

rugoncalves commented 2 years ago

Also, inverting the test, also generates an expected output.

Example

namespace all {
  export abstract class AbstractPrefix {
    abstract prefix: string;
  }

  namespace classes {
    export class Greeter extends AbstractPrefix {
        greeting: string;
        prefix: string = "Hello, ";
        //... rest of the sample
    }
  }
}

Generates output image

Expected output image

rugoncalves commented 2 years ago

For additional context, I'm trying to use your wonder-tool in our repo, hence finding these problems. :)