Skip to content

🎥 Make videos programmatically with React

document new AnyComposition type

Jonny Burger20ad7e23b150
diff --git a/packages/docs/docs/4-0-migration.md b/packages/docs/docs/4-0-migration.md
index 7bec470e79..aace6d0b20 100644
--- a/packages/docs/docs/4-0-migration.md
+++ b/packages/docs/docs/4-0-migration.md
@@ -193,3 +193,23 @@ The `WebpackOverrideFn` type useful for overriding the Webpack config in the con
**How to upgrade:**
If you encoded the path by yourself until now, don't do so anymore to avoid double encoding.
+
+## The `TComposition` type now includes a Zod schema
+
+The `TComposition` type now has two generic arguments:
+
+```ts
+export type TComposition<Schema extends z.ZodTypeAny, Props> = {};
+```
+
+If you need a type for a generic composition, you can use the new `AnyComposition` type:
+
+```ts
+import { AnyComposition } from "remotion";
+
+const composition: AnyComposition = {
+ width: 1920,
+ height: 1080,
+ // ...
+};
+```