MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / apply

Function apply

packages/hydrooj/src/utils.ts:58–63  ·  view source on GitHub ↗
(...applyArgs)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 1

thenMethod · 0.80

Tested by

no test coverage detected