Skip to content

🎥 Make videos programmatically with React

add type check in root

Jonny Burger28f022f38633
diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsx
index 6cc9251ec5..75946fa659 100644
--- a/packages/example/src/Root.tsx
+++ b/packages/example/src/Root.tsx
@@ -58,11 +58,16 @@ import {DynamicDuration, dynamicDurationSchema} from './DynamicDuration';
import {HugePayload, hugePayloadSchema} from './HugePayload';
import {Timeout} from './Timeout';
import {PageTransition} from './Transitions/PageTransition';
+import {_props} from './typechecks';
if (alias !== 'alias') {
throw new Error('should support TS aliases');
}
+if (!_props) {
+ throw new Error('should support TS aliases');
+}
+
// Use it to test that UI does not regress on weird CSS
// import './weird-css.css';
diff --git a/packages/example/src/typechecks.ts b/packages/example/src/typechecks.ts
new file mode 100644
index 0000000000..674db3951c
--- /dev/null
+++ b/packages/example/src/typechecks.ts
@@ -0,0 +1,10 @@
+// Just checking the types
+
+import {RemotionOffthreadVideoProps} from 'remotion';
+
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
+export const _props: RemotionOffthreadVideoProps = {
+ startFrom: 0,
+ endAt: 100,
+ src: 'hi there',
+};