Skip to content

🎥 Make videos programmatically with React

add some comments

Jonny Burger2aead576c829
diff --git a/packages/cli/src/editor/components/RenderModal/SchemaEditor/ZodSwitch.tsx b/packages/cli/src/editor/components/RenderModal/SchemaEditor/ZodSwitch.tsx
index c175db9c90..c7f540af43 100644
--- a/packages/cli/src/editor/components/RenderModal/SchemaEditor/ZodSwitch.tsx
+++ b/packages/cli/src/editor/components/RenderModal/SchemaEditor/ZodSwitch.tsx
@@ -16,6 +16,7 @@ export const ZodSwitch: React.FC<{
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const typeName = (def as any).typeName as z.ZodFirstPartyTypeKind;
if (typeName === z.ZodFirstPartyTypeKind.ZodAny) {
+ // TODO: Better UI for this
return <div>any</div>;
}
diff --git a/packages/eslint-config/src/auto-import-rules.ts b/packages/eslint-config/src/auto-import-rules.ts
index 6bc22c02be..0e8ca1ce50 100644
--- a/packages/eslint-config/src/auto-import-rules.ts
+++ b/packages/eslint-config/src/auto-import-rules.ts
@@ -31,5 +31,6 @@ export const autoImports = {
Img: "import {Img} from 'remotion'",
IFrame: "import {IFrame} from 'remotion'",
Folder: "import {Folder} from 'remotion'",
+ z: "import {z} from 'remotion'",
styled: "import styled from 'styled-components'",
};
diff --git a/packages/player/src/utils/props-if-has-props.ts b/packages/player/src/utils/props-if-has-props.ts
index 8b004414e3..5136ab2e0d 100644
--- a/packages/player/src/utils/props-if-has-props.ts
+++ b/packages/player/src/utils/props-if-has-props.ts
@@ -13,6 +13,12 @@ export type PropsIfHasProps<
// Only props specified
inputProps: Props;
}
+ : {} extends Props
+ ? {
+ // Only schema specified
+ inputProps: z.infer<Schema>;
+ }
: {
+ // Props and schema specified
inputProps: z.infer<Schema> & Props;
};