AnonymousFunction 匿名函数
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface AnonymousFunction {
"concept": "AnonymousFunction", // 产品概念
"description": string, // 匿名函数描述
"params": Array<Param>, // 输入参数列表
"body": LogicItem, // 逻辑项
"typeAnnotation": TypeAnnotation, // 类型
}
class AnonymousFunctionTreeNode {
ConceptEnum concept; // 产品概念
String description; // 匿名函数描述
List<ParamTreeNode> params; // 输入参数列表
LogicItemTreeNode body; // 逻辑项
TypeAnnotationTreeNode typeAnnotation; // 类型
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/AnonymousFunction",
"definitions": {
"AnonymousFunction": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "AnonymousFunction"
},
"description": {
"type": "string"
},
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/Param"
}
},
"body": {
"$ref": "#/definitions/LogicItem"
},
"typeAnnotation": {
"$ref": "#/definitions/TypeAnnotation"
}
},
"required": [
"concept",
"description",
"params",
"body",
"typeAnnotation"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "AnonymousFunction",
"description": "String",
"params": [],
"body": null,
"typeAnnotation": null
}
concept: AnonymousFunction
description: String
params: []
body: null
typeAnnotation: null