Function merge

  • Left join a with b.

    This returns the proper type of { ...a, ...b }

    Type Parameters

    • A

    • B

    Parameters

    • a: A
    • b: B

    Returns Merge<A, B>

    Example

    merge({ a: 1 }, {} as { a?: string | undefined }) // { a: number | string }
    

Generated using TypeDoc