| 356 | } |
| 357 | |
| 358 | const checkedMember = ( |
| 359 | pair: Pair, |
| 360 | target: object, |
| 361 | k: PropertyKey, |
| 362 | observation = `reading ${String(k)}` |
| 363 | ): unknown => { |
| 364 | const value = inArktype(() => Reflect.get(target, k, target)) |
| 365 | const read = outcomeOf(() => |
| 366 | isUnbaked(pair.counterpart, k) ? undefined : ( |
| 367 | (pair.counterpart as Record<PropertyKey, unknown>)[k] |
| 368 | ) |
| 369 | ) |
| 370 | if (value !== undefined && ("thrown" in read || read.value === undefined)) { |
| 371 | fail( |
| 372 | pair, |
| 373 | observation, |
| 374 | printable(typeof value), |
| 375 | "thrown" in read ? `throws ${thrownOf(read.thrown)}` : "undefined", |
| 376 | "since its validator lacks it" |
| 377 | ) |
| 378 | } |
| 379 | return value |
| 380 | } |
| 381 | |
| 382 | const hasOf = |
| 383 | (pair: Pair) => |