Comparing version 0.27.0 to 0.27.1
@@ -179,7 +179,12 @@ // -- Usage definitions -- | ||
/** | ||
* Create a child component by instantiating the `Class`. The arguments will be passed to the constructor, starting by the second constructor parameter. | ||
* Create a child component by instantiating the `Class`. The options will be passed to the constructor at second constructor parameter. | ||
*/ | ||
create<C, D extends Dash<A> = Dash<A>, OPT = any>(Class: { new (dash: D, options: OPT): C }, options?: OPT): C | ||
create<C, D extends Dash<A> = Dash<A>, OPT = any>(Class: { new (dash: D, options: OPT): C }, options: OPT): C | ||
/** | ||
* Create a child component by instantiating the `Class` without options. | ||
*/ | ||
create<C, D extends Dash<A> = Dash<A>>(Class: { new (dash: D): C }): C | ||
/** | ||
* Make the `obj` a child component. | ||
@@ -186,0 +191,0 @@ * |
{ | ||
"name": "bkb", | ||
"version": "0.27.0", | ||
"version": "0.27.1", | ||
"description": "An Unopinionated JavaScript Framework for Front-end Applications", | ||
@@ -5,0 +5,0 @@ "main": "bkb.min.js", |
@@ -298,3 +298,3 @@ import { ComponentEvent, EmitOptions, PublicDash, Dash, AppDash, ComponentFilter, FindChildFilter, EventName, EventCallback, UnmanagedListeners, DashAugmentation, OrderName, OrderCallback } from "./exported-definitions" | ||
}, | ||
create: (Class: { new(): any }, opt: any) => { | ||
create: (Class: { new(): any }, opt?: any) => { | ||
return bkb.createChild({ asObj: false, Class, opt }).getInstance() as any | ||
@@ -301,0 +301,0 @@ }, |
@@ -177,7 +177,12 @@ export interface ComponentFilter { | ||
/** | ||
* Create a child component by instantiating the `Class`. The arguments will be passed to the constructor, starting by the second constructor parameter. | ||
* Create a child component by instantiating the `Class`. The options will be passed to the constructor at second constructor parameter. | ||
*/ | ||
create<C, D extends Dash<A> = Dash<A>, OPT = any>(Class: { new (dash: D, options: OPT): C }, options?: OPT): C | ||
create<C, D extends Dash<A> = Dash<A>, OPT = any>(Class: { new (dash: D, options: OPT): C }, options: OPT): C | ||
/** | ||
* Create a child component by instantiating the `Class` without options. | ||
*/ | ||
create<C, D extends Dash<A> = Dash<A>>(Class: { new (dash: D): C }): C | ||
/** | ||
* Make the `obj` a child component. | ||
@@ -184,0 +189,0 @@ * |
102704
2436