docs: remove usages of ts-ignore in examples (#12839)

This commit is contained in:
Shahed Nasser
2025-06-26 17:51:49 +03:00
committed by GitHub
parent 7d95eb73d3
commit f7e4a80c30
25 changed files with 17689 additions and 169 deletions
@@ -518,8 +518,8 @@ Create the file `src/workflows/add-custom-to-cart.ts` with the following content
![The directory structure after adding the workflow file.](https://res.cloudinary.com/dza7lstvk/image/upload/v1738251380/Medusa%20Resources/custom-item-price-5_zorahv.jpg)
export const workflowHighlights = [
["18", "useQueryGraphStep", "Retrieve the cart's details."],
["24", "useQueryGraphStep", "Retrieve the variant's details."],
["17", "useQueryGraphStep", "Retrieve the cart's details."],
["23", "useQueryGraphStep", "Retrieve the variant's details."],
]
```ts title="src/workflows/add-custom-to-cart.ts" highlights={workflowHighlights}
@@ -539,7 +539,6 @@ type AddCustomToCartWorkflowInput = {
export const addCustomToCartWorkflow = createWorkflow(
"add-custom-to-cart",
({ cart_id, item }: AddCustomToCartWorkflowInput) => {
// @ts-ignore
const { data: carts } = useQueryGraphStep({
entity: "cart",
filters: { id: cart_id },
@@ -651,7 +650,6 @@ import { WorkflowResponse } from "@medusajs/framework/workflows-sdk"
And replace the last `TODO` in the workflow with the following:
```ts title="src/workflows/add-custom-to-cart.ts"
// @ts-ignore
const { data: updatedCarts } = useQueryGraphStep({
entity: "cart",
filters: { id: cart_id },