Skip to content

Commit

Permalink
Replace placeholder with blurDataURL in global StaticImageData
Browse files Browse the repository at this point in the history
…type (#27916)

I think the global `StaticImageData` type does not currently match what actually gets imported, and what the `Image` component expects (see [here](https://github.com/vercel/next.js/blob/canary/packages/next/client/image.tsx#L60-L65)). This PR changes `placeholder` to `blurDataURL`.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
  • Loading branch information
stefanprobst committed Aug 10, 2021
1 parent 0cc4a98 commit eb871d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/image-types/global.d.ts
Expand Up @@ -5,7 +5,7 @@ interface StaticImageData {
src: string
height: number
width: number
placeholder?: string
blurDataURL?: string
}

declare module '*.png' {
Expand Down

0 comments on commit eb871d3

Please sign in to comment.