Fixed type issue and updated to latest canary

This commit is contained in:
Luis Alvarez
2020-10-21 12:49:59 -05:00
parent 5bbe5d21b0
commit 1569d62902
4 changed files with 43 additions and 77 deletions

View File

@@ -3,7 +3,7 @@ import { BigcommerceConfig, getConfig } from '..'
export type BigcommerceApiHandler<
T = any,
H extends BigcommerceHandlers<T> = {},
H extends BigcommerceHandlers = {},
Options extends {} = {}
> = (
req: NextApiRequest,

View File

@@ -44,10 +44,8 @@ export type Wishlist = {
// TODO: add missing fields
}
export type WishlistList = Wishlist[]
export type WishlistHandlers = {
getAllWishlists: BigcommerceHandler<WishlistList, { customerId?: string }>
getAllWishlists: BigcommerceHandler<Wishlist[], { customerId?: string }>
getWishlist: BigcommerceHandler<Wishlist, { wishlistId?: string }>
addWishlist: BigcommerceHandler<
Wishlist,