( validator: Validator, prop: string )
| 1151 | } |
| 1152 | |
| 1153 | function 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 | |
| 1163 | function serviceNameFor(validator: Validator): string | undefined { |
| 1164 | let shape = shapeOf(validator); |