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

fix(assets): Fix types to be more accurate #6530

Merged
merged 3 commits into from
Mar 13, 2023
Merged

Conversation

Princesseuh
Copy link
Member

Changes

Some of the types were copied directly from @astrojs/image or changed through development and ended up being outdated. This PR fixes the following issues:

  • getConfiguredImageService wasn't present on the astro:assets types.
  • ImageMetadata wasn't exported
  • InputFormats were inaccurate, avif, heic and heif cannot be imported and thus cannot be on the format property of ImageMetadata. This PR additionally remove the module declarations for them, since they're innaccurate
  • Add a module declaration for SVGs, since you can import them

Fix #6514

Testing

N/A, types only. Tested manually

Docs

Unblocks withastro/docs#2829

@Princesseuh Princesseuh requested a review from a team as a code owner March 13, 2023 12:23
@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2023

🦋 Changeset detected

Latest commit: bbc5ac3

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Mar 13, 2023
@Princesseuh Princesseuh merged commit acf78c5 into main Mar 13, 2023
@Princesseuh Princesseuh deleted the feat/image-types branch March 13, 2023 12:54
@astrobot-houston astrobot-houston mentioned this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The ImageAsset interface from the Assets guide is not defined
2 participants