Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align prop types #130

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/hooks/useNostoOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { snakeize } from "../utils/snakeize"
import { Order } from "../types"
import { useRenderCampaigns } from "./useRenderCampaigns"
import { useNostoApi } from "./useNostoApi"
import { ToCamelCase } from "../utils/types"

/**
* @group Hooks
*/
export type NostoOrderProps = {
order: Order
order: Order | ToCamelCase<Order>
placements?: string[]
}

Expand Down
7 changes: 2 additions & 5 deletions src/hooks/useNostoSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ import { ToCamelCase } from "../utils/types"
import { useNostoContext } from "./useNostoContext"
import { useDeepCompareEffect } from "./useDeepCompareEffect"

type Cart = CartSnakeCase | ToCamelCase<CartSnakeCase>
type Customer = CustomerSnakeCase | ToCamelCase<CustomerSnakeCase>

/**
* @group Hooks
*/
export type NostoSessionProps = {
cart?: Cart
customer?: Customer
cart?: CartSnakeCase | ToCamelCase<CartSnakeCase>
Copy link
Contributor Author

@timowestnosto timowestnosto Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inlined, since non exported types are not visible to typedoc

customer?: CustomerSnakeCase | ToCamelCase<CustomerSnakeCase>
}

/**
Expand Down
Loading