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

feat!: improved $img interface #169

Merged
merged 2 commits into from
Jan 28, 2021
Merged

feat!: improved $img interface #169

merged 2 commits into from
Jan 28, 2021

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jan 27, 2021

@pi0 pi0 requested a review from atinux January 27, 2021 20:36
getImage: (source: string, options?: ImageOptions) => ResolvedImage
getSizes: (source: string, options?: ImageOptions, sizes?: string[]) => { width: string, height: string, src: string }[]
getMeta: (source: string, options?: ImageOptions) => Promise<ImageInfo>
[preset: string]: $Img['options'] | $Img['getImage'] | $Img['getSizes'] | $Img['getMeta'] | $Img /* preset */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @danielroe if you know a better way to do this for mixed interface type

@pi0 pi0 merged commit 40ab562 into main Jan 28, 2021
@pi0 pi0 deleted the feat/improve-img branch January 28, 2021 08:31
procrates pushed a commit to procrates/nuxt-image that referenced this pull request Feb 21, 2023
* feat: improved $img interface

* chore: add sizes to img fallback

Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
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.

2 participants