diff --git a/packages/code-generator/src/utils/schema.ts b/packages/code-generator/src/utils/schema.ts new file mode 100644 index 000000000..9a19ed069 --- /dev/null +++ b/packages/code-generator/src/utils/schema.ts @@ -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'; +}