Update index.d.ts
This commit is contained in:
parent
bacd8e3960
commit
7d29a15a04
1 changed files with 10 additions and 0 deletions
10
index.d.ts
vendored
10
index.d.ts
vendored
|
|
@ -77,11 +77,13 @@ declare namespace chalk {
|
||||||
@remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341))
|
@remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341))
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
```
|
||||||
log(chalk`
|
log(chalk`
|
||||||
CPU: {red ${cpu.totalPercent}%}
|
CPU: {red ${cpu.totalPercent}%}
|
||||||
RAM: {green ${ram.used / ram.total * 100}%}
|
RAM: {green ${ram.used / ram.total * 100}%}
|
||||||
DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
|
DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
|
||||||
`);
|
`);
|
||||||
|
```
|
||||||
*/
|
*/
|
||||||
(text: TemplateStringsArray, ...placeholders: unknown[]): string;
|
(text: TemplateStringsArray, ...placeholders: unknown[]): string;
|
||||||
|
|
||||||
|
|
@ -113,9 +115,11 @@ declare namespace chalk {
|
||||||
@param color - Hexadecimal value representing the desired color.
|
@param color - Hexadecimal value representing the desired color.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
```
|
||||||
import chalk = require('chalk');
|
import chalk = require('chalk');
|
||||||
|
|
||||||
chalk.hex('#DEADED');
|
chalk.hex('#DEADED');
|
||||||
|
```
|
||||||
*/
|
*/
|
||||||
hex(color: string): Chalk;
|
hex(color: string): Chalk;
|
||||||
|
|
||||||
|
|
@ -125,9 +129,11 @@ declare namespace chalk {
|
||||||
@param color - Keyword value representing the desired color.
|
@param color - Keyword value representing the desired color.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
```
|
||||||
import chalk = require('chalk');
|
import chalk = require('chalk');
|
||||||
|
|
||||||
chalk.keyword('orange');
|
chalk.keyword('orange');
|
||||||
|
```
|
||||||
*/
|
*/
|
||||||
keyword(color: string): Chalk;
|
keyword(color: string): Chalk;
|
||||||
|
|
||||||
|
|
@ -157,9 +163,11 @@ declare namespace chalk {
|
||||||
@param color - Hexadecimal value representing the desired color.
|
@param color - Hexadecimal value representing the desired color.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
```
|
||||||
import chalk = require('chalk');
|
import chalk = require('chalk');
|
||||||
|
|
||||||
chalk.bgHex('#DEADED');
|
chalk.bgHex('#DEADED');
|
||||||
|
```
|
||||||
*/
|
*/
|
||||||
bgHex(color: string): Chalk;
|
bgHex(color: string): Chalk;
|
||||||
|
|
||||||
|
|
@ -169,9 +177,11 @@ declare namespace chalk {
|
||||||
@param color - Keyword value representing the desired color.
|
@param color - Keyword value representing the desired color.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
```
|
||||||
import chalk = require('chalk');
|
import chalk = require('chalk');
|
||||||
|
|
||||||
chalk.bgKeyword('orange');
|
chalk.bgKeyword('orange');
|
||||||
|
```
|
||||||
*/
|
*/
|
||||||
bgKeyword(color: string): Chalk;
|
bgKeyword(color: string): Chalk;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue