Lynx

genui / a2ui / defineFunction

defineFunction()

function defineFunction(impl: FunctionImpl, manifest?: FunctionManifest): CatalogFunctionEntry

Build a function entry for defineCatalog. Either pair the impl with the extracted manifest, or pass just the impl (the registry still routes calls; the agent just won't see the parameter schema).

参数

范围类型
implFunctionImpl
manifest?FunctionManifest

返回

CatalogFunctionEntry

示例

const requiredEntry = defineFunction(required, requiredManifest);
const catalog = defineCatalog([Text, Button, requiredEntry]);

定义于

@lynx-js/genui/a2ui/src/catalog/defineCatalog.ts:65

除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。