Hello everyone!
While writing code which utilizes the js-buy-sdk from Shopify, I noticed that the documented return type for Client#fetchNextPage() is Promise<GraphModel[]>, when in fact it returns an object, where the GraphModel[] is under the key model, as seen in the code.
That also means that the types for the js-buy-sdk are also incorrect (in the types it's also not marked as returning a Promise, but that's not a big of a deal, relatively).
So, the question, I suppose, is whether the documentation is incorrect or the code?
Thank you in advance.
Hello everyone!
While writing code which utilizes the js-buy-sdk from Shopify, I noticed that the documented return type for
Client#fetchNextPage()isPromise<GraphModel[]>, when in fact it returns an object, where theGraphModel[]is under the keymodel, as seen in the code.That also means that the types for the js-buy-sdk are also incorrect (in the types it's also not marked as returning a
Promise, but that's not a big of a deal, relatively).So, the question, I suppose, is whether the documentation is incorrect or the code?
Thank you in advance.