Bot releases are visible (Hide)
create()
.Published by unional over 1 year ago
Published by unional over 1 year ago
Published by unional over 1 year ago
cleanup()
of gizmo.type-plus
Published by unional over 1 year ago
Published by unional over 1 year ago
type-plus
Published by unional over 1 year ago
6ecc0e7: Add type-plus
as dependency.
It was mistakenly added as devDependency.
Published by unional over 1 year ago
Published by unional over 1 year ago
iso-error
and type-plus
Published by unional over 1 year ago
ctx
from GizmoBase
. The ctx is empty.Published by unional over 1 year ago
Published by unional over 1 year ago
Published by unional over 1 year ago
Published by unional over 1 year ago
incubate
to take a base object instead of a gizmo.create()
method.ctx.with()
Published by unional over 1 year ago
Published by unional over 1 year ago
Published by unional over 1 year ago
incubate.Infer<I>
Published by unional over 1 year ago
Published by unional over 1 year ago
8996c07: .create()
now accepts a start
function to perform initialization.
incubate().with(...).with(...).create(gizmo => {
// initialization
})
0c4e97a: Adds an .init()
function to perform initialization before the gizmo is created.
This optional function allows you to perform some initialization before the gizmo is created.
This is useful if you are exposing the incubator directly to the outside world,
which you can use this function to perform some initialization when the gizmo is created.
The incubator caller can still pass in their own start function to the create()
function, to perform additional initialization specific to the caller.
When this function is called, the gizmo is considered to be final.
The .with()
function will be removed from the incubator.
const incubator = incubate().with(...).init(g => { /* initialize */ })
// incubator.with() is not available
const gizmo = await incubator.create()
80f5dc5: Add incubate().merge()
function to merge gizmo instance into the incubator.
This allows consumers to compose gizmos when they only have access to the resulting gizmo instances or just plain objects.
import { define } from '@unional/gizmo'
export async function activate({ mic }) {
const miku = await incubate().merge(mic).with(mikuGizmo).create()
}
/testing
for CJS usagePublished by unional over 1 year ago