(...applyArgs)
| 56 | if (originalInit) { |
| 57 | ImplClass.prototype[Service.init] = new Proxy(originalInit, { |
| 58 | apply(...applyArgs) { |
| 59 | const result = Reflect.apply(...applyArgs); |
| 60 | if (result instanceof Promise) result.then(() => { state = 'initialized'; }); |
| 61 | else state = 'initialized'; |
| 62 | return result; |
| 63 | }, |
| 64 | }); |
| 65 | } |
| 66 | instance = Reflect.construct(ImplClass, args, target); |