文件操作 - merge.d.ts
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/type-fest/source/merge.d.ts
编辑文件内容
import type {OmitIndexSignature} from './omit-index-signature'; import type {PickIndexSignature} from './pick-index-signature'; import type {Simplify} from './simplify'; // Merges two objects without worrying about index signatures. type SimpleMerge<Destination, Source> = { [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; } & Source; /** Merge two types into a new type. Keys of the second type overrides keys of the first type. @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; // } ``` @category Object */ export type Merge<Destination, Source> = Simplify< SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>> >;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件