Skip to content

Convert PaystackResponse to a generic type #34

@gray-adeyi

Description

@gray-adeyi

The current PaystackResponse.data field is Record<string, any> | Record<string, any>[] | null which leaves the consumer of the package to implement the types of the returned data, in plans to support type inference for arbitrary types like Transaction, Plan, Subscription e.t.c in future releases modify PaystackResponse to allow the data field to be a generic type so that when e.g. a transaction type is defined, it may be annotated as PaystackResponse<Transaction>, PaystackResponse<Record<string, any>>

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions