bafolts / tplant

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

fix: add support for interfaces from namespaces #85

Closed bafolts closed 2 years ago

bafolts commented 2 years ago

Allows for interfaces with namespaces. This fixes #83

bafolts commented 2 years ago

This look good @rugoncalves?

rugoncalves commented 2 years ago

Thank you @bafolts! Just tested, and:

  1. if the namespace with the interface Foo is in the same file as the class, it works!!!
  2. if the namespace is in another file stops working, scenario below:

Example image

Result image

bafolts commented 2 years ago

This error happens because you haven't referenced your namespace in the other file. You need to include it in Greeter.ts.

rugoncalves commented 2 years ago

Actually that was on purpose. In the context of the projects where I'm trying to use your (fantastic) tool, we cannot use import, so all the code is compiled to a single file - this is related with the nuances of the low-code platform where it will be used. Do see anyway to work around this nuance?