Skip to content

AppSpec

AppSpec = <TAppBuilder>(app) => void

Declares one App by registering its structure and handlers on the supplied builder.

TAppBuilder extends AppBuilder<any> = AppBuilder<any>

Builder the spec accepts; a generated App builder narrows every handler.

TAppBuilder

Builder for the App being declared.

void

A spec runs once per importer while the Definition is built. Keep it free of side effects and perform Runtime work inside the handlers it registers. Type the parameter with the generated AppBuilder of the App to get specialized input, output and Item types in handlers.

A minimal spec

const spec: AppSpec = (app) => {
app.configure('tasks');
const task = app.addTemplate('task');
task.addProperty('title', 'string');
};