UNPKG

type-plus

Version:
14 lines 286 B
/** * Left join `a` with `b`. * * This returns the proper type of `{ ...a, ...b }` * * @example * ```ts * leftJoin({ a: 1 }, {} as { a?: string | undefined }) // { a: number | string } * ``` */ export function merge(a, b) { return { ...a, ...b }; } //# sourceMappingURL=merge.js.map