UNPKG

tamda

Version:

Practical functional programming library for TypeScript

23 lines (22 loc) 977 B
import { Indexable } from '../indexable'; /** * Merges two objects, `objA` and `objB`, with preference for B's properties. * @note Same as `{ ...objA, ...objB }` * @param objA Object on the left of the merge. * @param objB Object on the right of the merge. */ export declare function merge<A extends Indexable, B extends Indexable>(objA: A, objB: B): A & B; /** * Returns a function that * merges two objects, `objA` and `objB`, with preference for B's properties. * @note Same as `{ ...objA, ...objB }` * @param objB Object on the right of the merge. */ export declare function merge<A extends Indexable, B extends Indexable>(objB: B): typeof deferred; /** * Merges two objects, `objA` and previously specified `objB`, with preference for B's properties. * @note Same as `{ ...objA, ...objB }` * @param objA Object on the left of the merge. */ declare function deferred<A extends Indexable, B extends Indexable>(objA: A): A & B; export {};