All questions

Best way to get typed slot content in a TypeScript Hydrogen project?

Asked by Priyanka Menon on

PMPriyanka Menon

Our Hydrogen storefront is strict TypeScript, no implicit any, and I would like slot content to be typed end to end rather than casting the fetch result to any in each loader. Casting works but it defeats the point of running strict.

What is the intended setup here? I would rather adopt the canonical approach than hand-roll interfaces that drift from what the slot actually returns.

Was this helpful?

0 answers

Still have questions?