Files
DefinitelyTyped/types/chalk-pipe/chalk-pipe-tests.ts
T
Jed Mao 1895488dec Fix, add types to Inquirer.js (#35489)
* Introduce chalk-pipe types

* Fix, add types to Inquirer.js
2019-05-22 08:26:58 -07:00

26 lines
488 B
TypeScript

import chalk from 'chalk';
import chalkPipe = require('chalk-pipe');
chalkPipe('blue.bold')('Hello world!');
{
const link = chalkPipe('blue.underline');
const error = chalkPipe('bgRed.#cccccc');
const warning = chalkPipe('orange.bold');
link('Link!');
error('Error!');
warning('Warning!');
}
{
const blue = chalkPipe('blue');
const link = blue.underline;
link('Link!');
const text = chalkPipe('underline', chalk.blue)('Link!');
text;
}