MCPcopy
hub / github.com/chartjs/Chart.js / mergeIf

Function mergeIf

src/helpers/helpers.core.ts:301–304  ·  view source on GitHub ↗
(target: T, source: AnyObject[])

Source from the content-addressed store, hash-verified

299export function mergeIf<T, S1, S2, S3, S4>(target: T, source: [S1, S2, S3, S4]): T & S1 & S2 & S3 & S4;
300export function mergeIf<T>(target: T, source: AnyObject[]): AnyObject;
301export function mergeIf<T>(target: T, source: AnyObject[]): AnyObject {
302 // eslint-disable-next-line @typescript-eslint/no-use-before-define
303 return merge<T>(target, source, {merger: _mergerIf});
304}
305
306/**
307 * Merges source[key] in target[key] only if target[key] is undefined.

Callers 3

mergeScaleConfigFunction · 0.85
_mergerIfFunction · 0.85
initMethod · 0.85

Calls 1

mergeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…