MCPcopy
hub / github.com/apollographql/apollo-client / assign

Function assign

packages/apollo-utilities/src/util/assign.ts:18–31  ·  view source on GitHub ↗
(
  target: { [key: string]: any },
  ...sources: Array<{ [key: string]: any }>
)

Source from the content-addressed store, hash-verified

16): A & B & C & D & E;
17export function assign(target: any, ...sources: Array<any>): any;
18export function assign(
19 target: { [key: string]: any },
20 ...sources: Array<{ [key: string]: any }>
21): { [key: string]: any } {
22 sources.forEach(source => {
23 if (typeof source === 'undefined' || source === null) {
24 return;
25 }
26 Object.keys(source).forEach(key => {
27 target[key] = source[key];
28 });
29 });
30 return target;
31}

Callers 12

getDefaultValuesFunction · 0.90
assign.tsFile · 0.90
writeResultToStoreMethod · 0.90
diffQueryAgainstStoreMethod · 0.90
writeToStore.tsFile · 0.85
readFromStore.tsFile · 0.85
assertWithObserverFunction · 0.85
index.tsFile · 0.85
fetchMore.tsFile · 0.85
client.tsFile · 0.85
optimistic.tsFile · 0.85
assertWithObserverFunction · 0.85

Calls

no outgoing calls

Tested by 2

assertWithObserverFunction · 0.68
assertWithObserverFunction · 0.68