bafolts / tplant

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

Problem when interfaces are in a different namespace #83

Closed rugoncalves closed 2 years ago

rugoncalves commented 2 years ago

tplant version: 3.1.1

Problem when the interface is in a different namespace, when using in a class or in an interface, the svg is not generated. Below, the svg "content": image

Cause I was able to replicate the problem with the code below:

namespace interfaces {
  export interface IGreeter {
    greet(): string;
  }
}

export class Greeter implements interfaces.IGreeter {
  greeting: string;
  prefix: string = "Hello, ";
  constructor(message: string) {
    this.greeting = message;
  }
  set prefix(prefix: string) {
    this.prefix = prefix;
  }
  greet(prefix: string = "Foo"): string;
  greet(): string {
    return this.prefix + this.greeting;
  }
}