* A simple helper to simply ensuring provided arguments match expected * constraints, throwing if not. * * In TypeScript environments, the %%check%% has been asserted true, so * any further code does not need additional compile-time checks.
(check, message, name, value)
| 166 | * any further code does not need additional compile-time checks. |
| 167 | */ |
| 168 | function assertArgument(check, message, name, value) { |
| 169 | assert(check, message, "INVALID_ARGUMENT", { argument: name, value: value }); |
| 170 | } |
| 171 | exports.assertArgument = assertArgument; |
| 172 | function assertArgumentCount(count, expectedCount, message) { |
| 173 | if (message == null) { |