From 7d9e1f792e4d8eb31eeed6fe6030edc498072e9b Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 16 Dec 2019 04:13:50 -0800 Subject: [PATCH] [@types/blessed] Add top level `parseTags()` function (#41026) --- types/blessed/blessed-tests.ts | 6 ++++++ types/blessed/index.d.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/types/blessed/blessed-tests.ts b/types/blessed/blessed-tests.ts index 566ee9dec9..f668657602 100644 --- a/types/blessed/blessed-tests.ts +++ b/types/blessed/blessed-tests.ts @@ -778,6 +778,12 @@ setTimeout(() => { screen.render(); }, 3000); +// https://github.com/chjj/blessed#helpers + +blessed.escape('{bold}{/bold}'); +blessed.parseTags('{bold}hi{/bold}'); +blessed.generateTags({ fg: 'red' }, 'red text'); + // https://github.com/chjj/blessed/blob/master/test/program-mouse.js const program = blessed.program({ diff --git a/types/blessed/index.d.ts b/types/blessed/index.d.ts index 44f2471f0d..2d96241058 100644 --- a/types/blessed/index.d.ts +++ b/types/blessed/index.d.ts @@ -3469,6 +3469,7 @@ export function escape(text: string): string; export function stripTags(text: string): string; export function cleanTags(text: string): string; export function generateTags(style: any, text: string): string; +export function parseTags(text: string, screen?: Widgets.Screen): string; export const colors: { match(hexColor: string): string;