From c3fdfe5af2d0bc1e0f0aee43b278f7030eb6c7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E6=AF=85?= Date: Wed, 12 Aug 2020 14:30:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=88=A4=E6=96=AD=20ContainerSchema=20?= =?UTF-8?q?=E7=9A=84=20util=20=E6=96=B9=E4=BE=BF=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/code-generator/src/utils/schema.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/code-generator/src/utils/schema.ts 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'; +}