(wrapped: AugmentedCompilerHost)
| 682 | } |
| 683 | |
| 684 | function 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 | } |
no test coverage detected