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

Function methodSpecFor

packages/capnweb-validate/src/internal/core.ts:1153–1161  ·  view source on GitHub ↗
(
  validator: Validator,
  prop: string
)

Source from the content-addressed store, hash-verified

1151}
1152
1153function methodSpecFor(
1154 validator: Validator,
1155 prop: string
1156): MethodSpec | undefined {
1157 let shape = shapeOf(validator);
1158 if (shape?.kind === "lazy") return methodSpecFor(shape.thunk(), prop);
1159 if (shape?.kind !== "stub") return undefined;
1160 return shape.service ? own(shape.service.methods, prop) : undefined;
1161}
1162
1163function serviceNameFor(validator: Validator): string | undefined {
1164 let shape = shapeOf(validator);

Callers 1

getFunction · 0.85

Calls 2

shapeOfFunction · 0.85
ownFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…