diff --git a/src/core/WidgetBase.ts b/src/core/WidgetBase.ts index c1842adc9..c05c47836 100644 --- a/src/core/WidgetBase.ts +++ b/src/core/WidgetBase.ts @@ -93,7 +93,7 @@ export class WidgetBase
implement * property specifically for typing when using tsx */ /* tslint:disable-next-line:variable-name */ - public __properties__!: this['properties'] & WidgetProperties & { __children__?: DNode[] | DNode }; + public __properties__!: this['properties'] & WidgetProperties & { __children__?: DNode | (DNode | DNode[])[] }; /** * children array diff --git a/src/core/interfaces.d.ts b/src/core/interfaces.d.ts index 3873ef07a..6b2ffd010 100644 --- a/src/core/interfaces.d.ts +++ b/src/core/interfaces.d.ts @@ -576,7 +576,7 @@ export interface WidgetBaseInterface
{ assert.strictEqual(root.innerHTML, 'hello'); }); + it('tsx supports a mixture of array and non array children', () => { + class App extends WidgetBase { + render() { + return