You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code
Function parameter default value wrongly emmited by Printer
// this written in file:functionfunctionWithDefaultArgValue(argument: string="defaultValue"): void{}// I'm processing this file this way:letprogram=ts.createProgram(fileNames,options);letfiles=program.getSourceFiles();letlogNode: ts.SourceFile=files[1];letprinter=ts.createPrinter();letprintResult=printer.printNode(ts.EmitHint.Unspecified,logNode,logNode);console.log(printResult);
TypeScript Version: typescript@2.3.0-dev.20170307
Code
Function parameter default value wrongly emmited by Printer
Expected behavior:
Actual behavior:
This bug in this line https://github.com/Microsoft/TypeScript/blob/eb34f0ca0301f15f4011f06b019f0949dd2ce483/src/compiler/emitter.ts#L822
822 and 823 must be in different order.
I have added tests for this issue and already fixed it. I'll send PR soon.
The text was updated successfully, but these errors were encountered: