Closed tkalliom closed 1 year ago
This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days.
We are closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.
If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines
Thank you!
Overview/summary
Decouple data structure typings from current REST resource classes into types or interfaces. Then the typings can be made a lot more useful with nested objects having proper typings, instead of being just
Record<string, unknown>
.Motivation
Currently, if you do something like
for (const lineItem of order.line_items)
,lineItem
is just{ [key: string]: unknown }
. This means missing out on the benefits of typings. It would be desirable for nested objects to be typed as well. (Contrast with https://github.com/MONEI/Shopify-api-node which has richer types like this.)Here's an excerpt of what
Order
currently looks like:I'm thinking of something along the lines of: