• Create a Proxy over the target object returning the default when a property is undefined or null.

    Type Parameters

    • T extends object

    • D extends object

    Parameters

    • obj: undefined | T

      Object

    • defaultValues: D

      Default values

    Returns T & D

    Object with default values when prop is null