{"record":{"id":"cd4c2a393267b41d","repo":"remotion-dev/remotion","slug":"name-must-be-a-number-number-tuple-cd4c2a","errorCode":null,"errorMessage":"\"${name}\" must be a [number, number] tuple","messagePattern":"\"(.+?)\" must be a \\[number, number\\] tuple","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/region-blur/index.ts","lineNumber":105,"sourceCode":"\t\thiddenFromList: false,\n\t},\n} as const satisfies InteractivitySchema;\n\nconst resolve = (params: RegionBlurParams): RegionBlurResolved => ({\n\ttopLeft: [...params.topLeft] as RegionBlurUvCoordinate,\n\tbottomRight: [...params.bottomRight] as RegionBlurUvCoordinate,\n\tblurRadius: params.blurRadius ?? DEFAULT_BLUR_RADIUS,\n\tfeather: params.feather ?? DEFAULT_FEATHER,\n\troundness: params.roundness ?? DEFAULT_ROUNDNESS,\n});\n\nconst assertRequiredUvCoordinate = (value: unknown, name: string): void => {\n\tif (\n\t\t!Array.isArray(value) ||\n\t\tvalue.length !== 2 ||\n\t\tvalue.some((item) => typeof item !== 'number' || !Number.isFinite(item))\n\t) {\n\t\tthrow new TypeError(`\"${name}\" must be a [number, number] tuple`);\n\t}\n};\n\nconst validateRegionBlurParams = (params: RegionBlurParams): void => {\n\tassertEffectParamsObject(params, 'Region blur');\n\tassertRequiredUvCoordinate(params.topLeft, 'topLeft');\n\tassertRequiredUvCoordinate(params.bottomRight, 'bottomRight');\n\tassertOptionalFiniteNumber(params.blurRadius, 'blurRadius');\n\tassertOptionalFiniteNumber(params.feather, 'feather');\n\tassertOptionalFiniteNumber(params.roundness, 'roundness');\n\n\tconst resolved = resolve(params);\n\tvalidateNonNegative(resolved.blurRadius, 'blurRadius');\n\tvalidateNonNegative(resolved.feather, 'feather');\n\tvalidateUnitInterval(resolved.roundness, 'roundness');\n\n\tif (\n\t\tresolved.topLeft[0] >= resolved.bottomRight[0] ||","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/region-blur/index.ts#L87-L123","documentation":"The regionBlur effect requires both topLeft and bottomRight UV coordinates as [number, number] tuples. Unlike the optional variant in radial-progressive-pixelate, these are mandatory—if either is missing, not a 2-element array, or contains non-finite numbers, the effect throws a TypeError immediately.","triggerScenarios":"Calling regionBlur({ topLeft: [0.2, 0.2] }) (missing bottomRight), regionBlur({ topLeft: 'top', bottomRight: [0.8, 0.8] }) (string instead of array), or regionBlur({ topLeft: [0.2], bottomRight: [0.8, 0.8] }) (wrong length).","commonSituations":"Forgetting one of the two required coordinates; passing CSS-style coordinate objects; sharing a partial coordinate from destructured state; typo in the parameter name.","solutions":["Provide both topLeft and bottomRight as [number, number] arrays in the 0–1 UV range","Convert from pixel coordinates: [pixelX / width, pixelY / height]","If using an object, destructure into the array form: topLeft: [pt.x, pt.y]","Add a TypeScript type annotation to catch shape mismatches at compile time"],"exampleFix":"// before\nregionBlur({ topLeft: { x: 0.2, y: 0.2 }, bottomRight: [0.8, 0.8] })\n// after\nregionBlur({ topLeft: [0.2, 0.2], bottomRight: [0.8, 0.8] })","handlingStrategy":"type-guard","validationCode":"const isUvTuple = (v: unknown): v is [number, number] =>\n  Array.isArray(v) &&\n  v.length === 2 &&\n  v.every((item) => typeof item === 'number' && Number.isFinite(item));\n\nif (!isUvTuple(topLeft) || !isUvTuple(bottomRight)) {\n  throw new Error('topLeft and bottomRight must be [number, number]');\n}\nregionBlur({ topLeft, bottomRight });","typeGuard":"const isUvTuple = (v: unknown): v is [number, number] =>\n  Array.isArray(v) &&\n  v.length === 2 &&\n  v.every((item) => typeof item === 'number' && Number.isFinite(item));","tryCatchPattern":null,"preventionTips":["Always provide both topLeft and bottomRight as arrays","Use the RegionBlurUvCoordinate type from the package for compile-time safety","Convert pixel coordinates to UV space with [px / width, py / height]"],"tags":["validation","typescript","uv-coordinate","region-blur"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}