Fixed typings for ansi

This commit is contained in:
Gustavo R. 'Gustavo6046' Rehermann
2018-10-30 19:08:24 -03:00
parent 59860839f9
commit df00c2b778
2 changed files with 24 additions and 8 deletions
+21 -5
View File
@@ -1,9 +1,25 @@
import ansi = require('ansi');
/*
const cursor = ansi(process.stdout);
Object.keys(ansi.colors).forEach((color) => {
cursor[color]().bold().write('Hello, bold ' + color + ' world!').reset();
});
*/
Object.keys({
white: 37
, black: 30
, blue: 34
, cyan: 36
, green: 32
, magenta: 35
, red: 31
, yellow: 33
, grey: 90
, brightBlack: 90
, brightRed: 91
, brightGreen: 92
, brightYellow: 93
, brightBlue: 94
, brightMagenta: 95
, brightCyan: 96
, brightWhite: 97
}).forEach((color) => {
cursor[color]().bold().write('Hello, bold ' + color.replace(/([a-z])([A-Z])/g, (_, l, u) => l + ' ' + u.toLowerCase()) + ' world!\n').reset();
});
+3 -3
View File
@@ -5,7 +5,7 @@
],
"compilerOptions": {
"module": "commonjs",
"target": "node",
"target": "es5",
"lib": [
"es6"
],
@@ -17,8 +17,8 @@
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"types": ["node"]
}
}