MCPcopy
hub / github.com/coder/mux / assert

Function assert

src/common/utils/assert.ts:10–14  ·  view source on GitHub ↗
(condition: unknown, message?: string)

Source from the content-addressed store, hash-verified

8}
9
10export function assert(condition: unknown, message?: string): asserts condition {
11 if (!condition) {
12 throw new AssertionError(message);
13 }
14}
15
16export default assert;

Callers 15

registry.tsFile · 0.90
setShowAllMessagesMethod · 0.90
updateStreamClockMethod · 0.90
translateServerTimeMethod · 0.90
getOnChatCursorMethod · 0.90
flattenWorkspaceTreeFunction · 0.90
constructorMethod · 0.90
subscribeMethod · 0.90
markLoadingMethod · 0.90

Calls

no outgoing calls

Tested by 15

runSampleQueryFunction · 0.40
collectFullHistoryFunction · 0.40
createExecuteBashHarnessFunction · 0.40
collectFullHistoryFunction · 0.40
parseIntegerFunction · 0.40
parseBooleanFromIntegerFunction · 0.40