()
| 336 | * @returns {ContractInstance} |
| 337 | */ |
| 338 | export const initContract = (): ContractInstance => { |
| 339 | return { |
| 340 | // @ts-expect-error - this is a type error, but it's not clear how to fix it |
| 341 | router: (endpoints, options) => recursivelyApplyOptions(endpoints, options), |
| 342 | query: (args) => args, |
| 343 | mutation: (args) => args, |
| 344 | responses: (args) => args, |
| 345 | response: () => ContractPlainTypeRuntimeSymbol, |
| 346 | body: () => ContractPlainTypeRuntimeSymbol, |
| 347 | type: () => ContractPlainTypeRuntimeSymbol, |
| 348 | otherResponse: <T extends ContractAnyType>({ |
| 349 | contentType, |
| 350 | body, |
| 351 | }: { |
| 352 | contentType: string; |
| 353 | body: T; |
| 354 | }) => |
| 355 | ({ |
| 356 | contentType, |
| 357 | body, |
| 358 | }) as ContractOtherResponse<T>, |
| 359 | noBody: () => ContractNoBody, |
| 360 | }; |
| 361 | }; |
no test coverage detected