rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
78 lines (39 loc) • 939 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [\_Debug](./rc-js-util._debug.md) > [runBlock](./rc-js-util._debug.runblock.md)
## \_Debug.runBlock() method
Convenience method to run multiple asserts.
**Signature:**
```typescript
static runBlock(this: void, cb: () => void): boolean;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
this
</td><td>
void
</td><td>
</td></tr>
<tr><td>
cb
</td><td>
() => void
</td><td>
</td></tr>
</tbody></table>
**Returns:**
boolean
A boolean value to make linting happy...
## Example
```typescript
_BUILD.DEBUG && _Debug.runBlock(() => {
_Debug.assert(someCondition, "someCondition was wrong");
// ...
});
```