(
target: any,
key: string,
{ get, set }: { get?: Function; set?: Function }
)
| 15 | export const noopFn: any = (_: any) => _ |
| 16 | |
| 17 | export function proxy( |
| 18 | target: any, |
| 19 | key: string, |
| 20 | { get, set }: { get?: Function; set?: Function } |
| 21 | ) { |
| 22 | Object.defineProperty(target, key, { |
| 23 | enumerable: true, |
| 24 | configurable: true, |
| 25 | get: get || noopFn, |
| 26 | set: set || noopFn, |
| 27 | }) |
| 28 | } |
| 29 | |
| 30 | export function def(obj: Object, key: string, val: any, enumerable?: boolean) { |
| 31 | Object.defineProperty(obj, key, { |
no outgoing calls
searching dependent graphs…