Skip to content

AppCreateHookFn

AppCreateHookFn = (prev, current, ctx) => Promise<unknown>

Runs when a Workspace is created for the application, as one link in the chain of create hooks registered across all Apps.

() => Promise<unknown>

Continues the chain with the hooks registered before this one and by dependency Apps.

WriteAppInstance

The App that registered the hook, with write access to its Items.

SystemWriteRuntimeInstance

A system-level write Runtime bound to the new Workspace.

Promise<unknown>

The value the preceding link receives from its own prev().

The Runtime orders the chain root App first, then each dependency in reverse resolution order; within one App the most recently registered hook runs first. Awaiting prev() runs the rest of the chain and resolves to its result, which is undefined for the last link. A hook that does not call prev() stops the chain.

Handle events