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

Function callback

src/helpers/helpers.core.ts:103–111  ·  view source on GitHub ↗
(
  fn: T | undefined,
  args: unknown[],
  thisArg?: TA
)

Source from the content-addressed store, hash-verified

101 * @param [thisArg] - The value of `this` provided for the call to `fn`.
102 */
103export function callback<T extends (this: TA, ...restArgs: unknown[]) => R, TA, R>(
104 fn: T | undefined,
105 args: unknown[],
106 thisArg?: TA
107): R | undefined {
108 if (fn && typeof fn.call === 'function') {
109 return fn.apply(thisArg, args);
110 }
111}
112
113/**
114 * Note(SB) for performance sake, this method should only be used when loopable type

Callers 1

helpers.extras.tsFile · 0.70

Calls 1

applyMethod · 0.80

Tested by

no test coverage detected