nullable-new-params

Installation
SKILL.md

Nullable new params

Use this skill when a change added a new parameter or type member as optional. In internal Remotion code, new inputs must be required and nullable so every caller makes an explicit choice.

Rule

  • Internal contracts: write name: T | null, not name?: T.
  • Call sites must pass null explicitly when no value exists.
  • Implementation checks should prefer value === null / value !== null when null is the absence sentinel.
  • Do not use undefined as the absence sentinel for new internal APIs unless the surrounding local contract already standardizes on undefined.
  • The anti-pattern includes redundant shapes such as frozenFrame?: number | null; make it frozenFrame: number | null.

Public APIs are the exception. If the changed signature, props type, or options object is exported from a package public entrypoint or documented in packages/docs/docs, making the new field/argument required is a breaking change. Keep it optional or add a backwards-compatible overload/options path, then document/default it as appropriate.

Workflow

  1. Inspect the diff for newly added optional members or parameters:
Installs
96
GitHub Stars
51.3K
First Seen
12 days ago
nullable-new-params — remotion-dev/remotion