(wrapped: AugmentedCompilerHost)
| 482 | } |
| 483 | |
| 484 | function makeWrapHost(wrapped: AugmentedCompilerHost): (host: ts.CompilerHost) => ts.CompilerHost { |
| 485 | return (delegate) => { |
| 486 | wrapped.delegate = delegate; |
| 487 | return new Proxy(delegate, { |
| 488 | get: (target: ts.CompilerHost, name: string): any => { |
| 489 | if ((wrapped as any)[name] !== undefined) { |
| 490 | return (wrapped as any)[name]!.bind(wrapped); |
| 491 | } |
| 492 | return (target as any)[name]; |
| 493 | }, |
| 494 | }); |
| 495 | }; |
| 496 | } |
no test coverage detected
searching dependent graphs…