Blame view

天文台pc/tianwentai-ui/node_modules/@mui/utils/esm/deepmerge/deepmerge.d.ts 808 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  export declare function isPlainObject(item: unknown): item is Record<keyof any, unknown>;
  export interface DeepmergeOptions {
    clone?: boolean | undefined;
  }
  /**
   * Merge objects deeply.
   * It will shallow copy React elements.
   *
   * If `options.clone` is set to `false` the source object will be merged directly into the target object.
   *
   * @example
   * ```ts
   * deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });
   * // => { a: { b: 1, c: 2 }, d: 4 }
   * ````
   *
   * @param target The target object.
   * @param source The source object.
   * @param options The merge options.
   * @param options.clone Set to `false` to merge the source object directly into the target object.
   * @returns The merged object.
   */
  export default function deepmerge<T>(target: T, source: unknown, options?: DeepmergeOptions): T;