generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
JS SDK 1.7.0
Describe the bug
In the type declarations the arrays are wrong.
They are all like this: [string] instead of string[].
This makes the parameters only accept arrays that contain exactly 1 string.
To Reproduce
Try to make a valid request:
const marketplaceIds = ['marketplaceId1', 'marketplaceId2', 'marketplaceId3'];
const ordersResult: OrdersSpApi.GetOrdersResponse = await this.ordersSdk.getOrders(marketplaceIds, {});
Result:
marketplaceIds param underlined. Error:
TS2345: Argument of type string[] is not assignable to parameter of type [string]
Target requires 1 element(s) but source may have fewer.
Expected behavior
Sdk correctly handles arrays, parameters accept arrays with multiple items.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working