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

Function makeWrapHost

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

Source from the content-addressed store, hash-verified

682}
683
684function makeWrapHost(wrapped: AugmentedCompilerHost): (host: ts.CompilerHost) => ts.CompilerHost {
685 return (delegate) => {
686 wrapped.delegate = delegate;
687 return new Proxy(delegate, {
688 get: (target: ts.CompilerHost, name: string): any => {
689 if ((wrapped as any)[name] !== undefined) {
690 return (wrapped as any)[name]!.bind(wrapped);
691 }
692 return (target as any)[name];
693 },
694 });
695 };
696}

Callers 4

setupMethod · 0.85
enablePreloadingMethod · 0.85
tsconfigMethod · 0.85

Calls 1

bindMethod · 0.65

Tested by

no test coverage detected