( value: unknown, label: string = unnamed, kind: "Type" | "Module" | "Scope" | "Generic" = "Type" )
| 1460 | |
| 1461 | // a value holding a cell a validator reads, set only once its site has run |
| 1462 | export const checkHeld = ( |
| 1463 | value: unknown, |
| 1464 | label: string = unnamed, |
| 1465 | kind: "Type" | "Module" | "Scope" | "Generic" = "Type" |
| 1466 | ): void => { |
| 1467 | if (value === undefined) { |
| 1468 | throwError( |
| 1469 | writeCreationMismatchMessage( |
| 1470 | label, |
| 1471 | describeValue(value), |
| 1472 | `the ${kind} it was at build` |
| 1473 | ) |
| 1474 | ) |
| 1475 | } |
| 1476 | } |
| 1477 | |
| 1478 | // kept off the value so a program can't read it |
| 1479 | const holesByValue = new WeakMap< |
nothing calls this directly
no test coverage detected