Generate TSL API Markdown from YAML or JSON into a configurable project scope.\nAdd file and directory lint modes, tags-aware indexing, and keyword search across tags and descriptions.\nBundle the toolkit through the playbook build and sync workflows.
54 lines
1.3 KiB
JSON
54 lines
1.3 KiB
JSON
{
|
|
"module": "示例 / 数组",
|
|
"path": "base/example",
|
|
"functions": [
|
|
{
|
|
"signature": "demoNow()",
|
|
"desc": "返回示例值。",
|
|
"returns": "integer",
|
|
"example": "return demoNow();\n// 输出:1"
|
|
},
|
|
{
|
|
"signature": "demoFn(src, mode, factor, ...)",
|
|
"tags": ["示例", "数组"],
|
|
"desc": "按指定模式处理数组并返回结果。",
|
|
"params": [
|
|
{
|
|
"name": "src",
|
|
"type": "array",
|
|
"desc": "待处理数组"
|
|
},
|
|
{
|
|
"name": "mode",
|
|
"type": "integer",
|
|
"desc": "处理模式,取值见下。",
|
|
"values": [
|
|
{
|
|
"value": 0,
|
|
"desc": "原样返回"
|
|
},
|
|
{
|
|
"value": 1,
|
|
"desc": "去重"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "factor",
|
|
"type": "float",
|
|
"optional": true,
|
|
"desc": "默认 1.0,结果乘以该系数。"
|
|
},
|
|
{
|
|
"name": "...",
|
|
"type": "nil|array",
|
|
"optional": true,
|
|
"desc": "需要追加处理的其他数组。"
|
|
}
|
|
],
|
|
"returns": "array",
|
|
"example": "src := array(1, 1, 2);\nreturn demoFn(src, 1, 2.0);\n// 输出:array(2,4)"
|
|
}
|
|
]
|
|
}
|