(target: object, value: unknown)
| 404 | |
| 405 | // binds a method, as describe() selects nodes by `this` |
| 406 | const boundTo = (target: object, value: unknown) => |
| 407 | ( |
| 408 | typeof value === "function" && |
| 409 | Object.getPrototypeOf(value) === Function.prototype && |
| 410 | !("prototype" in value) |
| 411 | ) ? |
| 412 | new Proxy(value, { |
| 413 | apply: (method, _, args) => |
| 414 | inArktype(() => Reflect.apply(method, target, args)) |
| 415 | }) |
| 416 | : value |
| 417 | |
| 418 | // e.g. a Module, Scope or Generic, whose members its validator must have |
| 419 | const heldHandlerOf = (pair: Pair): ProxyHandler<any> => { |
no test coverage detected