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>>
The current
PaystackResponse.data
field isRecord<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 likeTransaction
,Plan
,Subscription
e.t.c in future releases modifyPaystackResponse
to allow thedata
field to be a generic type so that when e.g. a transaction type is defined, it may be annotated asPaystackResponse<Transaction>
,PaystackResponse<Record<string, any>>