Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from Marak/add-typings
Bring home Typescript definitions from DefinitelyTyped
- Loading branch information
Showing
2 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
// Type definitions for Colors.js 1.2 | ||
// Project: https://github.com/Marak/colors.js | ||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke> | ||
// Definitions: https://github.com/Marak/colors.js | ||
|
||
export interface Color { | ||
(text: string): string; | ||
|
||
strip: Color; | ||
stripColors: Color; | ||
|
||
black: Color; | ||
red: Color; | ||
green: Color; | ||
yellow: Color; | ||
blue: Color; | ||
magenta: Color; | ||
cyan: Color; | ||
white: Color; | ||
gray: Color; | ||
grey: Color; | ||
|
||
bgBlack: Color; | ||
bgRed: Color; | ||
bgGreen: Color; | ||
bgYellow: Color; | ||
bgBlue: Color; | ||
bgMagenta: Color; | ||
bgCyan: Color; | ||
bgWhite: Color; | ||
|
||
reset: Color; | ||
bold: Color; | ||
dim: Color; | ||
italic: Color; | ||
underline: Color; | ||
inverse: Color; | ||
hidden: Color; | ||
strikethrough: Color; | ||
|
||
rainbow: Color; | ||
zebra: Color; | ||
america: Color; | ||
trap: Color; | ||
random: Color; | ||
zalgo: Color; | ||
} | ||
|
||
export function setTheme(theme: any): void; | ||
|
||
export let enabled: boolean; | ||
|
||
export const strip: Color; | ||
export const stripColors: Color; | ||
|
||
export const black: Color; | ||
export const red: Color; | ||
export const green: Color; | ||
export const yellow: Color; | ||
export const blue: Color; | ||
export const magenta: Color; | ||
export const cyan: Color; | ||
export const white: Color; | ||
export const gray: Color; | ||
export const grey: Color; | ||
|
||
export const bgBlack: Color; | ||
export const bgRed: Color; | ||
export const bgGreen: Color; | ||
export const bgYellow: Color; | ||
export const bgBlue: Color; | ||
export const bgMagenta: Color; | ||
export const bgCyan: Color; | ||
export const bgWhite: Color; | ||
|
||
export const reset: Color; | ||
export const bold: Color; | ||
export const dim: Color; | ||
export const italic: Color; | ||
export const underline: Color; | ||
export const inverse: Color; | ||
export const hidden: Color; | ||
export const strikethrough: Color; | ||
|
||
export const rainbow: Color; | ||
export const zebra: Color; | ||
export const america: Color; | ||
export const trap: Color; | ||
export const random: Color; | ||
export const zalgo: Color; | ||
|
||
declare global { | ||
interface String { | ||
strip: string; | ||
stripColors: string; | ||
|
||
black: string; | ||
red: string; | ||
green: string; | ||
yellow: string; | ||
blue: string; | ||
magenta: string; | ||
cyan: string; | ||
white: string; | ||
gray: string; | ||
grey: string; | ||
|
||
bgBlack: string; | ||
bgRed: string; | ||
bgGreen: string; | ||
bgYellow: string; | ||
bgBlue: string; | ||
bgMagenta: string; | ||
bgCyan: string; | ||
bgWhite: string; | ||
|
||
reset: string; | ||
bold: string; | ||
dim: string; | ||
italic: string; | ||
underline: string; | ||
inverse: string; | ||
hidden: string; | ||
strikethrough: string; | ||
|
||
rainbow: string; | ||
zebra: string; | ||
america: string; | ||
trap: string; | ||
random: string; | ||
zalgo: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Type definitions for Colors.js 1.2 | ||
// Project: https://github.com/Marak/colors.js | ||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke> | ||
// Definitions: https://github.com/Marak/colors.js | ||
|
||
export const enabled: boolean; | ||
|
||
export function strip(str: string): string; | ||
export function stripColors(str: string): string; | ||
|
||
export function black(str: string): string; | ||
export function red(str: string): string; | ||
export function green(str: string): string; | ||
export function yellow(str: string): string; | ||
export function blue(str: string): string; | ||
export function magenta(str: string): string; | ||
export function cyan(str: string): string; | ||
export function white(str: string): string; | ||
export function gray(str: string): string; | ||
export function grey(str: string): string; | ||
|
||
export function bgBlack(str: string): string; | ||
export function bgRed(str: string): string; | ||
export function bgGreen(str: string): string; | ||
export function bgYellow(str: string): string; | ||
export function bgBlue(str: string): string; | ||
export function bgMagenta(str: string): string; | ||
export function bgCyan(str: string): string; | ||
export function bgWhite(str: string): string; | ||
|
||
export function reset(str: string): string; | ||
export function bold(str: string): string; | ||
export function dim(str: string): string; | ||
export function italic(str: string): string; | ||
export function underline(str: string): string; | ||
export function inverse(str: string): string; | ||
export function hidden(str: string): string; | ||
export function strikethrough(str: string): string; | ||
|
||
export function rainbow(str: string): string; | ||
export function zebra(str: string): string; | ||
export function america(str: string): string; | ||
export function trap(str: string): string; | ||
export function random(str: string): string; | ||
export function zalgo(str: string): string; |