Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Run dts as additional checks in actions (#1523)

Bogdan Chadkinbb9db13c9fa1
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ea32a9fd27..b1dfd96e25 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -25,4 +25,4 @@ jobs:
- run: pnpm prettier --cache --check "**/*.{js,md,ts,tsx}"
- - run: pnpm turbo run size-test build checks
+ - run: pnpm turbo run size-test build checks dts
diff --git a/packages/react-sdk/src/embed-template.ts b/packages/react-sdk/src/embed-template.ts
index 8cc46d5251..33a12a7910 100644
--- a/packages/react-sdk/src/embed-template.ts
+++ b/packages/react-sdk/src/embed-template.ts
@@ -47,7 +47,7 @@ export const EmbedTemplateStyleDecl = z.object({
export type EmbedTemplateStyleDecl = z.infer<typeof EmbedTemplateStyleDecl>;
-type EmbedTemplateInstance = {
+export type EmbedTemplateInstance = {
type: "instance";
component: string;
props?: EmbedTemplateProp[];
@@ -55,16 +55,19 @@ type EmbedTemplateInstance = {
children: Array<EmbedTemplateInstance | EmbedTemplateText>;
};
-const EmbedTemplateInstance: z.ZodType<EmbedTemplateInstance> = z.object({
- type: z.literal("instance"),
- component: z.string(),
- props: z.optional(z.array(EmbedTemplateProp)),
- styles: z.optional(z.array(EmbedTemplateStyleDecl)),
- children: z.lazy(() => WsEmbedTemplate),
-});
+export const EmbedTemplateInstance: z.ZodType<EmbedTemplateInstance> = z.lazy(
+ () =>
+ z.object({
+ type: z.literal("instance"),
+ component: z.string(),
+ props: z.optional(z.array(EmbedTemplateProp)),
+ styles: z.optional(z.array(EmbedTemplateStyleDecl)),
+ children: WsEmbedTemplate,
+ })
+);
-export const WsEmbedTemplate = z.array(
- z.union([z.lazy(() => EmbedTemplateInstance), EmbedTemplateText])
+export const WsEmbedTemplate = z.lazy(() =>
+ z.array(z.union([EmbedTemplateInstance, EmbedTemplateText]))
);
export type WsEmbedTemplate = z.infer<typeof WsEmbedTemplate>;