feat: inheritance references for classes and interfaces
Classes are parsed as ClassDeclarations - anyhow, I don't find the classes, where a specific class inherits from.
What do you mean by inherits from?
class A {}
class B extends A {}
so the ClassDefinition of B should contain a reference to A ?
Yes, exactly. I would need the reference from B to A. The background is that I'm building a programm, which parses a set of Typescript files and generates a class diagramm out of it (for documentation purposes).
@Angelika12
Ok, so I thought about this and found the following problem: during the parse step, I can only parse the name of the type that a class extends from. I don't have the exact knowledge about the type. This exact reference can only be done when the whole declaration index is used. Then I could parse the name that is used with the given import to actually get the type reference.
Ok – thank you for your efforts!
Von: Christoph Bühler [mailto:[email protected]] Gesendet: Freitag, 31. August 2018 09:01 An: buehler/node-typescript-parser [email protected] Cc: Kusel, Angelika [email protected]; Mention [email protected] Betreff: Re: [buehler/node-typescript-parser] feat: inheritance references for classes and interfaces (#88)
@Angelika12https://github.com/Angelika12
Ok, so I thought about this and found the following problem: during the parse step, I can only parse the name of the type that a class extends from. I don't have the exact knowledge about the type. This exact reference can only be done when the whole declaration index is used. Then I could parse the name that is used with the given import to actually get the type reference.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/buehler/node-typescript-parser/issues/88#issuecomment-417571576, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AoLpirpF7yaf5ygI_tFWgWbSVPYxEP7kks5uWN8RgaJpZM4VwSpB.