diff --git a/types/blessed/blessed-tests.ts b/types/blessed/blessed-tests.ts index 00df6dbc7a..7397444388 100644 --- a/types/blessed/blessed-tests.ts +++ b/types/blessed/blessed-tests.ts @@ -53,6 +53,12 @@ screen.key("q", () => screen.destroy()); screen.render(); +// Allow for arbitrary extra properties to be stored in `options` +const extraProps = blessed.box({ + parent: box1, + id: 'box3' +}); + // https://github.com/chjj/blessed/blob/master/test/widget-bigtext.js screen = blessed.screen({ diff --git a/types/blessed/index.d.ts b/types/blessed/index.d.ts index f19ae07465..c4d5cb1d33 100644 --- a/types/blessed/index.d.ts +++ b/types/blessed/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Bryn Austin Bellomy // Steve Kellock // Max Brauer +// Nathan Rajlich // Definitions: https://github.com/borisyankov/DefinitelyTyped // TypeScript Version: 2.1 @@ -595,7 +596,9 @@ export namespace Widgets { destroy(): void; } - interface IOptions {} + interface IOptions { + [name: string]: any; + } interface IHasOptions { options: T;