bafolts / tplant

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

Class Filename (Necessary) Improvement #94

Closed adrian-burlacu-software closed 2 years ago

adrian-burlacu-software commented 2 years ago

Two classes with the same name can be imported and extended/implemented from different files:

// Class1.ts
import BaseClass from './BaseClass1.ts';
class Class1 extends BaseClass {}
// Class2.ts
import BaseClass from './BaseClass2.ts';
class Class2 extends BaseClass {}

But calling tplant.generateDocumentation only gives names as references.

Each Class has been amended to:

  1. A filename property about the file where it resides
  2. The abstract extendsClassFile and implementsInterfacesFiles properties have been added to provide the necessary identification abilities.

I'm a fairly good TS dev but NOOB at the compilation API/typings so if you going to suggest something please provide alternative code.