(
expression: any,
message?: string,
verboseDebugInfo?: string | (() => string),
stackCrawlMark?: AnyFunction
)
| 10 | import { AnyFunction, compareValues, hasProperty, isString } from './core'; |
| 11 | |
| 12 | export function assert( |
| 13 | expression: any, |
| 14 | message?: string, |
| 15 | verboseDebugInfo?: string | (() => string), |
| 16 | stackCrawlMark?: AnyFunction |
| 17 | ): asserts expression { |
| 18 | if (!expression) { |
| 19 | if (verboseDebugInfo) { |
| 20 | message += |
| 21 | '\r\nVerbose Debug Information: ' + |
| 22 | (typeof verboseDebugInfo === 'string' ? verboseDebugInfo : verboseDebugInfo()); |
| 23 | } |
| 24 | fail(message ? 'False expression: ' + message : 'False expression.', stackCrawlMark || assert); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | export function fail(message?: string, stackCrawlMark?: AnyFunction): never { |
| 29 | // debugger; |
searching dependent graphs…