https://github.com/burdiuz/js-type-checker-simple-reporting
https://github.com/burdiuz/js-type-checker-simple-reporting
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/burdiuz/js-type-checker-simple-reporting
- Owner: burdiuz
- License: mit
- Created: 2018-09-14T07:22:48.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-11T14:39:52.000Z (over 6 years ago)
- Last Synced: 2025-03-07T05:05:26.619Z (3 months ago)
- Language: JavaScript
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# # Type Checker Simple Reporting
Set of type error reporting functions created for [Primitive Type Checker](https://github.com/burdiuz/js-primitive-type-checker).* **ConsoleErrorReporter** -- uses `console.error()` to report error
* **ConsoleWarnReporter** -- uses `console.warn()` to report error
* **ThrowErrorReporter** -- throws type error## Installation
Via NPM
```bash
npm install @actualwave/type-checker-simple-reporting --save
```
Or Yarn
```bash
yarn add @actualwave/type-checker-simple-reporting
```## How to use
To change error reporter use `setErrorReporter()` function.
```javascript
import { setErrorReporter } from '@actualwave/primitive-type-checker';
import { ThrowErrorReporter } from '@actualwave/type-checker-simple-reporting';setErrorReporter(ThrowErrorReporter);
```> Written with [StackEdit](https://stackedit.io/).