(expr: boolean, msg: () => string)
| 149 | * @doc {heading: 'Util', namespace: 'util'} |
| 150 | */ |
| 151 | export function assert(expr: boolean, msg: () => string) { |
| 152 | if (!expr) { |
| 153 | throw new Error(typeof msg === 'string' ? msg : msg()); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | export function assertShapesMatch( |
| 158 | shapeA: number[], shapeB: number[], errorMessagePrefix = ''): void { |
no outgoing calls
no test coverage detected
searching dependent graphs…