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

Function makeWrapHost

packages/compiler-cli/test/ngtsc/env.ts:478–490  ·  view source on GitHub ↗
(wrapped: AugmentedCompilerHost)

Source from the content-addressed store, hash-verified

476}
477
478function makeWrapHost(wrapped: AugmentedCompilerHost): (host: ts.CompilerHost) => ts.CompilerHost {
479 return (delegate) => {
480 wrapped.delegate = delegate;
481 return new Proxy(delegate, {
482 get: (target: ts.CompilerHost, name: string): any => {
483 if ((wrapped as any)[name] !== undefined) {
484 return (wrapped as any)[name]!.bind(wrapped);
485 }
486 return (target as any)[name];
487 },
488 });
489 };
490}

Callers 4

setupMethod · 0.85
enablePreloadingMethod · 0.85
tsconfigMethod · 0.85

Calls 1

bindMethod · 0.65

Tested by

no test coverage detected