TypeParam 类型参数
用于泛型参数声明。在泛型数据结构、逻辑和函数中使用。
1. 结构声明
- TS Declaration
- JSON Schema
class TypeParam extends BaseNode {
name: string = '';
displayName?: string;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"changedTime": {
"$ref": "#/definitions/long"
},
"name": {
"type": "string"
},
"displayName": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "TypeParam",
"name": "T"
}
concept: TypeParam
name: T
对应的代码如下:
- 文本化 NASL
- Natural TS
T
T