UNPKG

type-plus

Version:
18 lines 403 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.merge = void 0; /** * 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 } * ``` */ function merge(a, b) { return { ...a, ...b }; } exports.merge = merge; //# sourceMappingURL=merge.js.map