MCPcopy Index your code
hub / github.com/angular/angular / getOrCall

Function getOrCall

packages/upgrade/src/common/src/upgrade_helper.ts:326–328  ·  view source on GitHub ↗
(property: T | Function, ...args: any[])

Source from the content-addressed store, hash-verified

324}
325
326function getOrCall<T>(property: T | Function, ...args: any[]): T {
327 return isFunction(property) ? property(...args) : property;
328}
329
330// NOTE: Only works for `typeof T !== 'object'`.
331function isMap<T>(value: SingleOrListOrMap<T>): value is {[key: string]: T} {

Callers 1

getTemplateMethod · 0.85

Calls 2

isFunctionFunction · 0.90
propertyFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…