Shim.success and Shim.error functions return SuccessResponse and ErrorResponse. The return types are defined using JSDoc and both type definitions are also defined using JSDoc in the same file.
However, for the TypeScript definition, ChaincodeResponse is used instead. It requires three properties including status, message, and payload. But both users Shim.success and Shim.error do not return an object with all three properties at the same time. In this case, I believe the type definition of ChaincodeResponse is incorrect.
