MCPcopy
hub / github.com/baidu/amis / bulkRegisterFunctionDoc

Function bulkRegisterFunctionDoc

packages/amis-formula/src/function.ts:23–41  ·  view source on GitHub ↗
(
  fnDocs: {
    name: string;
    description: string;
    example: string;
    params: {
      type: string;
      name: string;
      description: string | null;
    }[];
    returns: {
      type: string;
      description: string | null;
    };
    namespace: string;
  }[]
)

Source from the content-addressed store, hash-verified

21}
22
23export function bulkRegisterFunctionDoc(
24 fnDocs: {
25 name: string;
26 description: string;
27 example: string;
28 params: {
29 type: string;
30 name: string;
31 description: string | null;
32 }[];
33 returns: {
34 type: string;
35 description: string | null;
36 };
37 namespace: string;
38 }[]
39) {
40 fnDocs.forEach(item => registerFunctionDoc(item.namespace || 'Others', item));
41}
42
43/**
44 * 注册公式,并同时注册公式说明

Callers 1

doc.tsFile · 0.90

Calls 2

registerFunctionDocFunction · 0.85
forEachMethod · 0.80

Tested by

no test coverage detected