🎥 Make videos programmatically with React
make `props` props mandatory if not {}
Jonny Burgerceb5c4dc8642
diff --git a/packages/player/src/Player.tsx b/packages/player/src/Player.tsxindex 3b359e1b30..fdcf50c6a8 100644--- a/packages/player/src/Player.tsx+++ b/packages/player/src/Player.tsx@@ -14,6 +14,14 @@ import {} from 'remotion';import RootComponent from './RootComponent';+type PropsIfHasProps<Props> = {} extends Props+ ? {+ props?: Props;+ }+ : {+ props: Props;+ };+export type PlayerProps<T> = {durationInFrames: number;width: number;@@ -21,8 +29,8 @@ export type PlayerProps<T> = {fps: number;controls?: boolean;style?: Omit<React.CSSProperties, 'height' | 'width'>;- props?: T;-} & CompProps<T>;+} & PropsIfHasProps<T> &+ CompProps<T>;export type PlayerMethods = {play: () => void;