( validator: ServiceValidator, name: string )
| 236 | } |
| 237 | |
| 238 | export 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 | |
| 249 | export function accepts(validator: Validator, value: unknown): boolean { |
| 250 | try { |
no outgoing calls
no test coverage detected
searching dependent graphs…