Function 函数
1. 结构声明
- TS Declaration
- JSON Schema
class Function extends BaseNode {
name: string = '';
description: string;
typeParams: Array<TypeParam>;
params: Array<Param>;
returns: Array<Return>;
variables: Array<Variable>;
returnExpression: LogicItem;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"typeParams": {
"type": "array",
"items": {
"$ref": "#/definitions/TypeParam"
}
},
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/Param"
}
},
"returns": {
"type": "array",
"items": {
"$ref": "#/definitions/Return"
}
},
"variables": {
"type": "array",
"items": {
"$ref": "#/definitions/Variable"
}
},
"returnExpression": {
"$ref": "#/definitions/LogicItem"
}
},
"required": [
"name",
"description",
"typeParams",
"params",
"returns",
"variables",
"returnExpression"
],
"additionalProperties": false
}