From 505c4ba3cd92a75e10c068f23d9e06937eabe154 Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 12:16:07 -0300 Subject: [PATCH] I'm sincerely confused with TypeScript's casting mechanisms. --- types/ansi/ansi-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index b2625defa5..b2ee94a544 100644 --- a/types/ansi/ansi-tests.ts +++ b/types/ansi/ansi-tests.ts @@ -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()}`); - ((<(...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']() as ansi.Cursor) .write( `Hello, bold ${cname} world!\n` )