0.2.1 • Published 2 years ago
ts-error-formatter v0.2.1
ts-error-formatter
Syntax highlighting for TypeScript error messages

Installation and Usage
npm install --save-dev ts-error-formatterThe errorFormatter can be used either stand alone or with fork-ts-checker-webpack-plugin.
There are two exports:
errorFormatter: (msg: string) => string;- The returned value will have console colored text
forkTsCheckerFormatter: (options?: BabelCodeFrameOptions | undefined) => Formatter;- This convenience method also adds additional Babel CodeFrame output which is the default
fork-ts-checker-webpack-pluginformatter
- This convenience method also adds additional Babel CodeFrame output which is the default
To use the forkTsCheckerFormatter simply use it with the custom formatter option in your fork-ts-checker-webpack-plugin's config file.