mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add color functions to the colors module and tests for them
This commit is contained in:
parent
266324c29c
commit
8672d44de7
@ -1,5 +1,18 @@
|
||||
|
||||
///<reference path="colors.d.ts" />
|
||||
|
||||
import colors = require("colors");
|
||||
|
||||
var test:string = 'test';
|
||||
var arr:string[] = ['color', 'odd'.italic.zebra, 'radical'.bold.rainbow, test.underline + 'super'.green];
|
||||
|
||||
colors.black("abc").trim();
|
||||
colors.red("abc").trim();
|
||||
colors.green("abc").trim();
|
||||
colors.yellow("abc").trim();
|
||||
colors.blue("abc").trim();
|
||||
colors.magenta("abc").trim();
|
||||
colors.cyan("abc").trim();
|
||||
colors.white("abc").trim();
|
||||
colors.gray("abc").trim();
|
||||
colors.grey("abc").trim();
|
||||
|
||||
11
colors/colors.d.ts
vendored
11
colors/colors.d.ts
vendored
@ -5,6 +5,17 @@
|
||||
|
||||
declare module "colors" {
|
||||
export function setTheme(theme:any):any;
|
||||
|
||||
export function black(text: string): string;
|
||||
export function red(text: string): string;
|
||||
export function green(text: string): string;
|
||||
export function yellow(text: string): string;
|
||||
export function blue(text: string): string;
|
||||
export function magenta(text: string): string;
|
||||
export function cyan(text: string): string;
|
||||
export function white(text: string): string;
|
||||
export function gray(text: string): string;
|
||||
export function grey(text: string): string;
|
||||
}
|
||||
|
||||
interface String {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user