MCPcopy Index your code
hub / github.com/material-shell/material-shell / assert

Function assert

src/utils/assert.ts:10–17  ·  view source on GitHub ↗
(
    shouldBeTrue: boolean,
    message: string
)

Source from the content-addressed store, hash-verified

8}
9
10export function assert(
11 shouldBeTrue: boolean,
12 message: string
13): asserts shouldBeTrue {
14 if (!shouldBeTrue) {
15 throw Error('Assertion failed: ' + message);
16 }
17}
18
19export function logAssert(shouldBeTrue: boolean, message: string): boolean {
20 if (!shouldBeTrue) {

Callers 15

registerToSignalsMethod · 0.90
constructorMethod · 0.90
stealActorMethod · 0.90
registerProviderMethod · 0.90
activeButtonForIndexMethod · 0.90
desaturateIconsMethod · 0.90
splitIdMethod · 0.90
onResultActivatedMethod · 0.90
getDominantItemFunction · 0.90

Calls 1

ErrorEnum · 0.50

Tested by

no test coverage detected