diff --git a/stderr.js.flow b/stderr.js.flow new file mode 100644 index 0000000..25be231 --- /dev/null +++ b/stderr.js.flow @@ -0,0 +1,5 @@ +// @flow strict + +import { Chalk } from './index'; + +declare module.exports: Chalk; diff --git a/test/_flow.js b/test/_flow.js index 2cf3cf2..94d2115 100644 --- a/test/_flow.js +++ b/test/_flow.js @@ -1,5 +1,6 @@ // @flow import chalk from '..'; +import cherr from '../stderr'; // $ExpectError (Can't have typo in option name) chalk.constructor({levl: 1}); @@ -13,6 +14,10 @@ new chalk.constructor({enabled: true}); chalk.underline(null); chalk.underline('foo'); +// $ExpectError (Can't pass in null) +cherr.underline(null); +cherr.underline('foo'); + // $ExpectError (Can't have typo in chalk method) chalk.rd('foo'); chalk.red('foo');