🎥 Make videos programmatically with React
value of type
Jonny Burgerbb2e16d1bb9c
diff --git a/packages/core/src/test/composition-validation.test.tsx b/packages/core/src/test/composition-validation.test.tsxindex 3aa5655af8..3e0b7809ce 100644--- a/packages/core/src/test/composition-validation.test.tsx+++ b/packages/core/src/test/composition-validation.test.tsx@@ -79,7 +79,7 @@ describe('Composition-validation render should throw with invalid props', () =>/></RemotionRoot>),- /The "height" of a composition must be a number, but you passed a string/+ /The "height" of a composition must be a number, but you passed a value of type string/);});test('It should throw if height is not an integer', () => {@@ -154,7 +154,7 @@ describe('Composition-validation render should throw with invalid props', () =>/></RemotionRoot>),- /The "width" of a composition must be a number, but you passed a string/+ /The "width" of a composition must be a number, but you passed a value of type string/);});});@@ -229,7 +229,7 @@ describe('Composition-validation render should throw with invalid props', () =>/></RemotionRoot>),- /The "durationInFrames" of a composition must be a number, but you passed a string/+ /The "durationInFrames" of a composition must be a number, but you passed a value of type string/);});});@@ -287,7 +287,7 @@ describe('Composition-validation render should throw with invalid props', () =>/></RemotionRoot>),- /"fps" must be a number, but you passed a string/+ /"fps" must be a number, but you passed a value of type string/);});});diff --git a/packages/core/src/validation/validate-dimensions.ts b/packages/core/src/validation/validate-dimensions.tsindex 7b6bae1ff1..7e95665afa 100644--- a/packages/core/src/validation/validate-dimensions.ts+++ b/packages/core/src/validation/validate-dimensions.ts@@ -1,7 +1,7 @@export const validateDimension = (amount: number, nameOfProp: string) => {if (typeof amount !== 'number') {throw new Error(- `The "${nameOfProp}" of a composition must be a number, but you passed a ${typeof amount}`+ `The "${nameOfProp}" of a composition must be a number, but you passed a value of type ${typeof amount}`);}diff --git a/packages/core/src/validation/validate-duration-in-frames.ts b/packages/core/src/validation/validate-duration-in-frames.tsindex 583ab5b27f..eecd1e7781 100644--- a/packages/core/src/validation/validate-duration-in-frames.ts+++ b/packages/core/src/validation/validate-duration-in-frames.ts@@ -1,7 +1,7 @@export const validateDurationInFrames = (durationInFrames: number) => {if (typeof durationInFrames !== 'number') {throw new Error(- `The "durationInFrames" of a composition must be a number, but you passed a ${typeof durationInFrames}`+ `The "durationInFrames" of a composition must be a number, but you passed a value of type ${typeof durationInFrames}`);}diff --git a/packages/core/src/validation/validate-fps.ts b/packages/core/src/validation/validate-fps.tsindex 46fd6ad9b2..850907bfa9 100644--- a/packages/core/src/validation/validate-fps.ts+++ b/packages/core/src/validation/validate-fps.ts@@ -1,6 +1,8 @@export const validateFps = (fps: number) => {if (typeof fps !== 'number') {- throw new Error(`"fps" must be a number, but you passed a ${typeof fps}`);+ throw new Error(+ `"fps" must be a number, but you passed a value of type ${typeof fps}`+ );}if (!Number.isFinite(fps)) {diff --git a/packages/player/src/test/validate-prop.test.tsx b/packages/player/src/test/validate-prop.test.tsxindex 31956e5ce9..22797a281a 100644--- a/packages/player/src/test/validate-prop.test.tsx+++ b/packages/player/src/test/validate-prop.test.tsx@@ -59,7 +59,7 @@ test('No fps should give errors', () => {);} catch (e) {expect(e.message).toMatch(- /'fps' must be a number but got 'object' instead/+ /"fps" must be a number, but you passed a value of type object/);}@@ -78,7 +78,7 @@ test('No fps should give errors', () => {);} catch (e) {expect(e.message).toMatch(- /'fps' must be a number but got 'undefined' instead/+ /"fps" must be a number, but you passed a value of type undefined/);}});@@ -99,7 +99,7 @@ test('No durationInFrames should give errors', () => {);} catch (e) {expect(e.message).toMatch(- /'durationInFrames' must be a number but got 'undefined' instead/+ /The "durationInFrames" of a composition must be a number, but you passed a value of type undefined/);}});