MCPcopy
hub / github.com/angular/angular / noSideEffects

Function noSideEffects

packages/core/src/util/closure.ts:18–20  ·  view source on GitHub ↗
(fn: () => T)

Source from the content-addressed store, hash-verified

16 * compiler.
17 */
18export function noSideEffects<T>(fn: () => T): T {
19 return {toString: fn}.toString() as unknown as T;
20}

Callers 9

setClassMetadataFunction · 0.90
ɵɵgetInheritedFactoryFunction · 0.90
ɵɵdefineComponentFunction · 0.90
ɵɵdefineNgModuleFunction · 0.90
ɵɵdefineDirectiveFunction · 0.90
ɵɵsetNgModuleScopeFunction · 0.90
makeDecoratorFunction · 0.90
makeParamDecoratorFunction · 0.90
makePropDecoratorFunction · 0.90

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…