Skip to content

Incorrect Type Definition of ChaincodeResponse #413

@Jerrylum

Description

@Jerrylum

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.

image image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions