( value: unknown, expected: number, label?: string )
| 1363 | // a function's fact alone, its arity, so a program whose holes are functions |
| 1364 | // ships nothing of what tells a class or a symbol from the one a build read |
| 1365 | export const checkArity = ( |
| 1366 | value: unknown, |
| 1367 | expected: number, |
| 1368 | label?: string |
| 1369 | ): void => |
| 1370 | checkFacts( |
| 1371 | typeof value !== "function" || isValidator(value) ? |
| 1372 | describeValue(value) |
| 1373 | : Math.min(value.length, 2), |
| 1374 | expected, |
| 1375 | label |
| 1376 | ) |
| 1377 | |
| 1378 | const describeFact = (fact: HoleFact): string => |
| 1379 | typeof fact === "string" ? fact : ( |
no test coverage detected