MCPcopy Index your code
hub / github.com/rolling-scopes/rsschool-app / assertParamExists

Function assertParamExists

client/src/api/common.ts:31–35  ·  view source on GitHub ↗
(functionName: string, paramName: string, paramValue: unknown)

Source from the content-addressed store, hash-verified

29 * @export
30 */
31export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
32 if (paramValue === null || paramValue === undefined) {
33 throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
34 }
35}
36
37/**
38 *

Calls

no outgoing calls

Tested by

no test coverage detected