MCPcopy Create free account
hub / github.com/angular/angular / runOnServer

Function runOnServer

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected