MCPcopy
hub / github.com/angular/angular / runOnServer

Function runOnServer

packages/common/http/test/transfer_cache_spec.ts:99–107  ·  view source on GitHub ↗
(callback: () => T)

Source from the content-addressed store, hash-verified

97 }
98
99 function runOnServer<T>(callback: () => T): T {
100 const previousServerMode = globalThis['ngServerMode'];
101 globalThis['ngServerMode'] = true;
102 try {
103 return callback();
104 } finally {
105 globalThis['ngServerMode'] = previousServerMode;
106 }
107 }
108
109 function runInterceptor(
110 req: HttpRequest<unknown>,

Callers 1

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…