Monday, 13 March 2017

Get all members of a TypeScript class from source code

I have a TypeScript class test.ts:

export class TestClass {
    public numberA: number;
    public stringB: string;
}

I would like to use the TypeScript compiler so that I can get information about the members inside TestClass.

I have tried using the typescript-services package and then navigating the AST but I am unsure whether this is the right direction.



via James Monger

No comments:

Post a Comment