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

Function runOnServer

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected