diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index 044f0aa79c..d5d897dea3 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -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(); -}); -*/ \ No newline at end of file +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(); +}); \ No newline at end of file diff --git a/types/ansi/tsconfig.json b/types/ansi/tsconfig.json index 60e59f8df2..ffdd8853a8 100644 --- a/types/ansi/tsconfig.json +++ b/types/ansi/tsconfig.json @@ -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"] } } \ No newline at end of file