Merge two values.

If both values are objects, then combines them in the properties level.

Otherwise, returns the latter value if it's not null, otherwise the former value.

  • return (y ?? x)
  • Parameters

    • x: unknown

      Value X to merge

    • y: unknown

      Value Y to merge

    Returns unknown

    Merged value