Update types

This commit is contained in:
goncy
2021-09-15 14:59:09 -03:00
parent 6b9ec07d86
commit 0b421392f7
3 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ const checkoutEndpoint: GetAPISchema<
// Create checkout // Create checkout
if (req.method === 'GET') { if (req.method === 'GET') {
const body = { ...req.body, cartId } const body = { ...req.body, cartId }
return await handlers['getCheckout']({ ...ctx, body }) return await handlers['getCheckout']?.({ ...ctx, body })
} }
// Create checkout // Create checkout

View File

@@ -45,7 +45,7 @@ export type SubmitCheckoutHandler<T extends CheckoutTypes = CheckoutTypes> =
} }
export type CheckoutHandlers<T extends CheckoutTypes = CheckoutTypes> = { export type CheckoutHandlers<T extends CheckoutTypes = CheckoutTypes> = {
getCheckout: GetCheckoutHandler<T> getCheckout?: GetCheckoutHandler<T>
submitCheckout: SubmitCheckoutHandler<T> submitCheckout: SubmitCheckoutHandler<T>
} }

View File

@@ -2,7 +2,7 @@ export * as Card from "./card"
export * as Address from "./address" export * as Address from "./address"
// TODO: define this type // TODO: define this type
export type Customer = unknown export type Customer = any
export type CustomerTypes = { export type CustomerTypes = {
customer: Customer customer: Customer