How to get fully qualified name (signature) for the referenced node in TypeScript? -
i'm trying signature method/member used/referred in class. tried following code same it's not working. can please tell me i'm going wrong?
var tsfiles: string[]; //tsfiles array contains typescript filenames. var compileroptions: typescript.compileroptions = {nolib : true}; var host = typescript.createcompilerhost(compileroptions); var program: typescript.program = typescript.createprogram(tsfiles, compileroptions, host); var checker: typescript.typechecker = program.gettypechecker(); var symbol = checker.getsymbolatlocation(node);//node of type typescript.node logger.debug("symbol : ", symbol);
the output i'm getting after execution is,
[2017-08-18 14:31:25.603] [debug] - symbol : undefined
i'm using typescript 2.4.2 & compiling source command : 'tsc app.ts --lib es6'
i've tried code last answer of this post well, didn't work. in advance.
Comments
Post a Comment