MCPcopy Create free account
hub / github.com/Snapchat/Valdi / assertNever

Function assertNever

valdi/vscode_debugger/src/common/objUtils.ts:14–17  ·  view source on GitHub ↗
(value: never, message: string)

Source from the content-addressed store, hash-verified

12 * Asserts that the value is never. If this function is reached, it throws.
13 */
14export const assertNever = (value: never, message: string): never => {
15 debugger;
16 throw new Error(message.replace('{value}', JSON.stringify(value)));
17};
18
19/**
20 * Filters the object by value.

Callers 1

applyDefaultsFunction · 0.90

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected