MCPcopy
hub / github.com/QwikDev/qwik / assertDefined

Function assertDefined

packages/qwik/src/core/error/assert.ts:8–19  ·  view source on GitHub ↗
(
  value: T,
  text: string,
  ...parts: any[]
)

Source from the content-addressed store, hash-verified

6const ASSERT_DISCLAIMER = 'Internal assert, this is likely caused by a bug in Qwik: ';
7
8export function assertDefined<T>(
9 value: T,
10 text: string,
11 ...parts: any[]
12): asserts value is NonNullable<T> {
13 if (qDev) {
14 if (value != null) {
15 return;
16 }
17 throwErrorAndStop(ASSERT_DISCLAIMER + text, ...parts);
18 }
19}
20
21export function assertEqual(
22 value1: any,

Callers 15

resumeContainerFunction · 0.90
computeObjectFunction · 0.90
_serializeDataFunction · 0.90
_pauseFromContextsFunction · 0.90
collectSubscriptionsFunction · 0.90
executeComponentFunction · 0.90
notifyRenderFunction · 0.90
diffChildrenFunction · 0.90
diffVnodeFunction · 0.90
addChildrenFunction · 0.90
removeChildrenFunction · 0.90
createElmFunction · 0.90

Calls 1

throwErrorAndStopFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…