Skip to content

fix(types): annotate optimized image type in adaptOpenGraphImages #631

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SZim92
Copy link

@SZim92 SZim92 commented May 2, 2025

Summary

Removes the ts(7043) implicit-any hint by introducing a typed alias for ImagesOptimizer output and annotating _image explicitly:

  • Imports ImagesOptimizer from ./images-optimization
  • Defines type OptimizedImage = Awaited<ReturnType<ImagesOptimizer>>[0]
  • Annotates _image: OptimizedImage | undefined

No functional changes. Type-level only.

CI Outcome

  • astro check: no errors, warnings, or hints
  • eslint .: clean
  • prettier --check .: all files formatted

Import ImagesOptimizer, define OptimizedImage alias, and annotate the `_image` variable to remove an implicit-any hint (ts7043) in `src/utils/images.ts`. No functional changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant