Skip to content

uni-flow 公开 API(中文注解)


uni-flow 公开 API(中文注解) / validateWorkflowDocument

Function: validateWorkflowDocument() ​

validateWorkflowDocument(doc): asserts doc is WorkflowYamlDocument

Defined in: yaml/validate.ts:68

对已解析的文档做 JSON Schema + apiVersion 断言校验。 通过后将 doc 收窄为 WorkflowYamlDocument。

Parameters ​

doc ​

unknown

任意已解析对象(通常来自 parseWorkflowYaml)

Returns ​

asserts doc is WorkflowYamlDocument

Throws ​

schema 失败或 apiVersion 不是 uniflow/v1 时

MIT Licensed