From 9177bcb136b992b7de8d4bb0bede068f9ebe553c Mon Sep 17 00:00:00 2001 From: "Gustavo R. 'Gustavo6046' Rehermann" Date: Thu, 1 Nov 2018 13:04:36 -0300 Subject: [PATCH] Forcing TypeScript >= 2.1 is the only apparent way. --- types/ansi/ansi-tests.ts | 4 ++-- types/ansi/index.d.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/ansi/ansi-tests.ts b/types/ansi/ansi-tests.ts index cfac4aada9..b2625defa5 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']() .write( `Hello, bold ${cname} world!\n` ) diff --git a/types/ansi/index.d.ts b/types/ansi/index.d.ts index e050aa7c22..e027df4c98 100644 --- a/types/ansi/index.d.ts +++ b/types/ansi/index.d.ts @@ -2,6 +2,7 @@ // Project: https://www.npmjs.com/package/ansi // Definitions by: Gustavo6046 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript version: 2.1 /** * References: