( value: unknown, expected: unknown, label: string = unnamed )
| 1422 | } |
| 1423 | |
| 1424 | export const checkInput = ( |
| 1425 | value: unknown, |
| 1426 | expected: unknown, |
| 1427 | label: string = unnamed |
| 1428 | ): void => { |
| 1429 | if (!is(value, expected)) { |
| 1430 | throwError( |
| 1431 | writeCreationMismatchMessage( |
| 1432 | label, |
| 1433 | describeValue(value), |
| 1434 | describeValue(expected) |
| 1435 | ) |
| 1436 | ) |
| 1437 | } |
| 1438 | } |
| 1439 | |
| 1440 | // a module's progress is `undefined` before its body runs |
| 1441 | export const checkProgress = ( |
nothing calls this directly
no test coverage detected