feat: 🎸 添加一个判断 ContainerSchema 的 util 方便后续用

This commit is contained in:
牧毅 2020-08-12 14:30:52 +08:00
parent 8b1d0c76f3
commit c3fdfe5af2

View File

@ -0,0 +1,5 @@
import { ContainerSchema } from '@ali/lowcode-types';
export function isContainerSchema(x: any): x is ContainerSchema {
return typeof x === 'object' && x && typeof x.componentName === 'string' && typeof x.fileName === 'string';
}