MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / get

Function get

packages/core/sdk/src/promise-executor.ts:182–195  ·  view source on GitHub ↗
(target, prop, receiver)

Source from the content-addressed store, hash-verified

180
181 return new Proxy(value, {
182 get(target, prop, receiver) {
183 const v = Reflect.get(target, prop, receiver);
184 if (typeof v === "function") {
185 return (...args: unknown[]) => {
186 const result = (v as (...a: unknown[]) => unknown).apply(target, adaptPromiseArgs(args));
187 if (Effect.isEffect(result)) {
188 return Effect.runPromise(result as Effect.Effect<unknown, unknown>);
189 }
190 return result;
191 };
192 }
193 if (isPlainObject(v)) return promisifyDeep(v);
194 return v;
195 },
196 }) as Promisified<T>;
197};
198

Callers

nothing calls this directly

Calls 4

adaptPromiseArgsFunction · 0.85
promisifyDeepFunction · 0.85
isPlainObjectFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected