(wrapped: AugmentedCompilerHost)
| 476 | } |
| 477 | |
| 478 | function 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 | } |
no test coverage detected