Use ts.formatDiagnostics
over of custom function
#597
Merged
ts.formatDiagnostics
over of custom function
#597