Sha256: 50d22844db90a0dcd359afeb59dd1e9a384d977b4b363c880b4e65047237a29e

Contents?: true

Size: 415 Bytes

Versions: 82

Compression:

Stored size: 415 Bytes

Contents

import {Except} from './except';

/**
Merge two types into a new type. Keys of the second type overrides keys of the first type.

@example
```
import {Merge} from 'type-fest';

type Foo = {
	a: number;
	b: string;
};

type Bar = {
	b: number;
};

const ab: Merge<Foo, Bar> = {a: 1, b: 2};
```
*/
export type Merge<FirstType, SecondType> = Except<FirstType, Extract<keyof FirstType, keyof SecondType>> & SecondType;

Version data entries

82 entries across 57 versions & 3 rubygems

Version Path
trusty-cms-4.3.1 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.3.1 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.3 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.3 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.2.3 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.2.3 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.2.2 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.2.2 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.2.1 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.2.1 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.2 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.2 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.1.9 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.1.9 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.1.8 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.1.8 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.1.7 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.1.7 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts
trusty-cms-4.1.6 node_modules/type-fest/source/merge.d.ts
trusty-cms-4.1.6 node_modules/read-pkg/node_modules/type-fest/source/merge.d.ts