js-util

Home > rc-js-util > _Debug > runBlock

_Debug.runBlock() method

Convenience method to run multiple asserts.

Signature:

static runBlock(this: void, cb: () => void): boolean;

Parameters

Parameter Type Description
this void  
cb () => void  

Returns:

boolean

A boolean value to make linting happy…

Example

_BUILD.DEBUG && _Debug.runBlock(() => {
    _Debug.assert(someCondition, "someCondition was wrong");
    // ...
});