From 549758e4cc6f36b5f14ac452d729c9297b202a8c Mon Sep 17 00:00:00 2001 From: Richie Bendall Date: Mon, 25 Oct 2021 06:22:25 +1300 Subject: [PATCH] Meta tweak Signed-off-by: Richie Bendall --- source/index.d.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/source/index.d.ts b/source/index.d.ts index e94d260..73ae767 100644 --- a/source/index.d.ts +++ b/source/index.d.ts @@ -166,6 +166,13 @@ export interface ChalkInstance extends ChalkFunction { /** Use RGB values to set text color. + + @example + ``` + import chalk from 'chalk'; + + chalk.rgb(222, 173, 237); + ``` */ rgb: (red: number, green: number, blue: number) => this; @@ -185,11 +192,25 @@ export interface ChalkInstance extends ChalkFunction { /** Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. + + @example + ``` + import chalk from 'chalk'; + + chalk.ansi256(201); + ``` */ ansi256: (index: number) => this; /** Use RGB values to set background color. + + @example + ``` + import chalk from 'chalk'; + + chalk.bgRgb(222, 173, 237); + ``` */ bgRgb: (red: number, green: number, blue: number) => this; @@ -209,6 +230,13 @@ export interface ChalkInstance extends ChalkFunction { /** Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color. + + @example + ``` + import chalk from 'chalk'; + + chalk.bgAnsi256(201); + ``` */ bgAnsi256: (index: number) => this;