You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three Hero-style components declare let heroBgUrl; without an initializer or type annotation, producing ts(7043) warnings (implicit any).
astro check warnings
src/components/ColumnedHero.astro:27:5 - warning ts(7043): Variable 'heroBgUrl' implicitly has an 'any' type, but a better type may be inferred from usage.
27 let heroBgUrl;
~~~~~~~~~
src/components/Hero.astro:19:5 - warning ts(7043): Variable 'heroBgUrl' implicitly has an 'any' type, but a better type may be inferred from usage.
19 let heroBgUrl;
~~~~~~~~~
src/components/HeroWithBreadcrumbs.astro:32:5 - warning ts(7043): Variable 'heroBgUrl' implicitly has an 'any' type, but a better type may be inferred from usage.
32 let heroBgUrl;
~~~~~~~~~
Suggested fix
Look at how heroBgUrl is assigned and used in each file, then annotate explicitly. Most likely:
letheroBgUrl: string|undefined;
or
letheroBgUrl: ImageMetadata|undefined;
depending on whether it holds a URL string or an Astro image import.
Acceptance criteria
All 3 warnings clear.
Hero variants still render correctly on home, blog, and pages with breadcrumbs.
Notes
This is one of the few cases where the three files are nearly identical and a single PR makes sense — keeps the typing consistent across the trio.
Type
heroBgUrlin Hero component variantsLabels:
types,cleanupEstimated PR size: 3 files
Note
Ticket description was generated using Claude Code. Review before starting on a fix.
Note
The following issue adds support for
npm run astro:checkSummary
Three Hero-style components declare
let heroBgUrl;without an initializer or type annotation, producingts(7043)warnings (implicit any).astro checkwarningsSuggested fix
Look at how
heroBgUrlis assigned and used in each file, then annotate explicitly. Most likely:or
depending on whether it holds a URL string or an Astro image import.
Acceptance criteria
Notes
This is one of the few cases where the three files are nearly identical and a single PR makes sense — keeps the typing consistent across the trio.