MCPcopy Index your code
hub / github.com/Effect-TS/effect / get

Function get

packages/sql-kysely/src/internal/patch.ts:43–61  ·  view source on GitHub ↗
(target, prop)

Source from the content-addressed store, hash-verified

41 }
42 return new Proxy(obj, {
43 get(target, prop): any {
44 // Respect the proxy invariant: non-configurable, non-writable
45 // properties must return their actual value.
46 const desc = Object.getOwnPropertyDescriptor(target, prop)
47 if (desc && !desc.configurable && !desc.writable) {
48 return target[prop]
49 }
50 const prototype = Object.getPrototypeOf(target)
51 if (Effect.EffectTypeId in prototype && prop === "commit") {
52 return commit.bind(target)
53 }
54 if (typeof (target[prop]) === "function") {
55 if (typeof prop === "string" && whitelist.includes(prop)) {
56 return target[prop].bind(target)
57 }
58 return (...args: Array<any>) => effectifyWith(target[prop].call(target, ...args), commit, whitelist)
59 }
60 return effectifyWith(target[prop], commit, whitelist)
61 }
62 })
63}
64

Callers

nothing calls this directly

Calls 1

effectifyWithFunction · 0.85

Tested by

no test coverage detected