MCPcopy
hub / github.com/cloudflare/capnweb / checkedMethod

Function checkedMethod

packages/capnweb-validate/__tests__/helpers.ts:238–247  ·  view source on GitHub ↗
(
  validator: ServiceValidator,
  name: string
)

Source from the content-addressed store, hash-verified

236}
237
238export function checkedMethod(
239 validator: ServiceValidator,
240 name: string
241): CheckedMethodSpec {
242 const spec = validator.methods[name];
243 if (!spec || spec.unchecked === true) {
244 throw new Error(`expected checked method ${name}`);
245 }
246 return spec as CheckedMethodSpec;
247}
248
249export function accepts(validator: Validator, value: unknown): boolean {
250 try {

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…