UNPKG

1.61 kBTypeScriptView Raw
1/*! firebase-admin v10.0.0 */
2/*!
3 * @license
4 * Copyright 2017 Google Inc.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18/**
19 * Returns a deep copy of an object or array.
20 *
21 * @param value - The object or array to deep copy.
22 * @returns A deep copy of the provided object or array.
23 */
24export declare function deepCopy<T>(value: T): T;
25/**
26 * Copies properties from source to target (recursively allows extension of objects and arrays).
27 * Scalar values in the target are over-written. If target is undefined, an object of the
28 * appropriate type will be created (and returned).
29 *
30 * We recursively copy all child properties of plain objects in the source - so that namespace-like
31 * objects are merged.
32 *
33 * Note that the target can be a function, in which case the properties in the source object are
34 * copied onto it as static properties of the function.
35 *
36 * @param target - The value which is being extended.
37 * @param source - The value whose properties are extending the target.
38 * @returns The target value.
39 */
40export declare function deepExtend(target: any, source: any): any;