Merge<Destination, Source>
Merge<
Destination
,Source
> =Simplify
<SimpleMerge
<PickIndexSignature
<Destination
>,PickIndexSignature
<Source
>> &SimpleMerge
<OmitIndexSignature
<Destination
>,OmitIndexSignature
<Source
>>>
Defined in: packages/react-querybuilder/src/types/type-fest/merge.ts:44
Merge two types into a new type. Keys of the second type overrides keys of the first type.
Type Parameters
Type Parameter |
---|
Destination |
Source |
Example
import type {Merge} from 'type-fest';
interface Foo {
[x: string]: unknown;
[x: number]: unknown;
foo: string;
bar: symbol;
}
type Bar = {
[x: number]: number;
[x: symbol]: unknown;
bar: Date;
baz: boolean;
};
export type FooBar = Merge<Foo, Bar>;
// => {
// [x: string]: unknown;
// [x: number]: number;
// [x: symbol]: unknown;
// foo: string;
// bar: Date;
// baz: boolean;
// }
caution
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.