Forcing TypeScript >= 2.1 is the only apparent way.

This commit is contained in:
Gustavo R. 'Gustavo6046' Rehermann
2018-11-01 13:04:36 -03:00
parent 48877e1cdf
commit 9177bcb136
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -22,9 +22,9 @@ Object.keys({
}).forEach((color) => {
const cname = color.replace(/([a-z])([A-Z])/g, (_: string, l: string, u: string): string => `${l} ${u.toLowerCase()}`);
(<ansi.Cursor>(((<(...anything: any[]) => ansi.Cursor> cursor[color])()
((<(...anything: any[]) => ansi.Cursor> cursor[color])()
.bold()
.bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']()))
.bg)[color === 'blue' || color === 'brightBlue' ? 'black' : 'blue']()
.write(
`Hello, bold ${cname} world!\n`
)
+1
View File
@@ -2,6 +2,7 @@
// Project: https://www.npmjs.com/package/ansi
// Definitions by: Gustavo6046 <https://github.com/Gustavo6046>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript version: 2.1
/**
* References: