ts-error-formatter
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

ts-error-formatter

Syntax highlighting for TypeScript error messages

NPM npm

image

Installation and Usage

npm install --save-dev ts-error-formatter

The 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-plugin formatter

To use the forkTsCheckerFormatter simply use it with the custom formatter option in your fork-ts-checker-webpack-plugin's config file.

Package Sidebar

Install

npm i ts-error-formatter

Weekly Downloads

9

Version

0.2.1

License

MIT

Unpacked Size

32.5 kB

Total Files

23

Last publish

Collaborators

  • jdleider